From: Chao Yu <yuchao0@huawei.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <chao@kernel.org>,
<linux-f2fs-devel@lists.sourceforge.net>,
<linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH v2] f2fs: Make f2fs_readpages readable again
Date: Thu, 6 Feb 2020 14:29:31 +0800 [thread overview]
Message-ID: <c5bfd52b-e336-709b-5bed-aa29fc110631@huawei.com> (raw)
In-Reply-To: <20200205030845.GP8731@bombadil.infradead.org>
On 2020/2/5 11:08, Matthew Wilcox wrote:
> 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:
Yup, for compression feature, now we use f2fs_is_compress_backend_ready() to
check whether current kernel can support to handle compressed file.
For the purpose of cleanup, I guess below change should be enough...
>> if (IS_ENABLED(CONFIG_F2FS_FS_COMPRESSION) && f2fs_compressed_file(inode))
Thanks,
>
> 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.
> .
>
prev parent reply other threads:[~2020-02-06 6:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-01 15:08 [PATCH] f2fs: Make f2fs_readpages readable again Matthew Wilcox
2020-02-03 3:39 ` [PATCH v2] " Matthew Wilcox
2020-02-05 1:58 ` Chao Yu
2020-02-05 3:08 ` Matthew Wilcox
2020-02-06 6:29 ` Chao Yu [this message]
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=c5bfd52b-e336-709b-5bed-aa29fc110631@huawei.com \
--to=yuchao0@huawei.com \
--cc=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=willy@infradead.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).