From: Eric Biggers <ebiggers@kernel.org>
To: Chao Yu <yuchao0@huawei.com>
Cc: Satya Tangirala <satyat@google.com>,
linux-fscrypt@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
linux-ext4@vger.kernel.org
Subject: Re: [PATCH 5/5] f2fs: support direct I/O with fscrypt using blk-crypto
Date: Thu, 9 Jul 2020 18:15:13 -0700 [thread overview]
Message-ID: <20200710011513.GA4037751@gmail.com> (raw)
In-Reply-To: <560266ca-0164-c02e-18ea-55564683d13e@huawei.com>
On Fri, Jul 10, 2020 at 09:05:23AM +0800, Chao Yu wrote:
> On 2020/7/10 3:47, Satya Tangirala wrote:
> > From: Eric Biggers <ebiggers@google.com>
> >
> > Wire up f2fs with fscrypt direct I/O support.
> >
> > Signed-off-by: Eric Biggers <ebiggers@google.com>
> > Signed-off-by: Satya Tangirala <satyat@google.com>
> > ---
> > fs/f2fs/f2fs.h | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
> > index b35a50f4953c..6d662a37b445 100644
> > --- a/fs/f2fs/f2fs.h
> > +++ b/fs/f2fs/f2fs.h
> > @@ -4082,7 +4082,9 @@ static inline bool f2fs_force_buffered_io(struct inode *inode,
> > struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
> > int rw = iov_iter_rw(iter);
> >
> > - if (f2fs_post_read_required(inode))
> > + if (!fscrypt_dio_supported(iocb, iter))
> > + return true;
> > + if (fsverity_active(inode))
>
> static inline bool f2fs_post_read_required(struct inode *inode)
> {
> return f2fs_encrypted_file(inode) || fsverity_active(inode) ||
> f2fs_compressed_file(inode);
> }
>
> That's not correct, missed to check compression condition.
>
Thanks Chao, great catch. This used to be correct, but we missed that the
second f2fs_compressed_file() check got removed by commit b5f4684b5f5f
("f2fs: remove redundant compress inode check").
- Eric
WARNING: multiple messages have this Message-ID (diff)
From: Eric Biggers <ebiggers@kernel.org>
To: Chao Yu <yuchao0@huawei.com>
Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
linux-fscrypt@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
Satya Tangirala <satyat@google.com>
Subject: Re: [f2fs-dev] [PATCH 5/5] f2fs: support direct I/O with fscrypt using blk-crypto
Date: Thu, 9 Jul 2020 18:15:13 -0700 [thread overview]
Message-ID: <20200710011513.GA4037751@gmail.com> (raw)
In-Reply-To: <560266ca-0164-c02e-18ea-55564683d13e@huawei.com>
On Fri, Jul 10, 2020 at 09:05:23AM +0800, Chao Yu wrote:
> On 2020/7/10 3:47, Satya Tangirala wrote:
> > From: Eric Biggers <ebiggers@google.com>
> >
> > Wire up f2fs with fscrypt direct I/O support.
> >
> > Signed-off-by: Eric Biggers <ebiggers@google.com>
> > Signed-off-by: Satya Tangirala <satyat@google.com>
> > ---
> > fs/f2fs/f2fs.h | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
> > index b35a50f4953c..6d662a37b445 100644
> > --- a/fs/f2fs/f2fs.h
> > +++ b/fs/f2fs/f2fs.h
> > @@ -4082,7 +4082,9 @@ static inline bool f2fs_force_buffered_io(struct inode *inode,
> > struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
> > int rw = iov_iter_rw(iter);
> >
> > - if (f2fs_post_read_required(inode))
> > + if (!fscrypt_dio_supported(iocb, iter))
> > + return true;
> > + if (fsverity_active(inode))
>
> static inline bool f2fs_post_read_required(struct inode *inode)
> {
> return f2fs_encrypted_file(inode) || fsverity_active(inode) ||
> f2fs_compressed_file(inode);
> }
>
> That's not correct, missed to check compression condition.
>
Thanks Chao, great catch. This used to be correct, but we missed that the
second f2fs_compressed_file() check got removed by commit b5f4684b5f5f
("f2fs: remove redundant compress inode check").
- Eric
_______________________________________________
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:[~2020-07-10 1:15 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-09 19:47 [PATCH 0/5] add support for direct I/O with fscrypt using blk-crypto Satya Tangirala
2020-07-09 19:47 ` [f2fs-dev] " Satya Tangirala via Linux-f2fs-devel
2020-07-09 19:47 ` [PATCH 1/5] fscrypt: Add functions for direct I/O support Satya Tangirala
2020-07-09 19:47 ` [f2fs-dev] " Satya Tangirala via Linux-f2fs-devel
2020-07-09 21:54 ` Eric Biggers
2020-07-09 21:54 ` [f2fs-dev] " Eric Biggers
2020-07-09 19:47 ` [PATCH 2/5] direct-io: add support for fscrypt using blk-crypto Satya Tangirala
2020-07-09 19:47 ` [f2fs-dev] " Satya Tangirala via Linux-f2fs-devel
2020-07-10 5:34 ` Christoph Hellwig
2020-07-10 5:34 ` [f2fs-dev] " Christoph Hellwig
2020-07-13 18:36 ` Eric Biggers
2020-07-13 18:36 ` [f2fs-dev] " Eric Biggers
2020-07-17 1:56 ` Satya Tangirala
2020-07-17 1:56 ` [f2fs-dev] " Satya Tangirala via Linux-f2fs-devel
2020-07-09 19:47 ` [PATCH 3/5] iomap: support direct I/O with " Satya Tangirala
2020-07-09 19:47 ` [f2fs-dev] " Satya Tangirala via Linux-f2fs-devel
2020-07-09 21:59 ` Eric Biggers
2020-07-09 21:59 ` [f2fs-dev] " Eric Biggers
2020-07-09 19:47 ` [PATCH 4/5] ext4: " Satya Tangirala
2020-07-09 19:47 ` [f2fs-dev] " Satya Tangirala via Linux-f2fs-devel
2020-07-09 22:30 ` Eric Biggers
2020-07-09 22:30 ` [f2fs-dev] " Eric Biggers
2020-07-09 19:47 ` [PATCH 5/5] f2fs: " Satya Tangirala
2020-07-09 19:47 ` [f2fs-dev] " Satya Tangirala via Linux-f2fs-devel
2020-07-10 1:05 ` Chao Yu
2020-07-10 1:05 ` [f2fs-dev] " Chao Yu
2020-07-10 1:15 ` Eric Biggers [this message]
2020-07-10 1:15 ` Eric Biggers
2020-07-09 22:46 ` [PATCH 0/5] add support for " Eric Biggers
2020-07-09 22:46 ` [f2fs-dev] " Eric Biggers
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=20200710011513.GA4037751@gmail.com \
--to=ebiggers@kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fscrypt@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=satyat@google.com \
--cc=yuchao0@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.