From patchwork Tue Jun 13 07:51:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 107183 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp384999vqr; Tue, 13 Jun 2023 01:27:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6yTO6r5mbYpX7Lf/nVwDJuFwlHg13fI+TvUvrv5Trkh2BCCymznmTrz607v7/w8gLAxOTQ X-Received: by 2002:a17:907:3182:b0:974:1eb9:f74f with SMTP id xe2-20020a170907318200b009741eb9f74fmr10179400ejb.15.1686644832879; Tue, 13 Jun 2023 01:27:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686644832; cv=pass; d=google.com; s=arc-20160816; b=XnOO3+8feF48eHQyGiznNEfEf8yDvO63ZK1UzKsQHqCavKi1vYqz+vjyCloU/GHg0u b9hT+1C4f0W23mKhcEZibktHSU1Uc7hzTuUpXP/TapwZ9R+a9mrBGH8pX37D3i4tT73c i17qztXkwrVuR6bhGUyh6Y/WFZKGBN4AoDNJhfbL+lQouyNyJoPGkOwiY0tuBFlrctmr gu0+kPA4pN6KcxMlDYcy0LbMiJ+T0YF7Sa12Nd4mLaCHmo7zwe3D5cdWAKi8K4z53XZg hv5RMqWWmkzrViYwbHxWpAfr2BnVbCmipHqvMoIP5FDlydscyPGqb2ZsJGUhenpG/wOt +JpQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=SW4DcOoc1clDIkyQR7TahMkLf+jWstpfGElZUpW8uD0=; b=vEy7gPv5FTfTN8yXQhjjKzsi8838A3kVqez6xPGw4c+1etZIl2bLU1TbLsXcsCHdGW kqfKHQ9eUkx0d9oTFTwCacthJpghVLzQwOHTXbmUYg+nOrnGmL8xHZrzyKN+zebXBCiA i7X5Rh5YMMUA15ICjs2fu3Kl3PXLBuzgGFgVJTYWOVYlo93gkVXcVkEcsHsqpM98CXea SxJ1M9yl9ofz0XLovArEwMTjg0YSVjSbfD2GGnE4qJ0/4sa1+Q63dmYiDBqzqe56Gwj+ cmcx3Bvo2uEz9tWdIJLihB3IU82PsS3k/CZBHFcd8Mrj+1xwEO4xFRD9WOaCxXjFCeEJ udlw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=lUR+0CQ4; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id si26-20020a170906ceda00b0097488f56babsi5709426ejb.101.2023.06.13.01.26.45; Tue, 13 Jun 2023 01:27:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=lUR+0CQ4; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240504AbjFMHwT (ORCPT + 99 others); Tue, 13 Jun 2023 03:52:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240365AbjFMHwP (ORCPT ); Tue, 13 Jun 2023 03:52:15 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2104.outbound.protection.outlook.com [40.107.117.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3237E7D for ; Tue, 13 Jun 2023 00:52:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=COh3ZvLICTasRQyM86+0rnzPAPHIQPU9znWBJrSsZHkZQUirN0ituDNTp6OWgxU/pU3J1lD6EkG1a+ujvQq/oomwcKOvR95Z4YvigGofKU1xegc10SHaBhUu+n33g1XJCjXI+tx5dsC1LonyszB5DtMCEvgUaUdJHbDNrUCgmd/Gw0IPL0ISszGwpMy1aewOo7l3tdc/pEfvWo8chtLYQZCKrBdG2hVj0Xg/0wlXcZJnQuKbpVmNGKScqijqEOi8zpVO8NWljpYrlD4GoVeAJ/F8GeaLn3x/o2bK337q39DfaF/pOk9ofUe7UXMH9+FqDe41qbR6uUgm7R6JFIkDUQ== 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=SW4DcOoc1clDIkyQR7TahMkLf+jWstpfGElZUpW8uD0=; b=lBsk46DgtykougCbdjC9rwLT+WsD5voZIi6e0pCYDol3DedRexpljevpTnBz855/PPrITmFIdKhiQS/d0CfeV9yJncH1Cp6pd7DhBYeuYHFyJPIvj4naihlIdPrfvr0rZyZxUAXLDRB7DUTmhynFwDhxHvse292g7M2rKvThHoU8wy8aLM3t6Elhws5eAGZWGjCPNexYywhlO3IUPLOKPaVzNJdBfq6KGRN3QtXlsZPIcrsfUdfiSLq5ZLA2tFWeigm6gbcnzJsFQnGBdP1jAFzrtqdEM77uJuHALZdJgE5IyofoMv1/tyWmeenRZ+UFOxHU5K7WgnriB/5pFu6+7Q== 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=SW4DcOoc1clDIkyQR7TahMkLf+jWstpfGElZUpW8uD0=; b=lUR+0CQ4YYXv110jqAGcEvlL+/R67dNJPfm2M7sfqKq0nudm3uUMxnBoEYVrwq7LfouOKk+RBcjjT/nO5rvVc/XnjaoyIpUAVQfp+QRy9z4sGckTKzov4iVEo5mRxAQkarBWMvtO3gDR8zYN20P1hTpdz8MJ6c2ZBFmsGARg3pjzIA5sVpOLonvXf6IS4IMCJMXeTNCAVFuTumGttmiq4yhOJSPNnp1FhwWcbVc2Vh9LE1GGbXKS4hHINIPCN7zYAJkEcqN+icJaeBe7eB6T6U7BqlALUJHCWpdo0jAfbLDiVpy4N8s/Z+vh4WANGWtE/IZ3MbWUU0v1BIhfuV5XuQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by SEZPR06MB6572.apcprd06.prod.outlook.com (2603:1096:101:184::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.31; Tue, 13 Jun 2023 07:52:10 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::76d6:4828:7e80:2965]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::76d6:4828:7e80:2965%3]) with mapi id 15.20.6455.039; Tue, 13 Jun 2023 07:52:10 +0000 From: Yangtao Li To: Jaegeuk Kim , Chao Yu Cc: Yangtao Li , linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] f2fs: convert to use F2FS_SMALL_VOLUME_IPU_POLICY macro Date: Tue, 13 Jun 2023 15:51:56 +0800 Message-Id: <20230613075157.41065-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 X-ClientProxiedBy: SI1PR02CA0032.apcprd02.prod.outlook.com (2603:1096:4:1f6::12) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEZPR06MB6572:EE_ X-MS-Office365-Filtering-Correlation-Id: 4c942304-0db3-435d-2561-08db6be31758 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2vPI/VSErlUpMCN6mGFnpY+Q+jnUpTV0FpYgze7sOlHDCQyxyAII7m+kSh3Y4UKboxJFtMcmL9keG1NFfC1tnaZytrkSY4j4Y6s+sbiSQjRYk9DzVAPb5QdMUi3x93x2OoBxwXV8oU/N4242pCYJ0W3kh2WM3pSkEfwapi+mRIZdfUGsx9wlMRgHmlJRLFQ899FHsX47LFuslj2eWcbAmGnLhF1hP6rvf2hXKYqcTo69S3erJZUZpYF2A8IQaVHLbNkuWWXTXbIRbIhHfj1wksgVvJN2x6QIVpEcPclxkU98gK9G2HIOu7VTTe95CI+CkycicVD+KAM1le2dIk1EFbNBlsa6ZfnBYmmwKH+AXPhjIjwXdLxHxSPISfUiiMocwYDaeMOmoqvPU8pK+IxYEbdwIHHn7CZxWVn554CC2Qe3FclyRtHkg21P/AaXjBJ4TOW22yBN6eaPTfD2wM4toJUR04teIVY60/myRTE5jVyJ9W/DaVuCcKUXBJLb77JhjAAQNWfVVxfC/kr3w6UOY7NKC5otMKcP0htkzS6y/oIXKQIRdMk+fP3oo/Y4j+dJUE74+o2mVHukLrsUJTZY/NNmcCoGJZwggfC5Bkvhwx0gOa07tXdDAk/K14NpiFKx X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(396003)(346002)(136003)(366004)(376002)(451199021)(186003)(52116002)(2906002)(6666004)(83380400001)(478600001)(1076003)(36756003)(6486002)(2616005)(38100700002)(86362001)(26005)(6506007)(38350700002)(6512007)(66476007)(66946007)(66556008)(5660300002)(110136005)(8936002)(4326008)(8676002)(41300700001)(316002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 46Zj3cMloDWuxwXHbCtVrhOOlOG2k8X4KiIq/D5kC6/Ematfh15jZ4DKuBHlzpTvzqOlJKgPrfcxUrxdR43kc7ZW6ohoj39zNji/xE4Ig6Ypuijko222WsZajT5JY4cc1j/bx8rdvCjp2drrm/HMffpVBiacDnx5eB7/rYhLRz06Q7rfdTAZR4j/LSWxW1JS4JGKopcD7Omwb3dMA2dMjIfS12JGyRKFKAR6+tQiMVpOtSUNbGL63sqbr1fAUAeWnRBdusBQDVWLYS2znhadJbvMpMt+nH37zPEPHTUEN3eC3nT0SXyp0HwuzDkrZN+GjRTfRfPV58ZkRDmfRbtwPnUhjEFIkWuI417aKQQuVYzUNeeJZcqRFJFY+6Ny4zMTqFroBK3eLZJQ4YoTDJ19l/NL8YdIE/AZFpCTLHsmxWBRXqDDnJjmsMsDbCgAyetUvYN/WksoE7qNJLseZon1u9LeBKHItkFARoX1+wiy+SrQBJK+1lnrfV9JNZhDx0LOa+Yu1SD2y2EYPV6FlYWRvSZvP19QJoHuTt4HX6AbYoaLgGfgMVKq1kwp+gF8jHWR8ywY9o6TaA01fmbHtj25o6QMgfoRp/8ldZGniWU4QQWn755IZBI5ddfEjQXf2yUlcMKFaYkOzm+o79LqR+F25Q7T8mbvGOtTEldwFXNAFwCbSiWrUgPpZcIwJnlEA7fl74WO+DXVj4C1kjuZ+xEguUhikY+Nt6+BikOktla7GD5fCkbAI8x7bdI5d+Nmsp9UqU+OXLj5FX7ad2OZcyjwb4rfuwS7ViWjRlYDq5v5B7sqi5ktjenJt4fGNgkzwjAoAHlkbmBMMMDMCcSCQu8p78J2cjrUgrTgq0LGiImStDYR2NKm+oRN3xSlHWaZVDvPtc9vSvCXQTIWvKJMjDt6MLt9A6F3AM0h555eIuObdrueSkrkl1jBlOcveEmEaV1NR4PdDqfFq4NSy+dohzevPDQJT08l97VGWRWQDoshBsuWhTrlOFkhxvpQL98f+uMUrL7oWnXdxcwMXiH4REJ321TZBxa164KQK2jxUDZMHVJZS1Xx0Jp2fwEEZvCdXNUXa6oNuQGmSqKvw75ZK1tbYUucvyGIPqjtwuzCou00wxVzLOM5cvP/DMFop5FZmJmdcQBPk2naajOlPE2cN9VNk/Zqno1y9Msn5S6o70Up8YX6MHeNCN3icH4Jj61o7wwcn3aXs+x5DG5YIolqX3WOhOODR8fNZS35X+dODVJv15X9gYKkICMmUsct8HPbHm7O+FTko2Fslyj67Scz+cqQUtR63J75YWCBGiXRbnzpcxV9gkbCeUbeYRegf0jQS9Ub1jL8F0VXP2Cl/4vOBczXgFmQv6DpKClcMqd3zXZbjcF3dso2XknT6A6Z9FQActdoqGUAaq8nY/8n5xZOMkDryvsCYvqQ/LRqQbgmRNS7eEpI1PUcLxDcy/NGlunRzhCj955gWXMVZBUudBYGZ2K5oxq39W5ff1qZgQHfFeIIgT5b8kvk7zENQjQhP315hmUr/NttGmwTiFYn0w7OftkueVKAbpGswcTdR6AnrbVlNxqWpkYZp1TnN2z/Djj/KmpY X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4c942304-0db3-435d-2561-08db6be31758 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jun 2023 07:52:10.0159 (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: anRW8rs3XoDcVjg5pdFiylXah5dRujMsPqe/eBTpMjybpfPM93e02YJDXXCp0/PBjDdVUx0rqL0AY38c7Itsdw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB6572 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768575292640759196?= X-GMAIL-MSGID: =?utf-8?q?1768575292640759196?= Just for cleanup. Signed-off-by: Yangtao Li --- fs/f2fs/segment.h | 2 ++ fs/f2fs/super.c | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index 2ca8fb5d0dc4..28ccbaffe546 100644 --- a/fs/f2fs/segment.h +++ b/fs/f2fs/segment.h @@ -708,6 +708,8 @@ enum { F2FS_IPU_MAX, }; +#define F2FS_SMALL_VOLUME_IPU_POLICY (BIT(F2FS_IPU_FORCE) | BIT(F2FS_IPU_HONOR_OPU_WRITE)) + static inline bool IS_F2FS_IPU_DISABLE(struct f2fs_sb_info *sbi) { return SM_I(sbi)->ipu_policy == F2FS_IPU_DISABLE; diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 1b2c788ed80d..375a178540d6 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -4314,8 +4314,7 @@ static void f2fs_tuning_parameters(struct f2fs_sb_info *sbi) SM_I(sbi)->dcc_info->discard_granularity = MIN_DISCARD_GRANULARITY; if (!f2fs_lfs_mode(sbi)) - SM_I(sbi)->ipu_policy = BIT(F2FS_IPU_FORCE) | - BIT(F2FS_IPU_HONOR_OPU_WRITE); + SM_I(sbi)->ipu_policy = F2FS_SMALL_VOLUME_IPU_POLICY; } sbi->readdir_ra = true; From patchwork Tue Jun 13 07:51:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 107166 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp372009vqr; Tue, 13 Jun 2023 00:57:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ47QJe5vswbn7y70hSsZI1r6NJLhbpryxepQGVVtKW45WG6lN7qBFamQ8c5taHNPTwy8CYs X-Received: by 2002:a05:6a00:15d6:b0:659:3031:5037 with SMTP id o22-20020a056a0015d600b0065930315037mr14814194pfu.3.1686643051652; Tue, 13 Jun 2023 00:57:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686643051; cv=pass; d=google.com; s=arc-20160816; b=BXM4aGhRWPNIwUaNN5sKLDUHZFBtg3gtq+CpAa4y9ekTpDTMjx3MTRk5y9OsNQ00J5 lkK59A1y10s/meZy8Xx5WC/nSkAtwFkWPInPug55HtFzqDDY7NFD29CCStE93qO1ChFX utAt9+dIQGsqH7mH3xepGNMTOIX40AjdETCveKNCR+AGbUw7Uk+cpmZKXPzS39aPO1bI DjiwgiAYK21Y43qBsm8E8ttF9y5zwuYS1DyEHdXJnkfktae4G/4acF1nNqlTRTWimIBh XGNfR1mge4MNN5UQLx5sEF4NyujQe2khQ2vjPhPRjMxg/ZhVkI4Mq7KIAsp9g6qXwqbv 0BCQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=H+3RJUylxZ2BDv8qqONAc27GOdD9mtFjjjMhHozz6kY=; b=U/3HcJfJUUq4bpyFeYTDqKUW110fZR3EXCN/Yw5BAJBCzKHorZFl5BMK/inijUdXZI C2HLJS8iJqIzvle2cjlwMTwdpF+e1O9DRaoScgXgJhvoeFbwVfOxxRgnXwZ4Z6bCPbup +DKkx7cxltULiRYNtZM80997aLjkR/mP1s2O4AYfFnsyx/z5dQUDYo0GSL2oTGG7KTGc 9jNOVbjeJTazdS8FcGQDA508kCHElcQIWvi07MG9Ml+tTAwLO6svrmOO4EASL2WNN1Ef V7rIVQ2zdUnkemwDnuDYkeMf2DlDCofSyQmh9MrNS6k/iHMJnV7Wh3e/nZ/wEAKQHeVt 9cLQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=gtNwDCoG; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s19-20020a63af53000000b0052c688e6608si8274586pgo.505.2023.06.13.00.57.18; Tue, 13 Jun 2023 00:57:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=gtNwDCoG; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240535AbjFMHwY (ORCPT + 99 others); Tue, 13 Jun 2023 03:52:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238289AbjFMHwQ (ORCPT ); Tue, 13 Jun 2023 03:52:16 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2104.outbound.protection.outlook.com [40.107.117.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A300113E for ; Tue, 13 Jun 2023 00:52:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XK7DAS3Nv5zVL4OO9rWRk15T7CvzbHZ0d523/UEbgN5LVikmrJe8XWbohpt+wXPRgBtMYYa0/upgv6aaMF55fLyAeT0k07AjL6IPpgauVUp91Nzs9GHZ/wqRDgDILAYJyj7uqXSwl1uzZzJmGrOKk7oG2umUowZDRVFjYokC/v+d9IGG6nEdmVhd7aK75FqfPCxxjjcS2FawQ59/AG5vki8YiIEitA/wyuSHoBBsZo1HKtESbMKdCzptBfuBXySqvQOghfpI+/LvCqw287YDH3iv6JxKdhDtd1BCfbBiaaUSJbEYYYnbE6UQyV201NVE05ztaCRcUCwU2BzJrFPHsA== 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=H+3RJUylxZ2BDv8qqONAc27GOdD9mtFjjjMhHozz6kY=; b=aFXnNGy3jqo588j6AxXjQLNpIWO2t175IpKlf1m3Dhw9kg4w6Fgxbd3NXUi8X+Vy2trndRtKUDapZ4kCQaWEfx5LI/3O9n4fWlggdNWJ4zlfg/KGMtUMUwqYhF1AoSOVNjCvaeiq3TweuUSSpvacQ4jvbk2SBUgdUUxpqKzOeRQrdLYdF96P2x06sfrN06bD6YWM0ugg3nwN3Ueu5033AwHSkS0NSlP0YKmNyQ+EWT+3NOHWtJzKB/a1yjba2o2nCYgDZHA8y1NtZn3W9w10Od65KTPS06Dqb7/FfP1Drf2ipJZsZzv8WPwknzmhMmQC2Uu3JqoVaKgeIOXwHqQEmA== 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=H+3RJUylxZ2BDv8qqONAc27GOdD9mtFjjjMhHozz6kY=; b=gtNwDCoGTj1Pq60w7frQAztr9femWGtf3Vx4pGuoSqAq7y5xRSzRM60m0xLysVjD6mot79RW8A3tqZNZgJ9jWIOFK0hUmVGrdA6ANGvm5jsrWO7lgBudMKGy+XI8g74jU0MFB3CpB50+JB5agz2oWKlgBCklIs6mphIgv4E7ZWynQMGQwZshetQTNCU6RED9hg/TeTqJjX1+qLHUxYLAxr4V4R0ypWLpR6sm/wyniWiZFWEaHs31q/49yPebe7s0fIVS3FH+p5+MxOkKsAhRz4yEhq4AfIqNUDrcvEVh6DoOjUkqENPnDq8JdXdb5RwhNJZPHw3attxYvFZdJ2QnXQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by SEZPR06MB6572.apcprd06.prod.outlook.com (2603:1096:101:184::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.31; Tue, 13 Jun 2023 07:52:12 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::76d6:4828:7e80:2965]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::76d6:4828:7e80:2965%3]) with mapi id 15.20.6455.039; Tue, 13 Jun 2023 07:52:12 +0000 From: Yangtao Li To: Jaegeuk Kim , Chao Yu Cc: Yangtao Li , linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] f2fs: convert to use sbi directly Date: Tue, 13 Jun 2023 15:51:57 +0800 Message-Id: <20230613075157.41065-2-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230613075157.41065-1-frank.li@vivo.com> References: <20230613075157.41065-1-frank.li@vivo.com> X-ClientProxiedBy: SI1PR02CA0032.apcprd02.prod.outlook.com (2603:1096:4:1f6::12) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEZPR06MB6572:EE_ X-MS-Office365-Filtering-Correlation-Id: 84ea1f3e-9040-4824-2906-08db6be318d3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3xdOIu/EUGY/IOflE+8i7kqofk6CiIv2OdayXMY9oRHExNDazhPprM4dBLH51vXLPG1C0UBJNIQeTRxKJsJT+TgcObYUGbTk5Yf8vGt0qU6Q2HI5zYK/WWCyUyBQ7LlcsZIM66VZ96f7zCtcCHylqpuw+lM1oVs9J5jvl+GbJ/iqByqj2JomvxIgIcHKzwIddYMtRZM/BIYaPDHMg7jsVN/c2+RSMANRIIpwAgqwoBnc7b6jPQD5Jh6aL9GiOJ4fr8wkLte4jhwUqED15s4PRNpLo5gbCwpBE5CRni0xfpcW7XHLjws4wo1DclWtXyK7d67JdvuCX0rJvKnmEyVNLtUVeRwKMXnqtqd0kNv53OJkMQsRkDERFwxvIomLWBTU5SW5QJPvjEbpvMM6QzHaN60vlXC+fSgSAixfBNAOutsqxxgXOVpbeSV0ovM9SJ5ILOmk0vwLVbyB5/MubI2k5Nkw8SgOvy8kLTnaZ2vcyr9XD9lGkikmhKolqtxdA4nxEKx6c+NUgcqtWwDi5zTs6ZB79A/vgeLRJNWu6e4wNeX2zlz+e6avhll6FiariucUxOQFtmoAd8Si+JtelkHDVCMAYiGAs4sV0gRl1OF1gxGpNB1pq+gsNlHp+U0C3c3E X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(396003)(346002)(136003)(366004)(376002)(451199021)(186003)(52116002)(2906002)(6666004)(83380400001)(478600001)(1076003)(36756003)(6486002)(2616005)(38100700002)(86362001)(26005)(6506007)(38350700002)(6512007)(66476007)(66946007)(66556008)(5660300002)(110136005)(8936002)(4326008)(8676002)(41300700001)(316002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ARjeGxjwyEApYyIx5cIGpgHw/hxZrAYrkmqWqNdRJSGtb5aVoaqWUq9EwEIiLyAoH55jBuOL1X2QUoeKqaAcpkUZdpgKu9lo78S9W+dRePzEXU7Fp4TCttkXfKpfuCUjy0Mnoky80OPeyVKPKKFJuLjniIe3qKXoAyntKYGBKY2RXEbORWT3OwVW4hVfWkxG9z/EIG4pjnNaM2xoD+oH0Cfxyb5otDd9R8rqUcN6ETJX1QiZWhRbpTni6k0gQYiAZvHHLzhu5xTyTWa2oPsGdSINQProYIlpC9XIErCsG+S1I2PMJMfznXpK383FrAzuAfIJC7WhiV/36d2ZZatwItxOKiDZV5yCwnMJUg6L8x9rDadrbdyVZxOrbhSwcq4Yy3j55v9rJ52yVuKNB1sPnjXnAvEvNMjUMRtgMmTiBe3eCiL03Cm0P5umvsxjsSvQj2iRnMuxUgFNsX/YvWvR/3RuXTd0EwtGmAkH3eBMxo0einA1PiKIJu5M8T+zGvC/8WJGRhuV0rcdQpJbEeVuf4KzA+VhHpVeL8XHRMIlTl/QPhGd2nRwlWX15SUBES1uzlzIhb3UsC4OhlHuxIhP5onPLFobUFl3f+9x4B8OgiIX4syAGV6dVFSetKvnvs+jOC8TL+sMbhPD10Ik5vGNEIOxASMBzQsifBVhH/nJXMFONPEyY8Um/U+WwlSvk7DStLvHhT3P7R43P8r4iva0crHTRr0gmjkG+bPolSBtxXlAp1fe1LHAiUgxANAQ8omrJDJfutVxDMGUdGD5VVmZ9sK4qhxc0xfZSB27DTGZom9a9lqoYA6lEJOpzRK5sAL6bnIuyt/WvPEakwZu1MWHCEbK9Fz65Y6UaixJ2zpUruddSrdwtfNQPqraDZ1woEyjcGOb4YqJShLmZ20Qi+RyuaHnSFEkA8xZzbVt+UzoivykQ43SXtgJHIhzD+bFvx68z+Yi6yL9HkQh74YhTLuvi5HgsvNPswxaLn/EmXEWQxKsohkNNSmQy1dRkOljt73Voy0ONLI7m0+UO8PMv8eLpdAwPhpP7HdoFMAY/xw6+nixbbvU5fWLkMy/QlytAmSmU0o1one2ceMjQ7d+uivBkClqnbKLv+tM4hd0Y5H1WOMROqQJVrbM9deNrnVjnc1ZADD8undryqw3wt5pQ2qAffgOOuhOVOgwdCdPmcxwvqXZtwLnenijWVe7qWtIOMgfF4u0TiG3RavF6CLbYi04BBrXB9uqWpk9z2SiDXu0FPaS+wsmk8+xaTi6IYIPlFvVtqguvnePAdEg9Y6rh0g9rwy9TxTRQ1dFcoPqtOtrvcVjdFe+DyPq3gjGDn9pvjhzdY6pdKs/jK3fjUTEUj5NFrTNjyKHLtCG+NRklWh8a9cQ0ODJp+dyx19beDWQSkIT84PmkIdRTk9MYHqy+VFR+uztS9EsNDGZfozK5hnrZLuTbY3iO/qpJK4MUSXSn6elN2dmOl2ApHg1hCX30luarHlxbBYvz6xWFkAZo4YN7aJSFjxHgzeaFBsRO6MiY18vVrNCigd3WNDKFrYNVsZAfR48hbHB+VfKVgjWHpEo9oJZTKUd4p1rbYp80Z5xOObh X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 84ea1f3e-9040-4824-2906-08db6be318d3 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jun 2023 07:52:12.3435 (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: 00cfRnIVlkJEqlmxArBE3p0LSycnt8O6NpYpkzFsUyIKEPk+kvb1Nt+wEVjEbpElzpf1D0MKO+JydzhbRt8j5w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB6572 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768573424747480889?= X-GMAIL-MSGID: =?utf-8?q?1768573424747480889?= F2FS_I_SB(inode) is redundant. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu --- fs/f2fs/file.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 41e7c2b80f31..f45d05c13ae5 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -3476,7 +3476,7 @@ static int f2fs_release_compress_blocks(struct file *filp, unsigned long arg) int ret; int writecount; - if (!f2fs_sb_has_compression(F2FS_I_SB(inode))) + if (!f2fs_sb_has_compression(sbi)) return -EOPNOTSUPP; if (!f2fs_compressed_file(inode)) @@ -3489,7 +3489,7 @@ static int f2fs_release_compress_blocks(struct file *filp, unsigned long arg) if (ret) return ret; - f2fs_balance_fs(F2FS_I_SB(inode), true); + f2fs_balance_fs(sbi, true); inode_lock(inode); @@ -3646,7 +3646,7 @@ static int f2fs_reserve_compress_blocks(struct file *filp, unsigned long arg) unsigned int reserved_blocks = 0; int ret; - if (!f2fs_sb_has_compression(F2FS_I_SB(inode))) + if (!f2fs_sb_has_compression(sbi)) return -EOPNOTSUPP; if (!f2fs_compressed_file(inode)) @@ -3662,7 +3662,7 @@ static int f2fs_reserve_compress_blocks(struct file *filp, unsigned long arg) if (atomic_read(&F2FS_I(inode)->i_compr_blocks)) goto out; - f2fs_balance_fs(F2FS_I_SB(inode), true); + f2fs_balance_fs(sbi, true); inode_lock(inode); @@ -4056,7 +4056,7 @@ static int f2fs_ioc_decompress_file(struct file *filp) if (!f2fs_compressed_file(inode)) return -EINVAL; - f2fs_balance_fs(F2FS_I_SB(inode), true); + f2fs_balance_fs(sbi, true); file_start_write(filp); inode_lock(inode); @@ -4131,7 +4131,7 @@ static int f2fs_ioc_compress_file(struct file *filp) if (!f2fs_compressed_file(inode)) return -EINVAL; - f2fs_balance_fs(F2FS_I_SB(inode), true); + f2fs_balance_fs(sbi, true); file_start_write(filp); inode_lock(inode);