mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chao Yu <yuchao0@huawei.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
	Masahiro Yamada <masahiroy@kernel.org>
Cc: Randy Dunlap <rdunlap@infradead.org>,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	<linux-f2fs-devel@lists.sourceforge.net>,
	Jaegeuk Kim <jaegeuk@kernel.org>
Subject: Re: [f2fs-dev] [PATCH] f2fs: compress: Allow modular (de)compression algorithms
Date: Fri, 26 Feb 2021 10:14:08 +0800	[thread overview]
Message-ID: <f1e9abe1-6c43-cefc-276b-d36fec72e4a4@huawei.com> (raw)
In-Reply-To: <CAMuHMdX-t4Z27RnWn0Sp1AoO3A=+aT8GXkcGC5gSArtm+W9w1Q@mail.gmail.com>

Hi Geert,

On 2021/2/23 15:42, Geert Uytterhoeven wrote:
>> I checked the code in menu_finalize(), and this seems to work like this.
>>
>> I discussed the oddity of the select behavior before
>> (https://lore.kernel.org/linux-kbuild/e1a6228d-1341-6264-d97a-e2bd52a65c82@infradead.org/),
>> but I was not confident about what the right direction was.
>>
>>
>> Anyway, the behavior is obscure from the current code.
>>
>> If you want to make this more robust,
>> you can write as follows:
>>
>> config F2FS_FS
>>          tristate "F2FS filesystem support"
>>          depends on BLOCK
>>          select NLS
>>          select CRYPTO
>>          select CRYPTO_CRC32
>>          select F2FS_FS_XATTR if FS_ENCRYPTION
>>          select FS_ENCRYPTION_ALGS if FS_ENCRYPTION
>>          select LZO_COMPRESS if F2FS_FS_LZO
>>          select LZO_DECOMPRESS if F2FS_FS_LZO
>>          select LZ4_COMPRESS if F2FS_FS_LZ4
>>          select LZ4_DECOMPRESS if F2FS_FS_LZ4
>>          select LZ4HC_COMPRESS if F2FS_FS_LZ4HC
>>          select ZSTD_COMPRESS if F2FS_FS_ZSTD
>>          select ZSTD_DECOMPRESS if F2FS_FS_ZSTD
>>
>> The code is a bit clumsy, but it is clear
>> that the module (F2FS_FS) is selecting the
>> compress/decompress libraries.
> Actually the above is what I tried first ;-)  Works fine.
> 
> Then I started to look for similar cases in other file systems (e.g.
> EROFS_FS_ZIP), and discovered the issue doesn't happen there, which
> sparked my investigation.  So I settled on the direct dependency,
> because it keeps all compression-related logic together.

It looks above way is more explicit, how about using your previous implementation?

Thank,

> 
> Gr{oetje,eeting}s,

      reply	other threads:[~2021-02-26  2:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-22 12:59 Geert Uytterhoeven
2021-02-23  6:30 ` Masahiro Yamada
2021-02-23  7:42   ` Geert Uytterhoeven
2021-02-26  2:14     ` 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=f1e9abe1-6c43-cefc-276b-d36fec72e4a4@huawei.com \
    --to=yuchao0@huawei.com \
    --cc=geert@linux-m68k.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=rdunlap@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

all inboxes | Powered by JetHome®