[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK7LNARG+AU2ZBFEo8+tqEGSuS2_yv2QpSc3kVDKtrAw6PRTpA@mail.gmail.com>
Date: Fri, 26 Feb 2021 20:09:12 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Jaegeuk Kim <jaegeuk@...nel.org>, Chao Yu <chao@...nel.org>,
linux-f2fs-devel@...ts.sourceforge.net,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] f2fs: compress: Allow modular (de)compression algorithms
On Fri, Feb 26, 2021 at 7:10 PM Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
>
> If F2FS_FS is modular, enabling the compressions options
> F2FS_FS_{LZ4,LZ4HZ,LZO,LZORLE,ZSTD} will make the (de)compression
> algorithms {LZ4,LZ4HC,LZO,ZSTD}_{,DE}COMPRESS builtin instead of
> modular, as the former depend on an intermediate boolean
> F2FS_FS_COMPRESSION, which in-turn depends on tristate F2FS_FS.
>
> Indeed, if a boolean symbol A depends directly on a tristate symbol B
> and selects another tristate symbol C:
>
> tristate B
>
> tristate C
>
> bool A
> depends on B
> select C
>
> and B is modular, then C will also be modular.
>
> However, if there is an intermediate boolean D in the dependency chain
> between A and B:
>
> tristate B
>
> tristate C
>
> bool D
> depends on B
>
> bool A
> depends on D
> select C
>
> then the modular state won't propagate from B to C, and C will be
> builtin instead of modular.
>
> As modular dependency propagation through intermediate symbols is
> obscure, fix this in a robust way by moving the selection of tristate
> (de)compression algorithms from the boolean compression options to the
> tristate main F2FS_FS option.
>
> Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
> ---
> v2:
> - Move the selects to F2FS_FS instead of adding direct dependencies
> on F2FS_FS.
> ---
> fs/f2fs/Kconfig | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/fs/f2fs/Kconfig b/fs/f2fs/Kconfig
> index 62e638a49bbf089a..cca79029a577151c 100644
> --- a/fs/f2fs/Kconfig
> +++ b/fs/f2fs/Kconfig
> @@ -7,6 +7,15 @@ config F2FS_FS
> select CRYPTO_CRC32
> select F2FS_FS_XATTR if FS_ENCRYPTION
> select FS_ENCRYPTION_ALGS if FS_ENCRYPTION
> + select LZ4_COMPRESS if F2FS_FS_LZ4
> + select LZ4_DECOMPRESS if F2FS_FS_LZ4
> + select LZ4HC_COMPRESS if F2FS_FS_LZ4HC
> + select LZO_COMPRESS if F2FS_FS_LZO
> + select LZO_COMPRESS if F2FS_FS_LZORLE
This line is redundant because
F2FS_FS_LZORLE depends on F2FS_FS_LZO.
> + select LZO_DECOMPRESS if F2FS_FS_LZO
> + select LZO_DECOMPRESS if F2FS_FS_LZORLE
Ditto.
> + select ZSTD_COMPRESS if F2FS_FS_ZSTD
> + select ZSTD_DECOMPRESS if F2FS_FS_ZSTD
> help
> F2FS is based on Log-structured File System (LFS), which supports
> versatile "flash-friendly" features. The design has been focused on
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists