From patchwork Tue Feb 20 12:45:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Yu X-Patchwork-Id: 13563990 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.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (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 C0898C48BC4 for ; Tue, 20 Feb 2024 12:45:58 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1rcPVU-0000ox-Q7; Tue, 20 Feb 2024 12:45:57 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rcPVT-0000ol-Lw for linux-f2fs-devel@lists.sourceforge.net; Tue, 20 Feb 2024 12:45:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=gz43b9HwF34kiL9Mz8e28kFJo/xsbHXMBXEu0vR3zt8=; b=SBI6NAF5g64r5nqRqYQk9noTHF 0qdhhvcdF0Ak/1Kjv45l6oK+zn9pUMK8eNGKGWceLcosEi58TZHdPH5zV0GwyxsqEPvtgnaRgz0pV 1tBq7m/UEacJBiZVCt7uxwopxuc6MYUdseF/MgA5C44R/bR5Vr+RxwfwcedzG9zNpHmM=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From :Sender:Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=gz43b9HwF34kiL9Mz8e28kFJo/xsbHXMBXEu0vR3zt8=; b=P bIoYyOTfeBzKi/vPZ4nTSVRttBdvdedFkFyOoNR3FlTGKu/ktuBg9ST/0n6YAP8TTzeHHIXEqYbUf NVdIMNaAGlzZQ0oggPua411/YW57o52rpPwWmWoNpBIcDPgNTUuaTqyyfAUlQiS31Uis3vRyd0Awa emNgnUl+Oqx15+K0=; Received: from dfw.source.kernel.org ([139.178.84.217]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1rcPVS-0007az-7W for linux-f2fs-devel@lists.sourceforge.net; Tue, 20 Feb 2024 12:45:56 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 2CA5B60F7F for ; Tue, 20 Feb 2024 12:45:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 92D44C433F1; Tue, 20 Feb 2024 12:45:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708433149; bh=NxeI5/+sydQ6FjSDx3lh9o9wcPPGiaQ/jn1SDP80AE8=; h=From:To:Cc:Subject:Date:From; b=DD8PLyeKhJGRzR7pUGnb7JX3cH4WqAYlSVAOCy8ptv5a9xxQlxkd9ahvqn5hGvArG ZnQeqStquieOsnYCzdt3dSVurMZOhzIGYF2NsUennXf/gccPorimStvXiyULq8RmfA +Pd/q7sR2pxZ/zRAGZ8c2Pqs4i+2dNRrEHQTPyFaCY9uPxkOGg7yf6vAmn6pn1x3zT 7CCO59t/xoIzT2Lcx3C9X6RKgEiaZpkf5epql4yCmms8RlOtZOYkXpQ1ttyOJMKsaY 3qpEYwGVRWZC6ZaooMkZI7uYYfN/sYDBlJJdNuMW/SxzoR3Lj24tJk5cOvE785VCTf B0Klv7kKB1Iug== From: Chao Yu To: jaegeuk@kernel.org Date: Tue, 20 Feb 2024 20:45:35 +0800 Message-Id: <20240220124537.11531-1-chao@kernel.org> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Headers-End: 1rcPVS-0007az-7W Subject: [f2fs-dev] [PATCH 1/3] f2fs-tools: remove obsolete fields in struct f2fs_sb_info X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-f2fs-devel@lists.sourceforge.net Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net No logic change. Signed-off-by: Chao Yu --- fsck/f2fs.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/fsck/f2fs.h b/fsck/f2fs.h index e31be22..187e73c 100644 --- a/fsck/f2fs.h +++ b/fsck/f2fs.h @@ -257,9 +257,6 @@ struct f2fs_sb_info { struct f2fs_checkpoint *ckpt; int cur_cp; - struct list_head orphan_inode_list; - unsigned int n_orphans; - /* basic file system units */ unsigned int log_sectors_per_block; /* log2 sectors per block */ unsigned int log_blocksize; /* log2 block size */ From patchwork Tue Feb 20 12:45:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Yu X-Patchwork-Id: 13563991 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.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (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 1E93DC54787 for ; Tue, 20 Feb 2024 12:46:00 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1rcPVW-0007My-Qx; Tue, 20 Feb 2024 12:45:59 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rcPVV-0007Mr-Cx for linux-f2fs-devel@lists.sourceforge.net; Tue, 20 Feb 2024 12:45:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=kloJxlT96gDbvxqb5PWNpTfvPyghWuN42yvYOBf1aKs=; b=UqH9HZETOPAYyvvyzsCVOf8hDs vCVU3z4LvBldQz7wvVkKLsPeqJ60/7WH18VQg3t3SxmNWJOWMMeD+DOGZIJvoAelKtvIl1I9lWXJn Qy4CNghn/Uj7wjA/34QIFNuiiSmQUrRmP5K5AeubKX0ZTm2pHa4VLhgzABm6L92JJDRU=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=kloJxlT96gDbvxqb5PWNpTfvPyghWuN42yvYOBf1aKs=; b=Kv6URXu4b31Q/UA7KflAJZmOef XxojIIxmFxG6z8dKcNdhnjgN675jtzR1z9V3Q4fawkGR923acn0c7Y4yrGROEwLLVfmyY6cIjKGgy IfleTQTplPmdzBBUmBqc+uIKKIANqcQnQtRPrGVtlYd/nl8xCiBofnTdFKNxyfh470SA=; Received: from dfw.source.kernel.org ([139.178.84.217]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1rcPVU-0007b3-02 for linux-f2fs-devel@lists.sourceforge.net; Tue, 20 Feb 2024 12:45:57 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id DE17060F84 for ; Tue, 20 Feb 2024 12:45:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5BEB6C433F1; Tue, 20 Feb 2024 12:45:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708433151; bh=djwOOba0xhmuKwtaju9RvzKtfa29S99ymYRH2WrDa9s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MdI0zF02GeEJ4WoUpmBC08brGAsqKT2jkSye5APLl85SK4AtP2EK1INVPeBK6kQJ0 5/ywhVXN0eolMW8ByRmgLLt0ncHcBD0BfDdhmtH4Y7FRGbF7lsHV6vFKfg5uDX/kMP GfmSFLO8yXYS/yl5dfm21IF3su9d04aJvKb2IVgU5QdgUJsrQwAf743Atc6noG+DGc 88Bi1jV+dK5lqjcC6JVDYAfagYkVrawP9/mYfbiPwTrrKqbjvZIRBw7/WKGd8RE5PQ iELel8JNtiijBqJxH2bEpYLxufgxTkFjt/UT5pmuyLetJrW4qLSpuzDjTeUmaAg853 4u0cmyo/foeIw== From: Chao Yu To: jaegeuk@kernel.org Date: Tue, 20 Feb 2024 20:45:36 +0800 Message-Id: <20240220124537.11531-2-chao@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240220124537.11531-1-chao@kernel.org> References: <20240220124537.11531-1-chao@kernel.org> MIME-Version: 1.0 X-Headers-End: 1rcPVU-0007b3-02 Subject: [f2fs-dev] [PATCH 2/3] f2fs-tools: use NULL_ADDR macro to instead magic number for cleanup X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-f2fs-devel@lists.sourceforge.net Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net Use NULL_ADDR macro to instead magic number for cleanup. Signed-off-by: Chao Yu --- fsck/fsck.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fsck/fsck.c b/fsck/fsck.c index 3461a52..14a9628 100644 --- a/fsck/fsck.c +++ b/fsck/fsck.c @@ -1071,13 +1071,13 @@ check_next: qf_szchk_type[cur_qtype] = QF_SZCHK_INLINE; block_t blkaddr = le32_to_cpu(node_blk->i.i_addr[ofs]); - if (blkaddr != 0) { + if (blkaddr != NULL_ADDR) { ASSERT_MSG("[0x%x] wrong inline reserve blkaddr:%u", nid, blkaddr); if (c.fix_on) { FIX_MSG("inline_data has wrong 0'th block = %x", blkaddr); - node_blk->i.i_addr[ofs] = 0; + node_blk->i.i_addr[ofs] = NULL_ADDR; node_blk->i.i_blocks = cpu_to_le64(*blk_cnt); need_fix = 1; } @@ -1121,7 +1121,7 @@ check_next: if (c.fix_on) { FIX_MSG("inline_dentry has wrong 0'th block = %x", blkaddr); - node_blk->i.i_addr[ofs] = 0; + node_blk->i.i_addr[ofs] = NULL_ADDR; node_blk->i.i_blocks = cpu_to_le64(*blk_cnt); need_fix = 1; } @@ -1161,8 +1161,8 @@ check_next: node_blk->i.i_addr[ofs + idx] = NULL_ADDR; need_fix = 1; - FIX_MSG("[0x%x] i_addr[%d] = 0", nid, - ofs + idx); + FIX_MSG("[0x%x] i_addr[%d] = NULL_ADDR", + nid, ofs + idx); } continue; } @@ -1190,9 +1190,9 @@ check_next: if (cur_qtype != -1 && blkaddr != NEW_ADDR) qf_last_blkofs[cur_qtype] = child.pgofs; } else if (c.fix_on) { - node_blk->i.i_addr[ofs + idx] = 0; + node_blk->i.i_addr[ofs + idx] = NULL_ADDR; need_fix = 1; - FIX_MSG("[0x%x] i_addr[%d] = 0", nid, ofs + idx); + FIX_MSG("[0x%x] i_addr[%d] = NULL_ADDR", nid, ofs + idx); } } From patchwork Tue Feb 20 12:45:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Yu X-Patchwork-Id: 13563992 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.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (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 E70FCC48BC4 for ; Tue, 20 Feb 2024 12:46:04 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1rcPVc-000402-DW; Tue, 20 Feb 2024 12:46:04 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rcPVa-0003zw-FF for linux-f2fs-devel@lists.sourceforge.net; Tue, 20 Feb 2024 12:46:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=kxm+unuSqLfiA5HCTQLgrP1bLKvY6EdsN9x7ubsWxqo=; b=BmBW/awYhAkWSdvPdHvbXSbMhl jU8T+e0FoJVQL+GRz3VSHlbP2KE1fvJa3OR7tqsXp/4MQ0Qwlv+AjJJn3XeENR7BZQkGEeW3SL+Yy s0XCzOlwLdsk4YGVSVSpytC0XgwjQkTz+0K/hR1I0WzRGUgW2GFVe+Klr6lDIxPAlPlk=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=kxm+unuSqLfiA5HCTQLgrP1bLKvY6EdsN9x7ubsWxqo=; b=OnEX3xPcleClGY2CQgC5luQ9FE vek0zoY71ntF/mgxmr+X6h6XMi5nrrIqKgBrDdlahDkX1X+apzjMtffUp6Iz7hGf0KmaohPZPqCoR PLUqvXhkLKG4s+IUL+ENvYnE23tO03tPwK8z9ZUdRDhaHmoX4vH0fuqCmv5xmOlw74SE=; Received: from sin.source.kernel.org ([145.40.73.55]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1rcPVY-0007b8-98 for linux-f2fs-devel@lists.sourceforge.net; Tue, 20 Feb 2024 12:46:02 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 1547ACE14E5 for ; Tue, 20 Feb 2024 12:45:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1AB88C433F1; Tue, 20 Feb 2024 12:45:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708433153; bh=vEf0Ih4DLZl+DfJ2jdBpaR+s4SCpe+EwlG+7g5o8K/w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iO6DQ1Nxu0/K9LUWnp5khHzGBPrp6QJuBysHFmSaR8MR36Gn8MwVSGIbokGVdLJPW 2Pa8w0N5o4GXVxbBvr2SDSHE/BIxcQIxSCT3bS9YcbWYcEmMHRV35mRunP1eHqw8Or YBVNXZFWbiJEzS8rSCziR/MXhSN0AFDJfzyc040447nmlwQRmpl1cEiN7QrzkHF2aL YDKFfmQ4tRXRStzFuCtxr5TCP5KzeAWzttNJUOCxk4v/6PuHN06FTXDnvACmj90Z7D QkSB8Zb8EbvkNag8374cWj60W1zkwlfP3XbUbQRwskHfZ6Oe/+xozL9vzUiWqh9DMR KjpZSKOhE+bUw== From: Chao Yu To: jaegeuk@kernel.org Date: Tue, 20 Feb 2024 20:45:37 +0800 Message-Id: <20240220124537.11531-3-chao@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240220124537.11531-1-chao@kernel.org> References: <20240220124537.11531-1-chao@kernel.org> MIME-Version: 1.0 X-Headers-End: 1rcPVY-0007b8-98 Subject: [f2fs-dev] [PATCH 3/3] f2fs-tools: print hexadecimal number in log X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-f2fs-devel@lists.sourceforge.net Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net Otherwise, it will waste time to convert for comparison. Signed-off-by: Chao Yu --- fsck/fsck.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fsck/fsck.c b/fsck/fsck.c index 14a9628..a42b597 100644 --- a/fsck/fsck.c +++ b/fsck/fsck.c @@ -1253,8 +1253,8 @@ check: } if (i_blocks != *blk_cnt) { - ASSERT_MSG("ino: 0x%x has i_blocks: %08"PRIx64", " - "but has %u blocks", + ASSERT_MSG("ino: 0x%x has i_blocks: 0x%08"PRIx64", " + "but has 0x%x blocks", nid, i_blocks, *blk_cnt); if (c.fix_on) { node_blk->i.i_blocks = cpu_to_le64(*blk_cnt);