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 2F837C4332F for ; Wed, 4 Jan 2023 07:28:55 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Nn1S55lGtz3c4Y for ; Wed, 4 Jan 2023 18:28:53 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.alibaba.com (client-ip=115.124.30.43; helo=out30-43.freemail.mail.aliyun.com; envelope-from=hsiangkao@linux.alibaba.com; receiver=) Received: from out30-43.freemail.mail.aliyun.com (out30-43.freemail.mail.aliyun.com [115.124.30.43]) (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 4Nn1S04K1Wz2yPD for ; Wed, 4 Jan 2023 18:28:48 +1100 (AEDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R951e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045176;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0VYqimyD_1672817323; Received: from 30.97.49.3(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0VYqimyD_1672817323) by smtp.aliyun-inc.com; Wed, 04 Jan 2023 15:28:44 +0800 Message-ID: <99d24ef5-c72a-80ea-9ea5-2b7e1e60af79@linux.alibaba.com> Date: Wed, 4 Jan 2023 15:28:42 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [RFC PATCH] erofs-utils: fsck: support fragments To: Yue Hu References: <20221224094319.10317-1-zbestahu@gmail.com> <20230104112445.000075d8.zbestahu@gmail.com> <5236b19c-763f-9a5b-a0c1-4c59fa7c6d05@linux.alibaba.com> <20230104152651.000051df.zbestahu@gmail.com> From: Xiang Gao In-Reply-To: <20230104152651.000051df.zbestahu@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: , Cc: Yue Hu , linux-erofs@lists.ozlabs.org, zhangwen@coolpad.com Errors-To: linux-erofs-bounces+linux-erofs=archiver.kernel.org@lists.ozlabs.org Sender: "Linux-erofs" On 2023/1/4 15:26, Yue Hu wrote: ... >> >> I think we could just export parts of erofs_pread() to clean up the >> whole erofs_verify_inode_data()... > > What's the clean up referring to? > > However, i think erofs_verify_inode_data() looks a little duplicate compared to erofs_read_raw_data/z_erofs_read_data(). We should reuse the main part (for example, by introducing an interface to accept mapping) of erofs_read_raw_data() and z_erofs_read_data() to avoid duplicated code in erofs_verify_inode_data(). Thanks, Gao Xiang > >> >> Thanks, >> Gao Xiang >> >>