All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chao Yu <yuchao0@huawei.com>
To: Matthew Wilcox <willy@infradead.org>
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: 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.
> .
> 


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

WARNING: multiple messages have this Message-ID (diff)
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.
> .
> 

  reply	other threads:[~2020-02-06  7:29 UTC|newest]

Thread overview: 12+ 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-01 15:08 ` Matthew Wilcox
2020-02-03  3:39 ` [f2fs-dev] [PATCH v2] " Matthew Wilcox
2020-02-03  3:39   ` Matthew Wilcox
2020-02-05  1:58   ` [f2fs-dev] " Chao Yu
2020-02-05  1:58     ` Chao Yu
2020-02-05  3:08     ` [f2fs-dev] " Matthew Wilcox
2020-02-05  3:08       ` Matthew Wilcox
2020-02-06  6:29       ` Chao Yu [this message]
2020-02-06  6:29         ` Chao Yu
2020-02-04  5:19 ` [PATCH] " kbuild test robot
2020-02-12  3:13 ` kbuild test robot

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=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 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.