From patchwork Fri Jul 12 02:01:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sheng Yong X-Patchwork-Id: 13731229 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 B3113C3DA49 for ; Fri, 12 Jul 2024 02:02:02 +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 1sS5bk-00055O-Ff; Fri, 12 Jul 2024 02:02:00 +0000 Received: from [172.30.29.67] (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 1sS5bi-00055I-Cl for linux-f2fs-devel@lists.sourceforge.net; Fri, 12 Jul 2024 02:01:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=MIME-Version:Content-Type:Content-Transfer-Encoding :Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: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=aoeHWLRg9GoV2nXHcGWUIDKI9J77WnZKFK7RZWYa/aE=; b=j9drOD+o9Ff26MtqUjwkK7TxT3 UyhsoOlyu7qZ+i8qVGkrdGXtrzbS8PKkTpAtOJ6aOb37D8cTdo4ccM8pQNiisJ9gi8ILXK/WNnmkt sSmnTrXhOLrHdEmU6BH8IfkkHgUBKufKNHKWkNoTO79Pd8E9yc7z9yW9ZW8nqe43J9MU=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To: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=aoeHWLRg9GoV2nXHcGWUIDKI9J77WnZKFK7RZWYa/aE=; b=M y417VLBetthyzciNJ08WIi92Gc3sYdBoS74d6sDc8KYy4jdKaRk05CIvnn3ZV0Yslu18vKEI5Ucmx 3aYlLjUZUDJDW+f1Ho2RzDwjOHzLoHnfVsY8eE/wsH2a8vF4UfEcTRNbePsDsCCNS+cWeEd2P8ytg jQfghlXB91YTNkdM=; Received: from mail-tyzapc01on2047.outbound.protection.outlook.com ([40.107.117.47] helo=APC01-TYZ-obe.outbound.protection.outlook.com) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1sS5bi-0003QU-O0 for linux-f2fs-devel@lists.sourceforge.net; Fri, 12 Jul 2024 02:01:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Tv+kC2RK3qgxErB9jFS1u6S6/V1VdMUt8dHJEM23wMCKiIQTGGB5p2J7R5EfzTIwij0zB8IlOB/KN9MmLr/la92wWLsdduZT/TVLZEdK4lMV6PL8zv8Cc9+pnBwnPcqn0mG6/SL09+CAjk6S/Q3bypeAIymgYg1p4wZvD1a37lbSMVyOvxixx3CcSwClSCcqloVnhson8BuFNxcIOXaIMkeMd5aEbG1MjVUydp9Lr/djETzJuoZTJ7dD8B6n2oxsfOY8ANjshzMhTCitWOZPeOu1lmW3xzyv4bv+2Xy3yUw/bkBy5/H6P2/o8x/kyQ8Doy6F522JBcrQc2f1RCcGMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=aoeHWLRg9GoV2nXHcGWUIDKI9J77WnZKFK7RZWYa/aE=; b=pWyaQoheALi4SoHr/3QvJMZU1ShPO9QhJkKyKoDG7++jjOcKEt5wWZfTPh4cCqoYCDqxOTfVJbpYpalaCzftYIrM4kK3IzBx4XI0k4DdZjK+u12s7mOrrF2l/wbx3pDzuTGpbhTpHnT6armrL2xyQZ0o8Lnfj/UUC7EYfUW9n0sz8d7pWwNBgZxU2oQMqeoqck2Ww3gk4U4StcF58wIRZcAwdci0r6/TrwSZKrtmVypqpGTPBIKfrmT/GOmRhpklB4ZSA6vyLmyydCJzpfg7wUGEPNO0eG/tfzD5CoAZ0+Qa64tIHzqTm/ZK7Uue0YvnUqY4tZPSoQMMltxoJvk7jw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oppo.com; dmarc=pass action=none header.from=oppo.com; dkim=pass header.d=oppo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oppo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aoeHWLRg9GoV2nXHcGWUIDKI9J77WnZKFK7RZWYa/aE=; b=Pq7xH7jio/50a0YkkTqu+nv6Mtc/ko2gsF8pR27OM2m4NAkPioIe3g4tXp4I+vQ4ZumLkmCHVNdniXfS9DxddZE2EKfOcjOEVsQPym1UwU/O/aiNrS9ZxYdJQu/N0/tYwNsalzIA2lKDjNHZLHSkz7VX2pSQgyhoWiTOSKu8h80= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oppo.com; Received: from SEYPR02MB6014.apcprd02.prod.outlook.com (2603:1096:101:6b::10) by TYZPR02MB6621.apcprd02.prod.outlook.com (2603:1096:405:28::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.20; Fri, 12 Jul 2024 02:01:44 +0000 Received: from SEYPR02MB6014.apcprd02.prod.outlook.com ([fe80::bb06:c283:a50:7796]) by SEYPR02MB6014.apcprd02.prod.outlook.com ([fe80::bb06:c283:a50:7796%7]) with mapi id 15.20.7762.020; Fri, 12 Jul 2024 02:01:44 +0000 To: chao@kernel.org, jaegeuk@kernel.org Date: Fri, 12 Jul 2024 10:01:29 +0800 Message-Id: <20240712020133.140148-1-shengyong@oppo.com> X-Mailer: git-send-email 2.40.1 X-ClientProxiedBy: SG2PR02CA0009.apcprd02.prod.outlook.com (2603:1096:3:17::21) To SEYPR02MB6014.apcprd02.prod.outlook.com (2603:1096:101:6b::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEYPR02MB6014:EE_|TYZPR02MB6621:EE_ X-MS-Office365-Filtering-Correlation-Id: 64907992-f676-4a13-878e-08dca2169474 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|376014|366016|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: FLxWv8lJDVenINdyTXhnWxe9EpyJ2i83H+Xlaw/JXEgeNSNrUmx6PHH48tziwCKIHrDHLed9shdN9EziWdG96zo6oYgS60KgX94l2QMWqqw+YiQCelWL3Zqye5nZz9osfHT3p+P4lVebbhl5CP5a+7sD/uNKM8EzateoXdOYTB9UoWmCeYWrTWI29x1eialFHFZxT1LUfvv95YMgE2G02YF7odL20HdsDA7ZFW3zths/WricqLxFPDhJYVD44olgKpQqgijWv5yuCLSVLQXhjXwAcQpv4CvNQR0U5uax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gX8nDLpBMExTLYFU1PrMHk2ZZhJ82rTJBUEwNXBo+scdkgLkbAnRMzZZDwRHtuuAWQ2WZK02Mi7sA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SEYPR02MB6014.apcprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(52116014)(376014)(366016)(1800799024)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: BozJmTmESF1Gqb61ZLrXB9OUhwge0J6Qo0lhdhvzOHc//o1BvMS/0HZ7iLOZsGkXMR9+9gMmzkmJ/mZrHn0yI+t5Pea+nCUNZKvdgOzFtqwXVpAIMN+qc/pZXkQ0pK7L8LMyPWYaKwuF4uQsUdNQBBg3Qe6SqVgFHwqprp2W3+oofuNLR8Nig8UuEZVLWNRin7aNBvUij/uvr6VKxTI2UeauJeGMbmc2AEarvKMxg7SmZh/WsrcZbujwcLl7iQR1DWDqJ6BQ4Clxkvm6Fe2OIHbEobjJfoqz8kNXiRSymYsumYHvKlMDUM0Sr72cwRmF9rgkxD3RzK7WRwPG+hQfQdEpv6/B6cWcVPxm32MR9qK7WVUI0laOn+S1i0AgZKTWCkFgTA0btIHsKEkU0KdebhvmWJvLraxYC0jQSXtdIXGKa/aUF4lfVHMhJsJDHxmLHpvOSB7qpNzDfxNzwwOJdAEbjsZVUqS6Ah6PPBKu1Zhqau0Ns8CVmHou97hqr3oSVlzHQXdlV7rnuMmgLhjuFzvvK6ZEtpiYjXs2NLjANuirHtymU7ha8lE7bdZj9TPTZFkcPbTZa8csbwvRzOQ9wvdPoHOq0cJAAeFA8SCBUgBLq2TwCTbGuarI9cinxfC1ZcIafRxtvofASPvZh1VAx+g6McV5v3XPgZJSFY9B9mW+y1htpmyPDuZETRX2+cGIvTs0+Xg+oOpmCKsvAqQz6h4OMnRc5Gc1XuaEtjOEAIeVVVT5mNFKudQjYhxVoI89UyOO3hSekjLe8UqUUUBdWPCEuOVDsP29x9uvbXEtOuQzGf6qbIq509moiycOXpRdEr0dTcWhAHcWWFzWprreBIlXw+2qGxjLE/Wp8JI5a0bTX0owcMJVfnY0VfW3io7zDZdwiruJ5IG33ZlaKWzci7R0urLS2Wynpzxvk23OtL+iYsm8jPo9OBtD1mqvTfQIeddwfGllVE9cV4oO6KqQp4NhGsfaiGV8wyVS+2k0mpIP9TN6lNSddlvNW+ofUUhCbFDEPS7fwamMpUAcrGKjatEr4Bise60xNctR8fYewWQXIpVOcWi/vHHGzukLuEqzXnOj9J/3q/BnAeKLNWpogx19VrBz8FgV+yJqsa4SJOlQTBssmrdXU0AjFHrRSGoRN0bsUDg+f/m1e2piQJn0bTmXc6HvAM0GXgQRS8VbADrol4px1BXmtmcqWzHFGxWoNVZLi4rVz6TCshPgaURBGbUZhnli6eK5bA9fmb8AJ5kilaVVXV65Y/t1A7Hf8pmve5AV9GPogHnlz480zutw1aNroYsafdZN7j7lFoe4KWhnIPtvugeEavNK0IqanY2bIZfpPqjjFkheBWJL0XyjJGDfAVfp4vcIHtRkIFqJpCM3Bx8fBlPBCN4+oSAX7wzK7Fr46Hp/+48+fnPGuUblB8/cmWqm7p4qqd0HUpl8xFde4RokUuQgLJ3Bfxe7Ut/4Q591ltNeNfgBDNqaDXI1FispDqYl59+l3b39my3tCtFrnUxUVPJVRCrPVVs571ijLiHyf0i4wMStKeh5m8n/kBoosu6vmiCC0QS9NdIahWWPHjShhXGd/QtuEA1zjwjz X-OriginatorOrg: oppo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 64907992-f676-4a13-878e-08dca2169474 X-MS-Exchange-CrossTenant-AuthSource: SEYPR02MB6014.apcprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 02:01:44.5182 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f1905eb1-c353-41c5-9516-62b4a54b5ee6 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: vQU2qp0m5BIyHvXER06jJ0mFnhWucFpdFzA5fwycdxQJc1ikp8ydSBKc1NNNEv38ZJMIU+V5bE1NQ7T8C4ELgA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR02MB6621 X-Headers-End: 1sS5bi-0003QU-O0 Subject: [f2fs-dev] [PATCH] f2fs-tools: cleanup is_sit_bitmap_set 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: , X-Patchwork-Original-From: Sheng Yong via Linux-f2fs-devel From: Sheng Yong Reply-To: Sheng Yong Cc: linux-f2fs-devel@lists.sourceforge.net Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net Remove redundant function definition of is_sit_bitmap_set() and export it. Signed-off-by: Sheng Yong Reviewed-by: Chao Yu --- fsck/dump.c | 2 +- fsck/fsck.c | 12 ------------ fsck/fsck.h | 2 +- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/fsck/dump.c b/fsck/dump.c index 90e3e0e93c61..4c1d4d3cdb19 100644 --- a/fsck/dump.c +++ b/fsck/dump.c @@ -660,7 +660,7 @@ dump: return 0; } -static bool is_sit_bitmap_set(struct f2fs_sb_info *sbi, u32 blk_addr) +bool is_sit_bitmap_set(struct f2fs_sb_info *sbi, u32 blk_addr) { struct seg_entry *se; u32 offset; diff --git a/fsck/fsck.c b/fsck/fsck.c index 7400dcf35a11..e2fb042d3dec 100644 --- a/fsck/fsck.c +++ b/fsck/fsck.c @@ -633,18 +633,6 @@ err: return -EINVAL; } -static bool is_sit_bitmap_set(struct f2fs_sb_info *sbi, u32 blk_addr) -{ - struct seg_entry *se; - u32 offset; - - se = get_seg_entry(sbi, GET_SEGNO(sbi, blk_addr)); - offset = OFFSET_IN_SEG(sbi, blk_addr); - - return f2fs_test_bit(offset, - (const char *)se->cur_valid_map) != 0; -} - int fsck_chk_root_inode(struct f2fs_sb_info *sbi) { struct f2fs_node *node_blk; diff --git a/fsck/fsck.h b/fsck/fsck.h index 6cac926037bb..79cf08522873 100644 --- a/fsck/fsck.h +++ b/fsck/fsck.h @@ -281,7 +281,7 @@ extern int dump_node(struct f2fs_sb_info *, nid_t, int, char *, int, int); extern int dump_info_from_blkaddr(struct f2fs_sb_info *, u32); extern unsigned int start_bidx_of_node(unsigned int, struct f2fs_node *); extern void dump_node_scan_disk(struct f2fs_sb_info *sbi, nid_t nid); - +extern bool is_sit_bitmap_set(struct f2fs_sb_info *sbi, u32 blk_addr); /* defrag.c */ int f2fs_defragment(struct f2fs_sb_info *, u64, u64, u64, int);