[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <871u1wenwk.fsf@devron.myhome.or.jp>
Date: Sun, 01 Dec 2013 21:50:03 +0900
From: OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
To: Namjae Jeon <linkinjeon@...il.com>
Cc: akpm@...ux-foundation.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org,
Namjae Jeon <namjae.jeon@...sung.com>,
Amit Sahrawat <a.sahrawat@...sung.com>
Subject: Re: [PATCH v2 4/5] fat: fallback to buffered write in case of fallocatded region on direct IO
Namjae Jeon <linkinjeon@...il.com> writes:
> diff --git a/fs/fat/inode.c b/fs/fat/inode.c
> index 12a37a9..c9fb9b6 100644
> --- a/fs/fat/inode.c
> +++ b/fs/fat/inode.c
> @@ -217,6 +217,14 @@ static ssize_t fat_direct_IO(int rw, struct kiocb *iocb,
> loff_t size = offset + iov_iter_count(iter);
> if (MSDOS_I(inode)->mmu_private < size)
> return 0;
> +
> + /*
> + * In case of writing in fallocated region, return 0 and
> + * fallback to buffered write.
> + */
> + if (MSDOS_I(inode)->i_disksize >
> + round_up(i_size_read(inode), inode->i_sb->s_blocksize))
> + return 0;
->mmu_private works instead of i_size?
--
OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists