From patchwork Wed Sep 11 03:57:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Bo X-Patchwork-Id: 13799648 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 CDCA4EE0204 for ; Wed, 11 Sep 2024 03:43:45 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1soEGg-0001sg-2J; Wed, 11 Sep 2024 03:43:45 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1soEGe-0001sW-Be for linux-f2fs-devel@lists.sourceforge.net; Wed, 11 Sep 2024 03:43:43 +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=ADP7lKjgaNSkR0hiWJKRI2Y0iK bgsTIIIwWub5CgWjGtR3/BdFY7AmVVe0Krpec4zhoB7DhxDlVsZM0BYTpyNWvnEJcEpZV9wOGP8Mg 4rZ58Y1R0+2OIl3o65qKbC3YZMkDWoLxlcxD6uv/hsetw/eH7C0lT6D++a/dV3xA1VrQ=; 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=byTNrE6OVjdcolzUKEPlvk/uK6 o4v6Z9Krs4pd2YO+HvL7APLmO+GBr+GifRfPD0zOSc1nbWHjVJ2Dsfpw30bJB2hc8riXCQuIAYBRl 7bXk6y4X1tsDKAIF8ZD/8nL/N/v98KxFQ6mIvlbQTOywVA7brxzo9Mq3T+dMkCbGokSQ=; Received: from mail-psaapc01on2082.outbound.protection.outlook.com ([40.107.255.82] helo=APC01-PSA-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 1soEGd-0000Nz-3C for linux-f2fs-devel@lists.sourceforge.net; Wed, 11 Sep 2024 03:43:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PqCkmRPRC/4t3pPqgH4h69dzS/aGuLgjBwOMUQ4IzFeIgWYon+rZ3Xqf1VCdBcJTXnrMBh7Y5WYSGQHwCvNswFSHIKjTzevHgiiwmpjvfqzNOqKUBt3LhBv7z4Bv+i2KvIR7eaSqxsdjGAH/fZO3c/hvHT2wrRxvgLVi+TQjgBc2yR91pGlv1Tw5X6oCqk8Bw8D7QaEFyR4HJcyz38yCBDe6G7GVsW7221KBhfiZupxSV2xthBxVT1SRN3lJrjFGJCrx89nYA/PEQfm8cJg2JOyBK487L/bW5QNIgs8wBbdzjcPuO36EWJiDOz6E5JNeZaojv2cD3jQV2w9nE1SpjA== 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=HBtTx4OzOPno7uORxOwt1TGTHjkYKTTg12vjyxn5G96QJGDZs7gk1BIIQoBVkfru932zu5GFZ6h5dHmpEPEnULJSqzTSJRj55jc11+FNDPDO23HHJ7R1fL3FytpV4wjalMayRyLEEPK+KBLpLqkZnn5durciD85TglnMzHIvNQQOTjojIn5snDDT7UK6/BGgyOFNIw3QdjBoe0WILFVv29G52KR6foYzf6zLrNMdSsLRzZ0avim8Ax0oJNsOrHp6c7o6psdeVrowhiK4hit46lpYc6d8RLMGQPaWGQmWpHdjbYhbVZiB/IGpnF29gaPLLhe3cz8PW8lsCMg0fvV2NQ== 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=EkEv6qs99HlrVZelK9ypaCt/s5th7QGz9NuZfgCXi8QMJGsNkAxuI1JG6I4wx7UtJsObIbwPVQa599lXRis3nssolEGSxObEr9u+f/dM0sBgBxkZpHdIsrA6gVabSe7j2GRpHu1uI1vRfoiSplrWhh+ThKBQQv3IBf3PrDjbOkhBiror0je16lxyrnuQg3yEXP4k5Q0tBdLSCDYxnR90cSmOnJPBwLRyWGkdgfuq2sBqrgbq1AcN6OsbjFG537OmGJ6n9J5AkCFlvbzxKBMKNyufxHKqF6e1nKvFIXmEtxFykyOZ9iYXAP+z6qSJo/cwwNby6MWLm5uNCV2XuWTY5w== 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 JH0PR06MB6917.apcprd06.prod.outlook.com (2603:1096:990:67::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.24; Wed, 11 Sep 2024 03:43:31 +0000 Received: from PSAPR06MB4486.apcprd06.prod.outlook.com ([fe80::43cb:1332:afef:81e5]) by PSAPR06MB4486.apcprd06.prod.outlook.com ([fe80::43cb:1332:afef:81e5%4]) with mapi id 15.20.7962.016; Wed, 11 Sep 2024 03:43:31 +0000 To: linux-kernel@vger.kernel.org Date: Tue, 10 Sep 2024 21:57:14 -0600 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: X-ClientProxiedBy: SI2PR02CA0049.apcprd02.prod.outlook.com (2603:1096:4:196::7) To PSAPR06MB4486.apcprd06.prod.outlook.com (2603:1096:301:89::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PSAPR06MB4486:EE_|JH0PR06MB6917:EE_ X-MS-Office365-Filtering-Correlation-Id: c6710871-fc03-413f-02ac-08dcd213e75e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|366016|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: DkEWqez+q8xUJs+KbGF7e3ctqPjEnVkmadRsVAUBzQx0fDKTpUPF/dPbjcgAoZCVKTiMWkVDOiVP4gfigR+99iL1n10/XoWhcvFoQ+iPCsUmxWA7SirG1j5vzsYAauxMuos1zNkxm056jy2y//GOjT2LV84v9S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Se9GRcRqomIn0FGx6yO2wPvpBBGxsbUANxAV5gK8LNbNUSGlesOdvWii7ydczdc3DZEOayabdTAkJ91d7Tz6ZHpIGsFSgPlMPWva/9PRg5g7twlMIa1RtcqMnPeyVkp8N9uJVUqvkLl5LpLOLubdJ1J8cnzWUEyx2lG74/vHwnVE8392p1aQfWPEGc2AA7TVp/dPOsyjfw== 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)(1800799024)(366016)(52116014)(376014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: GOlSSmpk9ZGl6RnpTwF5ohzmg3uTwU0CluAOyZ0L1OWde74qvGjCn5ghetXWSsqoJREhYoxAgox06QWKBouho0xsRKetAPKou/bJvU62O20V39Icrlt5wJs2iE/FdRH4TmbDspUKrwC8iHovoUHfUxnVVwLvWiY/WxsrvYnfCGM5ZP3EgTIWsiKds2pCfK21Ot9/N3vDMq7N5ZDk8vnER+lRpTRaKVJjPPKf1FVJ/4/NAyoQ4hGJjEzjohlczM6MG+rz8aJtAHBtZC4umEmZDOzFVVJorYICV0Mca7eML15LFxN/WvdslVFBwmNqHedIXvb4g/Uh1QDWfTwUOKNv7Uj+9kvdP+ac9I6KbUT4hCJhpj6hPOOyrCOwmsthcFAz5PpujsnOhj4mSs/Xz0L9v4x1+QAQ1exVbIbJwAPtWOCgLKdPCwW+avIEGAZWOc/kMeFLxhb0MVw3d3Zgxsq23Upsi7GNady5jVUgCrVPAAXb2+s2915DJ49cqsOSvzIP/8VWl/wD8oyQR32sb23+su9rOvXjrVC0t4tTZ4Q4p4ta/HgXB9spbvHadvu/SNvaYq0+w/2yqB1vwMyfmQMPw8DyT4KZISkhWJnJOHoDhmlIJEXw6Gk18QV6bKAjJLLGuGHvBdGmad6EeWFTwqHYvikJsiE13ksjgX5Ueqh5o6tCePxT6GGTohUXncjh2QMHCeY20DTjn8GNjzPh1pIOLM6LSQEPkoQCMnP9AIRVYB4RDHeiSx30jHtccAl8WVjfiekDEKyL+SXodV/KxXHsCaAUlyXKBOcgAYo9WdSoA9Df9Ik7wERzSrK/+UMUAvottMU4T9b81bgiGULggir1dz8kyOKNueP0+Gt2yXG/4SdF8ecsMsFC58VRHmJYZMrGKx3piDHVDhQqbKhlxxbKv2qJbrN/LcGLPz84yLIct/qXzAqeO5UoXka3MDuND4wNqNfK3HyDC/XLLwjjeUDbUNai4dulcw1zflqxFhWLOFY+sNf7vTk7YE2BLmrRqqc/XKXUsB9WmlTdTfZgwyZoCWtYM1W3CLizsklq6rmJMRnhqsu7LXfIxbcgkCemlfAPTuHW4rbOIZuuwIAhy/NhLErM/WyPGzz9iGET5YuWD2Wgpp8ii4u1Miqz7oJUMFCE+0BJlIAXW3wygXbhLY6AJElvhUl5ZWWFJAd2aNG8TYebf0cuQ51DnFGuO0gRZiQ21sNiRFsT70YpJFWrcip7d5NyMhbbUjRf84BmUuX3YSrn7O4EXB/cpf6wCNQwuOEH+o9GJ5UrIpPmWQsZbuSf5rsOPQHald5m/4KSMD4Kmwnm3zA1s9F1IWlKaQykTMUBiLUZ29CHhYTuYJFhEq2RoiJbeKdy9/cd8aQIgz+Gtn4AnMxmINVQv/Qepy0UYhUCg52DymHusQbjA2K2iF0n9EV0JLiPgT31Zf1ttyLg6gXoHPxqc5xT8iuJJgzDo4UGm7qPBbt0iDGaCp6qrVWyHHLcKZpiOF8DZPgOFQpUuTDzZsF9yImcOEKSFSY36NVQBKeHTOSjHhD8p5adhOymDwNZFNu1np7az2v6QceZDmc6NK7O2pcSfEpDT8gvr+A/ X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c6710871-fc03-413f-02ac-08dcd213e75e X-MS-Exchange-CrossTenant-AuthSource: PSAPR06MB4486.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Sep 2024 03:43:30.9318 (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: uTJ1h6h1tSEy3fJF7DUtqKrhvv4ik7GuX2xwTka982vS3HCxGIsnavxmhHErs74zObAkmR9CiGiQfvjGhKkDRQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: JH0PR06MB6917 X-Headers-End: 1soEGd-0000Nz-3C Subject: [f2fs-dev] [PATCH v2 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;