From patchwork Fri Sep 15 09:04:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Bo X-Patchwork-Id: 13386612 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 62CB2EE6447 for ; Fri, 15 Sep 2023 08:57:14 +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 1qh4dT-00069R-Kz; Fri, 15 Sep 2023 08:57:12 +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 1qh4dR-00069J-U7 for linux-f2fs-devel@lists.sourceforge.net; Fri, 15 Sep 2023 08:57:10 +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 :References:In-Reply-To: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:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=8UUWe5urIBbJ2HGc1ajKJGq804H0It2/jj4Q7YbkDr8=; b=gLEbSyxsIPjTo8czlOFgawvYqG tXWI04rneQRyySrFwbi2xgyadKYJES178XpCHZcNiap11AKJDnjDVla2ZZhupSEcP0XHzyVxrQLWp JjF5XC8COKuM+Fp2HX9575iTVm+K5bh6KbIk972Ury9R4GYBm0bNP4g6hWYbhw/RfAl4=; 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:References: In-Reply-To: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:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=8UUWe5urIBbJ2HGc1ajKJGq804H0It2/jj4Q7YbkDr8=; b=VkXTvlWjyNbnZhO4whq1LxrD9V UPpRUmmew/R4/Ix58pUo+0CA+uomp/kxbMtUprkuQAquPiL/klXz7s3oaOqBqw6ONO5b8PTyzMh2w Xqttg4BsfO5nCe3ERIvrDLj7eZfo3rlJ6+C7ubP9VGf4szbulmt5Qu8fGKax4btq6UfY=; Received: from mail-tyzapc01on2109.outbound.protection.outlook.com ([40.107.117.109] helo=APC01-TYZ-obe.outbound.protection.outlook.com) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1qh4dR-0076BY-T4 for linux-f2fs-devel@lists.sourceforge.net; Fri, 15 Sep 2023 08:57:10 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fsYyvqW6QzV1pV6fsdoqsWJtnJkLoKN1Ja2xbKho2hdcrigKHOzCM7YnoIaCMI+ZL0na6wrUsFiBCajvOqDtYZ4Cm844lAKMK6IrWjMyCeckQkcUIv9Tehpp/0D0G8dZljKNBZ/WzVZGbq16SOSZ3TENpD1Y1eQIc/Y0jdNYQ8flxk9cZTZBUjJIuZsCoaS84OTMJk4CMjPn+XpT6RDSeVHHWe4WSBybcGmBhxKXAw+Vcn9xg3ZxKYMtYyQo3alQpAPJK3GvVNLQslUMxMSl15+jszUXSVHg7yIcqaX9hO7tBUhjqaM4t2WOmt7TUwc6kbvtAlBc8AwRAaOFsGkyuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=8UUWe5urIBbJ2HGc1ajKJGq804H0It2/jj4Q7YbkDr8=; b=nLjP4MmdppRauD24Md+j9Y3VpeBiXtPLV3bNoQznm+4g1kPXw6GiG4E52ASz07YuS/PnEN/51naCXBy89fH3jqkfaVfCLlRO20STqPcFrP4yyTzsecvGV2jUagZ0b8sUWPu7UrA7jTLBElNikagS5M3LKgXTQq+0TmWTWEhNKzVG5wfPOP8znlRJDc2jtpo6lST2HWMBw3ljnSNRgq9jKnjaOANERFQMkMu1DVNJtdYsJYT9Ju3WK+W5WAiaRvCX5A4AW1/7WEY0AjPkIWtOJ6h6SXMLNObuYfuFrrIBF1lcSxqjj32E6OUZ0Fs+dUdT/oyCMWCU8EF0Qf5MmeYy5Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8UUWe5urIBbJ2HGc1ajKJGq804H0It2/jj4Q7YbkDr8=; b=ayUFBINYB+L8eu3g9L83C+TLB/M06jGuFtPJbznVuNxaXIoRMjkosWl6Px2NGOjYggzI4ySgoSkjcEkarrJzg1L7dnkoOtFxvbEjKdsrY2RsyjmPLjqbU4oulgBzYuZ2m71cv2QGE63AW+bdMHIDXTJTJVvvQTLWgujJjHKxzHGnhVGtAtVrFSkjiJeuFSoW4GhvGH6hS9mqUqE0u9o2cA1CpRPL8sD3JLvMfk2bfC6df+DRynchVGK8Pnu32AD2L9iutFVUH2ZANVlagFF4eec2e7f3HlYEVRX/c+qtT2mulmO04KLDmY+BKe2Z/0i7MTp5ASr2cvYNO3JNijmHuw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SL2PR06MB3017.apcprd06.prod.outlook.com (2603:1096:100:3a::16) by TYSPR06MB6693.apcprd06.prod.outlook.com (2603:1096:400:478::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.20; Fri, 15 Sep 2023 08:57:02 +0000 Received: from SL2PR06MB3017.apcprd06.prod.outlook.com ([fe80::deb4:b884:ed42:e52e]) by SL2PR06MB3017.apcprd06.prod.outlook.com ([fe80::deb4:b884:ed42:e52e%4]) with mapi id 15.20.6792.020; Fri, 15 Sep 2023 08:57:02 +0000 To: Jaegeuk Kim , Chao Yu Date: Fri, 15 Sep 2023 03:04:44 -0600 Message-Id: <4ae9a0c9657efa47399953c6d8a5cd28135bc3df.1694768423.git.bo.wu@vivo.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: X-ClientProxiedBy: SG2P153CA0037.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c6::6) To SL2PR06MB3017.apcprd06.prod.outlook.com (2603:1096:100:3a::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SL2PR06MB3017:EE_|TYSPR06MB6693:EE_ X-MS-Office365-Filtering-Correlation-Id: 92a259d1-dcd8-4eec-9e8b-08dbb5c9ba1c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pNA7iFdelLDwp7iKnVxo5jxrfEcCIPjNcSPBfxhi7YjWj4JdmRGLOme22zHE06BbXtDH9147XHgGef1REWdNuVXAOKByin8RKbib1+Ido3RYpKtv0+H/ZgDCmhGvAh8KMRcI3TC6WfANnyuIdv0PybrCOsr+x/1/pE3Z3uQb0yA+59QKRJdLSnSv6DZyM6WpNBuuD4xMXTTNt4JMHAWyOiOtd+OcFWQfA1ROeWunUoR7hEe4K2fU+QaiLogtor55ayOSzQoX7A4x554vaEgmWK1mev0I3iJbBnjcEhw7owzm8ALGjAt+pIClCAoDtOGh0drIvIWSUS84H8k3nnxMs61+0Wta4cFzHmcCndAcnnMNJ4FtoWAnrzjv8ajDfwRJ3DyhqRaRrGEE35MIoNEAAVIA32NprYnd5ki1BEWYgCRaZhBaxVKrQ9hCoV4Ca9lR6OjZMR8NRhUipK/SWgFaNFAwegYqhSR8TwZlr2sCzUGTMTc7fSLyge1WJzLXlxmrk87CP3JXuegOAbN+HJVRF4gheNeNrtS+0TYzrLV5q0wlg/uc98fsvlH395zmKU0+AcHckB9e1CviONKLN3m2BGYQxfQFd7iuV81dhKn0hDvgv0feZw1RFNQDXobzX8Zr X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SL2PR06MB3017.apcprd06.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366004)(396003)(346002)(376002)(136003)(39860400002)(451199024)(1800799009)(186009)(86362001)(6512007)(2906002)(2616005)(26005)(107886003)(6666004)(6506007)(6486002)(52116002)(478600001)(38350700002)(54906003)(66556008)(66476007)(66946007)(316002)(36756003)(38100700002)(5660300002)(41300700001)(110136005)(4744005)(8936002)(4326008)(8676002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: o7zLgelP0wD+8m7+V/WlmTB2ivgd/URhli6UvBRnY9HdzWSSjwiGefu0HgxbNQYDEAFhxpZIAOKCpPdYNPq8WJn1SYuhyTcLIharG9lIPI0lcLkJCUSalXJWZ3CyZzStd2Xf7KovPuwIa1kYNxp+Ly0Udc86Bv/ALnzVIN0x0ln8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jwdJtRG21L0GF9Vap2eih0Tt3Xc/OsfC0aW4FhaLUkgDOUbfxnBH19qaMXAksqPPMdvB2nVmP2iv4hUwz9HFjpP+i0D90lGEZzlEf98+JPASmitZQ3lLSS33Por0Q/EbISXJidi9oY9lIZjeB/daBi+OOv8umNtHlXOxIaUCdN8GUugERirxgjB9O5AxPIXeWNOFcUUWd50q5CtkpqfH94KEWgqjoIvZamBc1jllAAzYNgYb7xchzaLMxSuVTdooGLl3Y0DA6Z9X3JNaSimgBA2l69OxuMFWC70wUU0118dzQgr/5FiT1Q2U7/lzDTnnKdmQnxLiQ4LkifJ X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 92a259d1-dcd8-4eec-9e8b-08dbb5c9ba1c X-MS-Exchange-CrossTenant-AuthSource: SL2PR06MB3017.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Sep 2023 08:57:02.0936 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: kefRdS6t4Ot+6xEb652bAcbGSdu0wOcZZwATqy9ppTZ57log4ZuAqAmzrLIeGDUXcKx40wBnFp6splv2Gr7bJw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYSPR06MB6693 X-Headers-End: 1qh4dR-0076BY-T4 Subject: [f2fs-dev] [PATCH 2/3] f2fs-tools: skip not matched segment when finding free block 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: Wu Bo via Linux-f2fs-devel From: Wu Bo Reply-To: Wu Bo Cc: Wu Bo , Wu Bo , linux-f2fs-devel@lists.sourceforge.net Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net If the segment type is not matched, goto next segment to save time. --- fsck/mount.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fsck/mount.c b/fsck/mount.c index 00940b8..dccaae2 100644 --- a/fsck/mount.c +++ b/fsck/mount.c @@ -2854,6 +2854,8 @@ next_segment: if (type == want_type && !new_sec && !f2fs_test_bit(offset, (const char *)bitmap)) return 0; + if (type != want_type) + goto next_segment; *to = left ? *to - 1: *to + 1; }