From patchwork Tue Sep 3 08:54:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Bo X-Patchwork-Id: 13788310 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 09EE2CD13CF for ; Tue, 3 Sep 2024 08:56:37 +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 1slPL3-0001A9-L6; Tue, 03 Sep 2024 08:56:37 +0000 Received: from [172.30.29.66] (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 1slPKv-00019Q-Rk for linux-f2fs-devel@lists.sourceforge.net; Tue, 03 Sep 2024 08:56:29 +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=789fi2cjANDVURtNHSKg2uT0fvFJ1Bmx9d+l7fPmobM=; b=fIr3X/X3WN82YT1uK8xSAiie8u kEBjc0ly/kF5Inxz1qs2Sdn+LNyWobxGM3Jydrr/6XDFd4zFOG02JsQAy0HbT/XBYdjVfcUdJgjh2 iGIdHORVixNjHJ0FJungYgazCw2sTYSkwjd1Gz4kTZCFzV5zS/IYrUR41Op5IGfboSXs=; 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=789fi2cjANDVURtNHSKg2uT0fvFJ1Bmx9d+l7fPmobM=; b=Z2Y1Dc811NnW4TI+vP/SQkOhBU G0H48tIFbel/04Sb4DeW1u3p/w7PMwoCd8JSDFgk4LYvFCkRKl68mQrRWTjQGwmpSooJkBbkYmGKD C/tU4uQC5w8cB0KI6HNZm2wlopDFHYfZ/ZIFo1tZ6YTX6MIJveCoJAKRSqRh8PJiO2AE=; Received: from mail-sgaapc01on2064.outbound.protection.outlook.com ([40.107.215.64] helo=APC01-SG2-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 1slPKv-0001Uz-42 for linux-f2fs-devel@lists.sourceforge.net; Tue, 03 Sep 2024 08:56:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YaTbhq5i3xtJqMgf9C8/qdTb/vC4Hn528HaMDgTFW7TtuZU1xgmNY1I7W+Fza0BelkjBlzwZvn+8qVva8O8OIQhM4otxNNrqgId7kwMhJWb6zZpsReGD7ZBgXi/Jpcs3RlmdFno62TrohBkYx6vPf4CNjSLtMQbDV7aKc3v1DmPyHcUNHOGpLHEUe1AC87rXP4YiPp5GYZjtC9FvrHQJLyiF1TBjrOY6cg8wRrUqActltdkYQ+ZGCCak32yllymXnKL1leakZmTCh4c7y8B/3sEg1OPTesGVx4HsAs1SkcopaUQGdqnz4EmKY+5bnwgzbCClc4/tEVFycVJokxD/OQ== 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=789fi2cjANDVURtNHSKg2uT0fvFJ1Bmx9d+l7fPmobM=; b=MlqQtEQ7j7MHPoDnvLD7kVdEPGWJ3QVHqAleoSmrrruMGhFSZ0gYU148AzBqz+CmQJzbKKSJ6y9clbOJ3YJd+V55ehAHL2iDb0YzESTh6e3boCkqDzVS9tfYrq7qkU2S4+Ylbb+Gm6anWJYLFJJAcHGav+ZQQBcVAdRnI+F+TWSghtcxwdGkvYsiehUxDbvBYSQrh7SfMOx5MKI76z9yFbQYo5WFRAAlzRM/05A3m1LnojYPkpbwhcz6oUgP/VNMFFy++iDVLodKAXT4fOELe9Ui/i2Xc1rfFRbLbp1Z2EYiYhZDHJnd7lhZaK+fs30i9rJ+Cogjoh35M6znEO6UCg== 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=789fi2cjANDVURtNHSKg2uT0fvFJ1Bmx9d+l7fPmobM=; b=WewX4qOdRSnb5QLSz05o1J7F/Qwjh/4M5lGrN6UjIHuDAnwvhp1odZLw1/j2WD3J2MH1FB1QchIc5bj88AKY1MLVBzf0Hv+2rCsBpyEBSw7lwaL88UvakD6SQJ+bPLbcu/f1LRqA7yFoOBM+vpzGwFP9aK9iy3OZmWiBMrczEfnaf14KOqWet9cqC7o6JdfnFCVNTg8vc1kz8qAtzZNglVySV0t/brb9bSD0GliMmle+0e1vbTzx1UniIuHQq7OR8RHe+aXinzQ5aFyV4f638gGPYoyEGA/5r1FIwHAWeDopMfcP9NTMNe0ZG80slrPGNgdn9qT9wVodWGYgNd3TXA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from PSAPR06MB4486.apcprd06.prod.outlook.com (2603:1096:301:89::11) by KL1PR0601MB5536.apcprd06.prod.outlook.com (2603:1096:820:bd::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.24; Tue, 3 Sep 2024 08:40:46 +0000 Received: from PSAPR06MB4486.apcprd06.prod.outlook.com ([fe80::43cb:1332:afef:81e5]) by PSAPR06MB4486.apcprd06.prod.outlook.com ([fe80::43cb:1332:afef:81e5%6]) with mapi id 15.20.7918.024; Tue, 3 Sep 2024 08:40:46 +0000 To: linux-kernel@vger.kernel.org Date: Tue, 3 Sep 2024 02:54:45 -0600 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: X-ClientProxiedBy: SI2PR02CA0008.apcprd02.prod.outlook.com (2603:1096:4:194::12) To PSAPR06MB4486.apcprd06.prod.outlook.com (2603:1096:301:89::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PSAPR06MB4486:EE_|KL1PR0601MB5536:EE_ X-MS-Office365-Filtering-Correlation-Id: c70d39a8-6e71-46b9-e93a-08dccbf41ad6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|52116014|376014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: bWBE0kUhf+9e/UevVquHW6mKy+EGI1G72ekas64zTtjE5XJIMmkTuR2hXhlxKs/UNCiXeEo0/EKJILJiSmwCvIHA9lVj3/Xo30neIzxmJRxIXUp77qD3ZdSn71ehzj3+lLSOC/cfpZCngs3qQV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1I9Q6xI/WsSHdMyZpD2kSD/5ooNKYoydC1rTWlvH3Lp6UgDXF5uRmQwhts4xCpu1r2UBdeL0Oj2ZAvdldSU/Hz2te5RI+U/Yndom4rUdzvDGWS7HDZ47+6QANWDDbqPXpGuJjdtArzzPyZsTkuct7WHHzbabsAMJ8xlie/NLhzKhQlv/JN7RaqB974xKyv0nJDE1qE6bzSoGJPaQ9mlO6mCPm3I+Vz3g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PSAPR06MB4486.apcprd06.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(52116014)(376014)(1800799024)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vIOmbTNxLUIKDjxfM0jiJ63skSLME2TCKre5tDlCaB3LcycUcCFk+WU4I+/O1WM2eFXsVk6kQEa/fsQwWcQMGl1ElPWTBcXaG906pe9P6Hu1wnaJg/qY5U63TWHRoZhVDCV6tF4KspecYVHJ/cXmGAY4iM1o/xIBI3t0b7pXrfZfByACxLEQwsqKXCW9FIFDCxmFx4qROMgxtn4MBbdVdZxiObiyV51T18LytwGPYv0EpDjRmwQ0k6UxmovU24DppFOfizYYTTXQFvKK7j1E6bV1CMWrhIC/g64Q9VkOclaUL1S+sTq2XqEGZF3Ez+BLvyZoNRh0ZgrL9Tz2I1pkb+/UFh37qvntmxjr6rDW6aQ6DCyUJvzJycXftAqBOfSo82WCJlx/UGv2+t9dDDBKUGMIrxFrqMw8kk1xRgYy1ZtLTkKby2BkqX1Uj0enzUsCZg1svO4ySHssbxI3Y1Fx67GxObdPSUywywy5ObywXI2CXjK/L0youBlw94KF5SQP00HgE2EHfv0YlowhYByZXb18tQhhxyiM3esPsNIFsaB6Vt8gjFwkm5wQL5X50PgP3DDYNcuQFESvI91OEOWpIu7EXeAerRcKy8mDvyxImvLe6g+I7T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PSAPR06MB4486.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Sep 2024 08:40:46.4027 (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: 3Mo7xzBAP/KjcWAvfiTqwf3KmS88Nts0d6UC9SeThksik2TMPTPcvQPq+E4AsV+/xqV3ebU7/ttoTv+uexghCA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB5536 X-Headers-End: 1slPKv-0001Uz-42 Subject: [f2fs-dev] [PATCH 01/13] f2fs: add inline tail mount option 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 , Jaegeuk Kim , Wu Bo , linux-f2fs-devel@lists.sourceforge.net Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net Same as inline data, use mount option to control inline tail enable or disable. And enable inline tail as default. Signed-off-by: Wu Bo --- fs/f2fs/f2fs.h | 1 + fs/f2fs/super.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index ac19c61f0c3e..3956740ca7e2 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -116,6 +116,7 @@ extern const char *f2fs_fault_name[FAULT_MAX]; #define F2FS_MOUNT_GC_MERGE 0x02000000 #define F2FS_MOUNT_COMPRESS_CACHE 0x04000000 #define F2FS_MOUNT_AGE_EXTENT_CACHE 0x08000000 +#define F2FS_MOUNT_INLINE_TAIL 0x10000000 #define F2FS_OPTION(sbi) ((sbi)->mount_opt) #define clear_opt(sbi, option) (F2FS_OPTION(sbi).opt &= ~F2FS_MOUNT_##option) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 3959fd137cc9..d4ec32ba6cad 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -136,6 +136,7 @@ enum { Opt_inline_data, Opt_inline_dentry, Opt_noinline_dentry, + Opt_inline_tail, Opt_flush_merge, Opt_noflush_merge, Opt_barrier, @@ -144,6 +145,7 @@ enum { Opt_extent_cache, Opt_noextent_cache, Opt_noinline_data, + Opt_noinline_tail, Opt_data_flush, Opt_reserve_root, Opt_resgid, @@ -212,6 +214,7 @@ static match_table_t f2fs_tokens = { {Opt_inline_data, "inline_data"}, {Opt_inline_dentry, "inline_dentry"}, {Opt_noinline_dentry, "noinline_dentry"}, + {Opt_inline_tail, "inline_tail"}, {Opt_flush_merge, "flush_merge"}, {Opt_noflush_merge, "noflush_merge"}, {Opt_barrier, "barrier"}, @@ -220,6 +223,7 @@ static match_table_t f2fs_tokens = { {Opt_extent_cache, "extent_cache"}, {Opt_noextent_cache, "noextent_cache"}, {Opt_noinline_data, "noinline_data"}, + {Opt_noinline_tail, "noinline_tail"}, {Opt_data_flush, "data_flush"}, {Opt_reserve_root, "reserve_root=%u"}, {Opt_resgid, "resgid=%u"}, @@ -811,6 +815,9 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount) case Opt_noinline_dentry: clear_opt(sbi, INLINE_DENTRY); break; + case Opt_inline_tail: + set_opt(sbi, INLINE_TAIL); + break; case Opt_flush_merge: set_opt(sbi, FLUSH_MERGE); break; @@ -835,6 +842,9 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount) case Opt_noinline_data: clear_opt(sbi, INLINE_DATA); break; + case Opt_noinline_tail: + clear_opt(sbi, INLINE_DATA); + break; case Opt_data_flush: set_opt(sbi, DATA_FLUSH); break; @@ -1989,6 +1999,10 @@ static int f2fs_show_options(struct seq_file *seq, struct dentry *root) seq_puts(seq, ",inline_data"); else seq_puts(seq, ",noinline_data"); + if (test_opt(sbi, INLINE_TAIL)) + seq_puts(seq, ",inline_tail"); + else + seq_puts(seq, ",noinline_tail"); if (test_opt(sbi, INLINE_DENTRY)) seq_puts(seq, ",inline_dentry"); else @@ -2138,6 +2152,7 @@ static void default_options(struct f2fs_sb_info *sbi, bool remount) set_opt(sbi, INLINE_XATTR); set_opt(sbi, INLINE_DATA); set_opt(sbi, INLINE_DENTRY); + set_opt(sbi, INLINE_TAIL); set_opt(sbi, MERGE_CHECKPOINT); F2FS_OPTION(sbi).unusable_cap = 0; sbi->sb->s_flags |= SB_LAZYTIME;