From nobody Sat Nov 30 07:43:45 2024 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2086.outbound.protection.outlook.com [40.107.255.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A7E37E583 for ; Wed, 11 Sep 2024 03:43:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.255.86 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726026235; cv=fail; b=aeYU+Wu3MFPcHIqWgb4fcP7526PgBuxQHw7C6pwemB50hWzOO/7yF8Ws5ADu6lx9FZ/NWJd5nGfn9S/UNRL5Ox0cXU+4KHtjdfIln+o8U8fa/j6Wv7i4Oeel773UDY/xL1bJ0sgZHSXmrQIBDdEN4XJXTpeYM8NqDC+EVYktXt0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726026235; c=relaxed/simple; bh=lt1kuXig5/OcyT2+aCV/ZX0lUx+a7Paws8zyj6CObsI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=bLF9zTa04WOr0CcCEgSeVZNJz6jj8lVDYtzffoDtAgtxvz3JAZE2NbQXsYRksQ8oUQdTtjAuFRRnjGthL57iv+ky48jONJELV5G46NiZ0R/NUktjY9PVBnMoJPtyWjTzZDgpbRcXOgFbLtP6a4p1NF81WK7cqGmS8h1hatyaLjI= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=vivo.com; spf=pass smtp.mailfrom=vivo.com; dkim=pass (2048-bit key) header.d=vivo.com header.i=@vivo.com header.b=KJjp5Mg5; arc=fail smtp.client-ip=40.107.255.86 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=vivo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=vivo.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=vivo.com header.i=@vivo.com header.b="KJjp5Mg5" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JWObXJQh7DMaDk4Q1uSM0sKMjEj8TsITyDOu/ERZCv8d/hgVzUw/FcWvRsHYBMBmjz/cwPmcmh39G9VGbp/94TXglhFdf9m/54CF0Y4XfRQKwmgVKIPY9gVugDQ7j9uBFZSJmMXdZEpS3utxFJR1u5qnQmg2Q5sG24RxACG4Q0J6FnewkfXc3RW629GaZ1X69g/ozRskkXZEDNutuGvWw4TAKX+yZcGKvsFLy1EqbixZ2TjCBaX5BY8Usn0kIljCOWuTs58VEO+UKIhOISurq3MTLmwCIaJkQWqPBCRPMBNvXMOYMCxUuLNsIuwYs5vRkYk4t3Vv/oybGrVYlS/KpA== 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=4fI4xqj9AK+cyUPbm9hBvT+ojMH7CRydVKcnjsmQTb8=; b=UqYoj3K/EHaO+ueq0QPA79DF+9YiBVyo+BbTGl+bUTUAqa3XEazV4ACCmv0dd+kuCIybVktvC0gweblzfrkXQYG6QtpxaktCmJI9WDsYLcttdhK+J6Lw4VME0HxgKI3TipqAfrDLqieENu/UfTxjrAR739uSJX44taDMd8avzv/T8AY8+VLTKlSFSYE0IhKBT4X/KcEr2yXtWFfhYuY5oMSznIIPj1bwBf/UQQq4pzX4bgcBu8K7AKjwkOjI/9htMC63hvPjD8Ab0MFo+xiSZcuYip+/bjjpI1xO28xzMGrPlaZuVLtCw678zMyXmGKtBezxY7I1D0HgsEsYLrrhrg== 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=4fI4xqj9AK+cyUPbm9hBvT+ojMH7CRydVKcnjsmQTb8=; b=KJjp5Mg5U1XkXIirzpfvsPmBDwTTab4NUC8Mioj5U5jU1gHFm4d0eRn3i+ep7HNMl5Rm8O6HrGSe7f+CImh/AeHwlbdBGxzsREYQXcjqTjpUjTzQWU6iJMwEH7rTzyJ2cxEOqQwaDX3sKvejXZAgCHyayxnDLM2OW7nm5x3e5+/o5qn4Us4Gqc5I6NuZxIMqTJ2k9OFPEAEicDJEalNKpsQNzqlDc5CObcW5WUYYA6WDHeNmr4aeTfIQfB6rlVdKqFcDAQdRzSNNJP4m6faJdxZAFpMbVAeTbFExfpE3d3uEU9ey++o/vI6COA8tffe3UKqGNTByPNpJZjarVDrjCA== 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:44 +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:44 +0000 From: Wu Bo To: linux-kernel@vger.kernel.org Cc: Jaegeuk Kim , Chao Yu , linux-f2fs-devel@lists.sourceforge.net, Wu Bo , Wu Bo Subject: [PATCH v2 10/13] f2fs: avoid inlining quota files Date: Tue, 10 Sep 2024 21:57:23 -0600 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SI2PR02CA0049.apcprd02.prod.outlook.com (2603:1096:4:196::7) To PSAPR06MB4486.apcprd06.prod.outlook.com (2603:1096:301:89::11) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PSAPR06MB4486:EE_|JH0PR06MB6917:EE_ X-MS-Office365-Filtering-Correlation-Id: dde63625-a6b2-4e99-8bff-08dcd213ef63 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: =?us-ascii?Q?dpEtUG2gSEgF9mgIT5sZAb8hO8SQhd9+Gki4YspSxVFRs5ahrd5O30ub7lXp?= =?us-ascii?Q?fILavCHMpAoQdiz6qSb605J87diMbUWcJqt9ULI/sTjA8QgzAFpgB8vWWoqw?= =?us-ascii?Q?+1cKsrDL6Zc6Uy3LS4LLHHGUKH7oOFc2LkKoaOZT8reAYTHGA5U5GA49IJch?= =?us-ascii?Q?FaviqEsEP+GUjHqZakD3hiBelD3+EMrcRNupqe9/ZRUXQGgTzPEZgJqNuTle?= =?us-ascii?Q?YOISrq5/hjpjQWg6fAgseh1LktYEQyl6THP49wySfsY0ajwVljQvogwtnVVD?= =?us-ascii?Q?my1NLiImPUqKMPRZnmRXWU7uEp+EwaX8IBB1zjA3ElPbQaHPdW4/rLWgFvmS?= =?us-ascii?Q?25XBt7aKU4ci1YzvdcNGnB/Y3PKenFT/Etedu45xr7LKsNwlQ9Tk7uAtRf1k?= =?us-ascii?Q?V0/iaXe8z4B32TBeSQM13oMWY3mzwHu79OFDZNQz3O75QUJ7bjO9EdQ2myeE?= =?us-ascii?Q?HNzd/712swHA4SFy+y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8XoWZkagpk3XJoqgHXrnCST8nD4izsUToSwAUyFea7249UkQ=3D=3D?= 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: =?us-ascii?Q?XnMnAtq4NitKc4UckgMVoWHV4Qfd6oI1N/5YMYRqmU2NwxSRTGfQQA5iBiPE?= =?us-ascii?Q?igkWuaDrwmeCXKHD5H/QEro2wp0hn/C9iBE9fC0KxOIaWD7AvG8r3WrqmYf0?= =?us-ascii?Q?0WeNsLY8Qj8FiNs+2cwsHZluDJODK9Zs8OtAGKYYsBNPxb+M+kTGka7p7nFT?= =?us-ascii?Q?dv9l1QunhpzfN1URqZtGV5kaFQQ0W7xi4lcmv4SUeYuwAcmhK+ue99IHnbwi?= =?us-ascii?Q?5wdrmKQLlemfQdpY6GMaMyS6sfiSQEmBgcgDhN0J/Q+ZVEr6b2EIyDjkaEvd?= =?us-ascii?Q?sPQvQ8AtZdUd4bFK1ndIvSbvLpZPq4nXjHrBCfQn8/F67ahoC7oiNaELk/Hw?= =?us-ascii?Q?BWU6sTOB8ZtxbMBUYnb8E7B0ZZ3zEuJGjkUOgqmyldCjSPXQuu+SZa0Xnw9f?= =?us-ascii?Q?Dul5iSKnIMfkPEmqhCJNs4OaoqWc9QEh/vKAo6zbUzTm75WJsjpt5mRnrk43?= =?us-ascii?Q?Ja+ELVoUitSrseBFnk66B0QaKjsAKx700sHrkOU/zJMsnAqt3XtjfLjLK89k?= =?us-ascii?Q?Y3JAYOa2tPrt8yAfzaa0xKAD045UDMa4szo0e4R6AKjNCBFeI7v14wriNeIF?= =?us-ascii?Q?qL17oAO9iYR4i2PgkwPLoZG/2TTVQFZLV07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AAdQ2/SLpMUxKJ+OXuuXLC2lDXY2/4F3nNtyBYzOZd4h2yriaAbo+JA?= =?us-ascii?Q?M8usGLFWAUjnZupLRbypLQM0aBDwFVeNXwi4NTXN?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: dde63625-a6b2-4e99-8bff-08dcd213ef63 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:44.3860 (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: thwrUHUsL02nqMLg1+FEhBj69/KxpefBiietE5u9S28yGjgRSmxga8rY0ARBF4lhjI7bEJ8aptDY5uBaoLvTmA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: JH0PR06MB6917 Content-Type: text/plain; charset="utf-8" Quota files have a different write path and are incompatible with inlined inodes (whether data or tail inlined). To simplify the process, inlining is disabled for quota files here. Signed-off-by: Wu Bo --- fs/f2fs/data.c | 9 +++++++++ fs/f2fs/super.c | 10 ++++++++++ 2 files changed, 19 insertions(+) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 275c5739993e..6d7b6074763f 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -3641,6 +3641,15 @@ static int f2fs_write_begin(struct file *file, struc= t address_space *mapping, goto fail; } =20 + if (IS_NOQUOTA(inode)) { + err =3D f2fs_convert_inline_inode(inode); + if (err) + goto fail; + err =3D f2fs_convert_inline_tail(inode); + if (err) + goto fail; + } + #ifdef CONFIG_F2FS_FS_COMPRESSION if (f2fs_compressed_file(inode)) { int ret; diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index d4ec32ba6cad..0f54c055f053 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -2807,6 +2807,14 @@ static int f2fs_quota_enable(struct super_block *sb,= int type, int format_id, return PTR_ERR(qf_inode); } =20 + err =3D f2fs_convert_inline_inode(qf_inode); + if (err) + goto out; + + err =3D f2fs_convert_inline_tail(qf_inode); + if (err) + goto out; + /* Don't account quota for quota files to avoid recursion */ inode_lock(qf_inode); qf_inode->i_flags |=3D S_NOQUOTA; @@ -2818,6 +2826,8 @@ static int f2fs_quota_enable(struct super_block *sb, = int type, int format_id, inode_unlock(qf_inode); =20 err =3D dquot_load_quota_inode(qf_inode, type, format_id, flags); + +out: iput(qf_inode); return err; } --=20 2.35.3