From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Jan Kara <jack@suse.cz>, linux-kernel@vger.kernel.org
Subject: [PATCH] FAT: DIO-write fallback to normal buffered
Date: Sat, 10 Feb 2007 23:44:01 +0900 [thread overview]
Message-ID: <87ejoynkcu.fsf@duaron.myhome.or.jp> (raw)
In-Reply-To: <87sldenkg0.fsf@duaron.myhome.or.jp> (OGAWA Hirofumi's message of "Sat\, 10 Feb 2007 23\:42\:07 +0900")
[RESEND: forget to add linux-kernel@vger.kernel.org]
If the DIO write on FAT is expanding the size, it will be fail by -EINVAL,
because FAT can't handle it now.
This patch fallback it to the normal buffered-write and would return
success.
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
---
fs/fat/inode.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff -puN fs/fat/inode.c~fat_direct-io-fallback fs/fat/inode.c
--- linux-2.6/fs/fat/inode.c~fat_direct-io-fallback 2007-02-10 22:08:33.000000000 +0900
+++ linux-2.6-hirofumi/fs/fat/inode.c 2007-02-10 22:08:33.000000000 +0900
@@ -173,10 +173,12 @@ static ssize_t fat_direct_IO(int rw, str
*
* But we must fill the remaining area or hole by nul for
* updating ->mmu_private.
+ *
+ * Return 0, and fallback to normal buffered write.
*/
loff_t size = offset + iov_length(iov, nr_segs);
if (MSDOS_I(inode)->mmu_private < size)
- return -EINVAL;
+ return 0;
}
/*
_
next parent reply other threads:[~2007-02-10 14:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87sldenkg0.fsf@duaron.myhome.or.jp>
2007-02-10 14:44 ` OGAWA Hirofumi [this message]
2007-02-14 10:55 ` Jan Kara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ejoynkcu.fsf@duaron.myhome.or.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=akpm@linux-foundation.org \
--cc=jack@suse.cz \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®