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 Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1CFA8C7EE24 for ; Tue, 6 Jun 2023 07:58:24 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Qb2sV4QzKz3f0V for ; Tue, 6 Jun 2023 17:58:22 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.alibaba.com (client-ip=115.124.30.101; helo=out30-101.freemail.mail.aliyun.com; envelope-from=hsiangkao@linux.alibaba.com; receiver=) Received: from out30-101.freemail.mail.aliyun.com (out30-101.freemail.mail.aliyun.com [115.124.30.101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Qb2sP04S1z3bTG for ; Tue, 6 Jun 2023 17:58:15 +1000 (AEST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R261e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046056;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=2;SR=0;TI=SMTPD_---0VkVaZUV_1686038289; Received: from 30.97.48.203(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0VkVaZUV_1686038289) by smtp.aliyun-inc.com; Tue, 06 Jun 2023 15:58:10 +0800 Message-ID: <41910cd1-ea8a-cab4-af46-eea76d6f1761@linux.alibaba.com> Date: Tue, 6 Jun 2023 15:58:08 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH] erofs-utils: dump: add some superblock fields display To: Guo Xuenan , linux-erofs@lists.ozlabs.org References: <20230606035511.1114101-1-guoxuenan@huawei.com> <95aeb6f0-348a-81e4-2180-a5dfaa18995f@linux.alibaba.com> From: Gao Xiang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: linux-erofs@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development of Linux EROFS file system List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-erofs-bounces+linux-erofs=archiver.kernel.org@lists.ozlabs.org Sender: "Linux-erofs" On 2023/6/6 15:28, Guo Xuenan wrote: ... >>> + >>> +struct available_alg { >>> +    int type; >>> +    const char *name; >>> +}; >> >> Could we use lib/compressor.c instead? >> > Take a look at the currently implemented interface, and I notice that > compressor.c define different compressors for mkfs.erofs, but for > dump.erofs we don't need care about that much, we only show compression >  algothrims name of the image. It seems that it cannot be reused. Please help add erofsfsck_ prefix to available_cfg like erofsfsck_available_cfg. Anyway, that is still not quite clean if you take a look at erofs_get_compress_algorithm_id() if lib/compress.c. We could address this later. Thanks, Gao Xiang