From: Christoph Hellwig <hch@infradead.org>
To: Damien Le Moal <damien.lemoal@wdc.com>
Cc: Javier Gonzalez <javier@javigon.com>,
linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
linux-fsdevel@vger.kernel.org, Jaegeuk Kim <jaegeuk@kernel.org>
Subject: Re: [f2fs-dev] [PATCH] f2fs: Fix direct IO handling
Date: Tue, 26 Nov 2019 08:33:15 -0800 [thread overview]
Message-ID: <20191126163315.GB3794@infradead.org> (raw)
In-Reply-To: <20191126075719.1046485-1-damien.lemoal@wdc.com>
On Tue, Nov 26, 2019 at 04:57:19PM +0900, Damien Le Moal wrote:
> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> index 5755e897a5f0..8ac2d3b70022 100644
> --- a/fs/f2fs/data.c
> +++ b/fs/f2fs/data.c
> @@ -1073,6 +1073,8 @@ int f2fs_preallocate_blocks(struct kiocb *iocb, struct iov_iter *from)
> int flag;
> int err = 0;
> bool direct_io = iocb->ki_flags & IOCB_DIRECT;
> + bool do_direct_io = direct_io &&
> + !f2fs_force_buffered_io(inode, iocb, from);
I don't think this is the right fix. The proper fix is to clear
IOCB_DIRECT when falling back to buffered I/O, preferably in the
filemap.c helpers as well.
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2019-11-26 16:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-26 7:57 [f2fs-dev] [PATCH] f2fs: Fix direct IO handling Damien Le Moal
2019-11-26 8:34 ` Ritesh Harjani
2019-11-28 2:10 ` Damien Le Moal
2019-11-28 10:20 ` Ritesh Harjani
2019-11-30 7:27 ` Chao Yu
2019-11-30 7:19 ` Chao Yu
2019-11-26 16:33 ` Christoph Hellwig [this message]
2019-11-26 23:44 ` Jaegeuk Kim
2019-11-28 2:34 ` Shinichiro Kawasaki
2019-11-29 3:35 ` Javier Gonzalez
2019-11-30 6:43 ` Chao Yu
2019-12-03 17:33 ` [f2fs-dev] [PATCH v2] " Jaegeuk Kim
2019-12-04 1:27 ` Chao Yu
2019-12-04 4:01 ` Shinichiro Kawasaki
2019-12-04 8:16 ` Javier Gonzalez
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=20191126163315.GB3794@infradead.org \
--to=hch@infradead.org \
--cc=damien.lemoal@wdc.com \
--cc=jaegeuk@kernel.org \
--cc=javier@javigon.com \
--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).