From patchwork Wed Apr 12 03:49:40 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: 82242 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp56915vqo; Tue, 11 Apr 2023 21:22:15 -0700 (PDT) X-Google-Smtp-Source: AKy350ZGj219D1QsS3Joi1B0QIUdLLhtye6QU38j38BQ0cbBzkkc9vfCV7DsRGaeGvfVapDooUQu X-Received: by 2002:aa7:cc08:0:b0:504:8410:c7a7 with SMTP id q8-20020aa7cc08000000b005048410c7a7mr13792286edt.20.1681273335042; Tue, 11 Apr 2023 21:22:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1681273335; cv=pass; d=google.com; s=arc-20160816; b=ekWMcKFLbO8cA7gt4hW2uBhiQGPLAsZ3LHD/QtDlaclBAiAaAdQUSINyRB8aKesDTn GCvzHnSpULDnkPnE/niC9oE2qQRKMyZETK3JwDaC2xXg5Ge8sbwWRbwd9DO+obCK90UR ocrbLzDYFmX6fNkei0jpR3Pnk2l+HZeWZvwbbjFDeo0z8/5Ef7mnbKRVs/+Ig6T1Ne07 2MQnH9Mlc4XwY62SUWI8+hm9ySL2ByxjlHPunA9eqirH5izjw+94820JoQ2pCmVfuaRf rV6PAKiy1eQTrV5My66hUFTv/7vxXjuX7Sf8zNJ53QVvQlnuvbVjtLRSYHC2+25STYhb jewQ== 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=cRixI1QTEPcUZ6ZF/jBdS6RZiN23k9KQkGs6woANuvY=; b=xTTe4l6Y41J9bb3PF9zrEe/VPFsMzSz82MHlDtYiqxFu5tM2sor9Iew/KUvPh9wFMW iHUsjHLY6TDuMriUxkQzBY9vSQfEetGE3PxbBcPUi43dIYSvanIzsukHCH0FJi2mjC1b yNC1RG1jYsdeLp0+l3z6NMPZabRtAeXHFo8heAephRrgjpEVcpFbv9uYv0a3arxHpvXK qoHU67ocgbQn71rWdlsWYHwLAV848WLsmzrFBQmUKYsHZSFfEtjWt0rMck5FVJjW+27f jmDajdtTgGiLCf/8G10XkgTKE4LlxxB5NQicePpfrP91VMhBOzzKMudsbQUEAzHMbs5l OXIg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=qwTczu+b; 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 l2-20020a056402124200b005048a2d547bsi9084221edw.106.2023.04.11.21.21.50; Tue, 11 Apr 2023 21:22:15 -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=qwTczu+b; 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 S229520AbjDLEMN (ORCPT + 99 others); Wed, 12 Apr 2023 00:12:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbjDLEMM (ORCPT ); Wed, 12 Apr 2023 00:12:12 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2127.outbound.protection.outlook.com [40.107.117.127]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66D4A1989 for ; Tue, 11 Apr 2023 21:12:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PYKsNZndpWOcHRKoENyTL0PVOFWqAoo1R0oLAbM47d/YmhCTgwq0zlgN6cRM0rGN5TN5ZkRBSb4P6K0ZE6fzaFcfNHAJqerTAxx4PGAo+O8sjIdx/tFCLgYlsStRCc6Y0Cn7jJcWUWZljzVHUL1TQ1F44qpKICfSjdNwYDZEJju/fZa2qF5B6gtpFb3Gcd5YeC8L2yJvbWgPyXlMrD8/RbnYNXOUD9BSyzm+MFZqL0836NbZxecXNJbTmEBAYrrLrHvCqRrYIVEyYTnb/W/EjOPG2N0pmYhsNn8Z1PBFmEJ5FNYfcwDkR4CyzEPot4/FqB2GFEREIu1mwWzPbwLkmA== 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=cRixI1QTEPcUZ6ZF/jBdS6RZiN23k9KQkGs6woANuvY=; b=SquRVkGnpS5rvlerYmbSOm1/SquiLmH8RReWppEbHPVhWFbctmV/59zBS7LtC02nfP043Z6KggmDf5R7s8HfFXkf+MgqTNlma4a3GhUk9YvF/O8LP3/TSSbb0/OpQzzKVZCc5xS5gMsCoyv+MRV5hKo5Tn4Aoiloh/SATi66gUPNWj/kO15E59Zy6WAPZ1jOKs2t3xmCF8iIUV78aCHugJPMqgSAz2AHENq+WA4xnXQ9eJfDK8J+RAJt3eZ9evGgeKrWQjydxgk7/TSLe7mg1ohr3xEc3lDXyZbO5PhnKgW9k/j0bdCaLIX3VzBs0Buue/DN+yS9JG3tqV9l+w+Taw== 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=cRixI1QTEPcUZ6ZF/jBdS6RZiN23k9KQkGs6woANuvY=; b=qwTczu+bXwMmoxvhfWvfe5z5dnJQsNQFri21kXWdjJGjn3MOTP9gwOdhs8f2UjdoK3ZuNXio82CEiT7C7rE2YOpsMlinOh2ZmhGFSTqrvzPYoxGgqMvBDxhb4SGqwbvr5QqF1xSexa8UAWGebo54AMPU8WA3Hw89ueLC65pttK28hyMdUzjqWb1N7KG0N9OeGSUAybj7gZPKeSdnCt3enY1dAsAD/0AWTjYZfFyKSGPII6NIRtNcNc7ofos8Bkqg4XWOyzWG9r/njsCh/Ad73hgEpXjZkCd/Qki+7A/6nilEcD0JhKxMtQEn58PZhnJTZOxT+yxU/7i1kerOa7A0UQ== 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 SEZPR06MB5366.apcprd06.prod.outlook.com (2603:1096:101:7e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.38; Wed, 12 Apr 2023 04:12:05 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::a3a1:af8e:be1e:437c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::a3a1:af8e:be1e:437c%6]) with mapi id 15.20.6277.038; Wed, 12 Apr 2023 04:12:05 +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] f2fs: introduce F2FS_SBI_RW_ATTR macro Date: Wed, 12 Apr 2023 11:49:40 +0800 Message-Id: <20230412034940.41943-1-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 X-ClientProxiedBy: SI2PR02CA0038.apcprd02.prod.outlook.com (2603:1096:4:196::22) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEZPR06MB5366:EE_ X-MS-Office365-Filtering-Correlation-Id: 1df07305-9611-457e-2def-08db3b0c1313 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UlEvkSihMZfho9C8cxVWt+J1xT7d73W4Jigbk/fXuRxCBvrArUak4Jiqk0zj/+dJh5nNEDfC1YAEZP8NOaPqhPeQcYfBZaveQA9vser7tC2eh25OXumBCAMO3szQ9Wxrju3SsN6I26iDr1hyXwxcRSdEw2/YYuQJlsQijIzoN9eksiGVs1gRtpLUsKWDDP1s9FgSKfEa+FK5shj2J1qha4vHeQSbcJm5F5lKhSB6M4IptP8Gjd4aObp7DwUoyDOVsJ/BdBoMts95lSeI3dfhMtczhCkUvE2wKiKkUbb1pWVYZaNtB/zXJvhgsW/c8fdKpPw+8R+ej9YnXCO8+Zc509U0vx0CdQphmdk9q7PthweQRPnQIkjdtHxC2DuOV13PH7KiunZbo5bcNxHzrtSHpaQHk7G896EoRNkxctDFOpEkKh8awj9edr5VkNJYfIsfLD+8Za/1aXCVIVM86sACzhHjMPa0a9mzRvYsEHfQTt42JoZJcoUXrXgB9jMj6eRXtxImCQIChybJqa8q+OynSHOgGESdbXSNPvA+fL5I0nvQcAp2YiA7n06BTeXOUk5YSuLD1VdT1rDiVNtPkTj7qp1BF92WgIPTlA/8kAf4dT0ZDJucTrf3tqGocL4HYsrQ 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)(376002)(366004)(136003)(346002)(451199021)(52116002)(8676002)(4326008)(66946007)(66556008)(66476007)(5660300002)(186003)(86362001)(83380400001)(6666004)(41300700001)(110136005)(316002)(8936002)(2906002)(36756003)(26005)(478600001)(6512007)(6506007)(1076003)(6486002)(2616005)(38100700002)(38350700002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: E/PkfKWycbuZVdQH6M/SeLlaASL6TE7osjBvCM18FdMTFnc6clEff2qiAQm0zxEmGDRhVu9dcOoy+kCImWccwfpX+6OMgHnb3ZjylJ/QfMdXYx5baHFusf7oVIL924AhypriOL7nMwfAWtuHbQqGHqxykQZT69TiJsUXYK9OnzYkHIhHv84E3Ut2k9q+HieHafq4ck/HHDfmnAIxBSrKj0XriwegCrdbkhwzbior5BNmk2w5+LsMR1UKbulcmkGY+rXqrckuNlW+7pYPWGBeoP8GdRHNVLvQSGuA9o9tfz44euMKB8T/hbVdoK2hM6GZGPRvYe4BnZN1G4UKE91aQx4bsnLmpVG/GbPvz06XiKaf48StYO0SUfr3SW/NfhssXv/hr66iU54TAstzYf6+znYPH4fMfBUsJMwuhAIcPNIKvfLQobGfgflsRcAYfeRIdfdCW6uurt+ROE4mXtNPYbd2RUdDVgqUtAtLw8f+CcoZS3SFr4cPu+sBKZee1cTvqppvWQAhLaShuLER0/l7cY98RlGjrG094AEPSAxuFqKtLePZ4jhCxct7zn9WDrV5MaSknNWkkJ/GMZTP0f5AWdZ0K+lueGkv2Xk1cbCe9LyiMHC7JBubTGr6kT+EWvPYcht7FLlw5WkpCsfEgK2okpCwUAEdT0H5ALz3bKG8JTr3GxoJuYtsj8U3cMb7FxLI+68pqHVKtp0Ga7VgVVoFQQPnH7akgNoKPNgFx9VDL+h3AZDKLiuTCmVZxdu8vUk5aoR0EYLsaC9R2oDNtzRx/Hnqb8cMoCbhJ4GdD4wKGfTjzJAwhAdVDn0vN6lbtaQBkhEMNhPJHO1bFndn37fP54HT4ZUI0NKUzCo6G53h2l9ccy35z99IVKCdI8Y3wdG/bO4tRBqWEagRpegGEVsw6SYOLLwnj3wR3sGxijuUcfyt9AkFtYKnnjM+EZzWzo6hCHmQYvARlfxkf8L/+kxXBjewyPXbRDiD5hOEhrAXTBuUkaCD3b7cNsiy0d0ixMZA0EQOLCxjvYkGEJ2k8mxIEj14kBfPGpjK3gEzSLJMXfhfa0N5qByRorzF723zbAnJbyhb7OGw5BmYQeUX82s18nm8xXDTymkA0rH26Wb27TAOdf8YlqgHl/0KC6ypNYSnHcWrbA0FD07ax0Ij4aSd7Sro5hUH5iEzuHMESFhu0KpTfVmk5TH1artc2BwkYYil3nnaNvQWCOqCnbnab499i7XFWlAbz+LMyUg22hQ/qrmu5ErzWgRYIsxuPIOmNW/Upp/PZCKc3nW0qrfZ6u3nBVJQy1oFBm873/89FRK9HkwE/354AOS16BPUdB2uMS0RyBjZjCsbpP5slV6cLh0PJHOiYpgsCkDNmMtUYbSIAzBtAOy3R4Phg2Jpj1t64J145M6nRQ0f+RCI4BdMg7oI8CnN/l7PFIIUDfEZoPoXpaJctXxoXgfwTu8PNz0VHpgee1rmE4OiHmNHSEShGQyeL4uxiczeOXHwbCZiExJ2ld893IV8rVfMO/bJbXvHAizb7wEYoh71Daad0kOKNHnQsB5AlQvg33qk+htqWUAQh34LpD3dBNTNg75VapCOztNq X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1df07305-9611-457e-2def-08db3b0c1313 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2023 04:12:05.1146 (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: Bqx9jATmutWCIyQ6LgeU+qwBVzIyX87PuO3sco/eGtmlkr26yJ2VwXrrrizbQalcYCfGxg8+Jp4EhDxdRV7G2g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB5366 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,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?1762942868417219028?= X-GMAIL-MSGID: =?utf-8?q?1762942868417219028?= For the readable and writable f2fs_attr with struct_type of F2FS_SBI type, let's directly use the F2FS_SBI_RW_ATTR macro. Signed-off-by: Yangtao Li --- fs/f2fs/sysfs.c | 73 +++++++++++++++++++++++++------------------------ 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c index 8ea05340bad9..4d6263e556fa 100644 --- a/fs/f2fs/sysfs.c +++ b/fs/f2fs/sysfs.c @@ -850,13 +850,16 @@ static struct f2fs_attr f2fs_attr_##_name = { \ .offset = offsetof(struct _struct_name, _elname), \ } +#define F2FS_SBI_RW_ATTR(name, elname) \ + F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, name, elname) \ + F2FS_RW_ATTR(GC_THREAD, f2fs_gc_kthread, gc_urgent_sleep_time, urgent_sleep_time); F2FS_RW_ATTR(GC_THREAD, f2fs_gc_kthread, gc_min_sleep_time, min_sleep_time); F2FS_RW_ATTR(GC_THREAD, f2fs_gc_kthread, gc_max_sleep_time, max_sleep_time); F2FS_RW_ATTR(GC_THREAD, f2fs_gc_kthread, gc_no_gc_sleep_time, no_gc_sleep_time); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, gc_idle, gc_mode); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, gc_urgent, gc_mode); +F2FS_SBI_RW_ATTR(gc_idle, gc_mode); +F2FS_SBI_RW_ATTR(gc_urgent, gc_mode); F2FS_RW_ATTR(SM_INFO, f2fs_sm_info, reclaim_segments, rec_prefree_segments); F2FS_RW_ATTR(DCC_INFO, discard_cmd_control, max_small_discards, max_discards); F2FS_RW_ATTR(DCC_INFO, discard_cmd_control, max_discard_request, max_discard_request); @@ -878,31 +881,29 @@ F2FS_RW_ATTR(NM_INFO, f2fs_nm_info, ram_thresh, ram_thresh); F2FS_RW_ATTR(NM_INFO, f2fs_nm_info, ra_nid_pages, ra_nid_pages); F2FS_RW_ATTR(NM_INFO, f2fs_nm_info, dirty_nats_ratio, dirty_nats_ratio); F2FS_RW_ATTR(NM_INFO, f2fs_nm_info, max_roll_forward_node_blocks, max_rf_node_blocks); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, max_victim_search, max_victim_search); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, migration_granularity, migration_granularity); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, dir_level, dir_level); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, cp_interval, interval_time[CP_TIME]); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, idle_interval, interval_time[REQ_TIME]); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, discard_idle_interval, - interval_time[DISCARD_TIME]); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, gc_idle_interval, interval_time[GC_TIME]); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, - umount_discard_timeout, interval_time[UMOUNT_DISCARD_TIMEOUT]); +F2FS_SBI_RW_ATTR(max_victim_search, max_victim_search); +F2FS_SBI_RW_ATTR(migration_granularity, migration_granularity); +F2FS_SBI_RW_ATTR(dir_level, dir_level); +F2FS_SBI_RW_ATTR(cp_interval, interval_time[CP_TIME]); +F2FS_SBI_RW_ATTR(idle_interval, interval_time[REQ_TIME]); +F2FS_SBI_RW_ATTR(discard_idle_interval, interval_time[DISCARD_TIME]); +F2FS_SBI_RW_ATTR(gc_idle_interval, interval_time[GC_TIME]); +F2FS_SBI_RW_ATTR(umount_discard_timeout, interval_time[UMOUNT_DISCARD_TIMEOUT]); #ifdef CONFIG_F2FS_IOSTAT -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, iostat_enable, iostat_enable); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, iostat_period_ms, iostat_period_ms); +F2FS_SBI_RW_ATTR(iostat_enable, iostat_enable); +F2FS_SBI_RW_ATTR(iostat_period_ms, iostat_period_ms); #endif -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, readdir_ra, readdir_ra); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, max_io_bytes, max_io_bytes); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, gc_pin_file_thresh, gc_pin_file_threshold); +F2FS_SBI_RW_ATTR(readdir_ra, readdir_ra); +F2FS_SBI_RW_ATTR(max_io_bytes, max_io_bytes); +F2FS_SBI_RW_ATTR(gc_pin_file_thresh, gc_pin_file_threshold); F2FS_RW_ATTR(F2FS_SBI, f2fs_super_block, extension_list, extension_list); #ifdef CONFIG_F2FS_FAULT_INJECTION F2FS_RW_ATTR(FAULT_INFO_RATE, f2fs_fault_info, inject_rate, inject_rate); F2FS_RW_ATTR(FAULT_INFO_TYPE, f2fs_fault_info, inject_type, inject_type); #endif -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, data_io_flag, data_io_flag); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, node_io_flag, node_io_flag); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, gc_remaining_trials, gc_remaining_trials); +F2FS_SBI_RW_ATTR(data_io_flag, data_io_flag); +F2FS_SBI_RW_ATTR(node_io_flag, node_io_flag); +F2FS_SBI_RW_ATTR(gc_remaining_trials, gc_remaining_trials); F2FS_RW_ATTR(CPRC_INFO, ckpt_req_control, ckpt_thread_ioprio, ckpt_thread_ioprio); F2FS_GENERAL_RO_ATTR(dirty_segments); F2FS_GENERAL_RO_ATTR(free_segments); @@ -956,11 +957,11 @@ F2FS_FEATURE_RO_ATTR(casefold); F2FS_FEATURE_RO_ATTR(readonly); #ifdef CONFIG_F2FS_FS_COMPRESSION F2FS_FEATURE_RO_ATTR(compression); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, compr_written_block, compr_written_block); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, compr_saved_block, compr_saved_block); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, compr_new_inode, compr_new_inode); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, compress_percent, compress_percent); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, compress_watermark, compress_watermark); +F2FS_SBI_RW_ATTR(compr_written_block, compr_written_block); +F2FS_SBI_RW_ATTR(compr_saved_block, compr_saved_block); +F2FS_SBI_RW_ATTR(compr_new_inode, compr_new_inode); +F2FS_SBI_RW_ATTR(compress_percent, compress_percent); +F2FS_SBI_RW_ATTR(compress_watermark, compress_watermark); #endif F2FS_FEATURE_RO_ATTR(pin_file); @@ -970,22 +971,22 @@ F2FS_RW_ATTR(ATGC_INFO, atgc_management, atgc_candidate_count, max_candidate_cou F2FS_RW_ATTR(ATGC_INFO, atgc_management, atgc_age_weight, age_weight); F2FS_RW_ATTR(ATGC_INFO, atgc_management, atgc_age_threshold, age_threshold); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, seq_file_ra_mul, seq_file_ra_mul); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, gc_segment_mode, gc_segment_mode); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, gc_reclaimed_segments, gc_reclaimed_segs); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, max_fragment_chunk, max_fragment_chunk); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, max_fragment_hole, max_fragment_hole); +F2FS_SBI_RW_ATTR(seq_file_ra_mul, seq_file_ra_mul); +F2FS_SBI_RW_ATTR(gc_segment_mode, gc_segment_mode); +F2FS_SBI_RW_ATTR(gc_reclaimed_segments, gc_reclaimed_segs); +F2FS_SBI_RW_ATTR(max_fragment_chunk, max_fragment_chunk); +F2FS_SBI_RW_ATTR(max_fragment_hole, max_fragment_hole); /* For atomic write */ F2FS_RO_ATTR(F2FS_SBI, f2fs_sb_info, current_atomic_write, current_atomic_write); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, peak_atomic_write, peak_atomic_write); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, committed_atomic_block, committed_atomic_block); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, revoked_atomic_block, revoked_atomic_block); +F2FS_SBI_RW_ATTR(peak_atomic_write, peak_atomic_write); +F2FS_SBI_RW_ATTR(committed_atomic_block, committed_atomic_block); +F2FS_SBI_RW_ATTR(revoked_atomic_block, revoked_atomic_block); /* For block age extent cache */ -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, hot_data_age_threshold, hot_data_age_threshold); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, warm_data_age_threshold, warm_data_age_threshold); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, last_age_weight, last_age_weight); +F2FS_SBI_RW_ATTR(hot_data_age_threshold, hot_data_age_threshold); +F2FS_SBI_RW_ATTR(warm_data_age_threshold, warm_data_age_threshold); +F2FS_SBI_RW_ATTR(last_age_weight, last_age_weight); #define ATTR_LIST(name) (&f2fs_attr_##name.attr) static struct attribute *f2fs_attrs[] = {