linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Chao Yu <chao@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH 2/2] f2fs: allow dio read for LFS mode
Date: Fri, 25 Nov 2016 10:14:04 -0800	[thread overview]
Message-ID: <20161125181404.GB87130@jaegeuk> (raw)
In-Reply-To: <22d105b6-3393-eee0-f377-af1ab00141f2@kernel.org>

On Fri, Nov 25, 2016 at 11:54:43PM +0800, Chao Yu wrote:
> On 2016/11/12 5:03, Jaegeuk Kim wrote:
> > We can allow dio reads for LFS mode, while doing buffered writes for dio writes.
> > 
> > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> > ---
> >  fs/f2fs/data.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> > index ca53da5..996b9ae 100644
> > --- a/fs/f2fs/data.c
> > +++ b/fs/f2fs/data.c
> > @@ -1732,7 +1732,7 @@ static ssize_t f2fs_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
> >  
> >  	if (f2fs_encrypted_inode(inode) && S_ISREG(inode->i_mode))
> >  		return 0;
> > -	if (test_opt(F2FS_I_SB(inode), LFS))
> > +	if (rw == WRITE && test_opt(F2FS_I_SB(inode), LFS))
> 
> For LFS mode, we must disallow any IPU in main area including direct write,
> instead of both direct read and write, so this patch relieves the restriction?

Yup.

> 
> IIUC, please add:
> 
> Reviewed-by: Chao Yu <yuchao0@huawei.com>
> 
> Thanks,
> 
> >  		return 0;
> >  
> >  	trace_f2fs_direct_IO_enter(inode, offset, count, rw);
> > 

  reply	other threads:[~2016-11-25 18:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-11 21:03 [PATCH 1/2] f2fs: revert segment allocation for direct IO Jaegeuk Kim
2016-11-11 21:03 ` [PATCH 2/2] f2fs: allow dio read for LFS mode Jaegeuk Kim
2016-11-25 15:54   ` [f2fs-dev] " Chao Yu
2016-11-25 18:14     ` Jaegeuk Kim [this message]
2016-11-25 16:01 ` [f2fs-dev] [PATCH 1/2] f2fs: revert segment allocation for direct IO Chao Yu

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=20161125181404.GB87130@jaegeuk \
    --to=jaegeuk@kernel.org \
    --cc=chao@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).