mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Namjae Jeon <linkinjeon@gmail.com>
Cc: akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Namjae Jeon <namjae.jeon@samsung.com>,
	Amit Sahrawat <a.sahrawat@samsung.com>
Subject: Re: [PATCH v2 4/5] fat: fallback to buffered write in case of fallocatded region on direct IO
Date: Sun, 01 Dec 2013 21:50:03 +0900	[thread overview]
Message-ID: <871u1wenwk.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <1384688303-2969-1-git-send-email-linkinjeon@gmail.com> (Namjae Jeon's message of "Sun, 17 Nov 2013 20:38:23 +0900")

Namjae Jeon <linkinjeon@gmail.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@mail.parknet.co.jp>

  reply	other threads:[~2013-12-01 12:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-17 11:38 Namjae Jeon
2013-12-01 12:50 ` OGAWA Hirofumi [this message]
2013-12-05 14:16   ` Namjae Jeon

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=871u1wenwk.fsf@devron.myhome.or.jp \
    --to=hirofumi@mail.parknet.co.jp \
    --cc=a.sahrawat@samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=linkinjeon@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namjae.jeon@samsung.com \
    /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®