From: Matthew Wilcox <willy@infradead.org>
To: Chao Yu <yuchao0@huawei.com>
Cc: linux-fsdevel@vger.kernel.org, Jaegeuk Kim <jaegeuk@kernel.org>,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH v2] f2fs: Make f2fs_readpages readable again
Date: Tue, 4 Feb 2020 19:08:45 -0800 [thread overview]
Message-ID: <20200205030845.GP8731@bombadil.infradead.org> (raw)
In-Reply-To: <bd08bf56-f901-33b1-5151-f77fd823e343@huawei.com>
On Wed, Feb 05, 2020 at 09:58:29AM +0800, Chao Yu wrote:
> On 2020/2/3 11:39, Matthew Wilcox wrote:
> >
> > Remove the horrendous ifdeffery by slipping an IS_ENABLED into
> > f2fs_compressed_file().
>
> I'd like to suggest to use
>
> if (IS_ENABLED(CONFIG_F2FS_FS_COMPRESSION) && f2fs_compressed_file(inode))
>
> here to clean up f2fs_readpages' codes.
>
> Otherwise, f2fs module w/o compression support will not recognize compressed
> file in most other cases if we add IS_ENABLED() condition into
> f2fs_compressed_file().
If we need to recognise them in order to deny access to them, then I
suppose we need two predicates. Perhaps:
f2fs_unsupported_attributes(inode)
and
f2fs_compressed_file(inode)
where f2fs_unsupported_attributes can NACK any set flag (including those
which don't exist yet), eg encrypted. That seems like a larger change
than I should be making, since I'm not really familiar with f2fs code.
_______________________________________________
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-02-05 3:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-01 15:08 [f2fs-dev] [PATCH] f2fs: Make f2fs_readpages readable again Matthew Wilcox
2020-02-03 3:39 ` [f2fs-dev] [PATCH v2] " Matthew Wilcox
2020-02-05 1:58 ` Chao Yu
2020-02-05 3:08 ` Matthew Wilcox [this message]
2020-02-06 6:29 ` 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=20200205030845.GP8731@bombadil.infradead.org \
--to=willy@infradead.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--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 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).