From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B463FC433DB for ; Fri, 26 Feb 2021 02:15:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5AC9764F0D for ; Fri, 26 Feb 2021 02:15:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230139AbhBZCPF (ORCPT ); Thu, 25 Feb 2021 21:15:05 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:12582 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229800AbhBZCPC (ORCPT ); Thu, 25 Feb 2021 21:15:02 -0500 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4DmtTC6kgVzMf1Q; Fri, 26 Feb 2021 10:12:15 +0800 (CST) Received: from [10.136.110.154] (10.136.110.154) by smtp.huawei.com (10.3.19.204) with Microsoft SMTP Server (TLS) id 14.3.498.0; Fri, 26 Feb 2021 10:14:13 +0800 Subject: Re: [f2fs-dev] [PATCH] f2fs: compress: Allow modular (de)compression algorithms To: Geert Uytterhoeven , Masahiro Yamada CC: Randy Dunlap , Linux Kbuild mailing list , Linux Kernel Mailing List , , Jaegeuk Kim References: <20210222125916.4168804-1-geert@linux-m68k.org> From: Chao Yu Message-ID: Date: Fri, 26 Feb 2021 10:14:08 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.136.110.154] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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,