From patchwork Wed Sep 11 03:57:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Bo X-Patchwork-Id: 13799658 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 BB149EE0204 for ; Wed, 11 Sep 2024 03:43:57 +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 1soEGr-0007dZ-EE; Wed, 11 Sep 2024 03:43:57 +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 1soEGp-0007d8-8H for linux-f2fs-devel@lists.sourceforge.net; Wed, 11 Sep 2024 03:43:55 +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=cbAYiYW42KdJTqSuWfOstLknlNwHmM+iHowcLx3rDog=; b=gVLm+ULJdKg4nhoAIPygnTwghB ayWfBjjj+CZU1W1/AVvkNa4+TlmHYwrQVvbf+ZKZztWyJQdmd/fB8PJ1foBclt4csmMHPbYeRr622 iYKVNuHXlHCjCC/n+sS2eWkxa5zNl/YNMu+y/Ud1ykNBc7XdaJ9HNJQcvgsXxWvoM+SQ=; 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=cbAYiYW42KdJTqSuWfOstLknlNwHmM+iHowcLx3rDog=; b=TGIaY/A/KlMboBcSNPKkU04fYK d+hQ5kOggrOqsw0gP4km7pSrLO17P9j7jyGsehqHa5wS46FVslr8Vg/Eo87zHftorRmpzMCifKZOA QI3CzI8nMHaDgMaT4DPDlcQ3xnaUxBmJznSSLd4TAiCBiqR9bdHWAfVp84D1RClOGpeg=; Received: from mail-eastasiaazon11010021.outbound.protection.outlook.com ([52.101.128.21] helo=HK2PR02CU002.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 1soEGo-0000Oj-Jc for linux-f2fs-devel@lists.sourceforge.net; Wed, 11 Sep 2024 03:43:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UKFd2xQb0uFC4XCebKag1HWrtH/MS1M0YKtCcu5ZTLxkY4bOqhG+4m6N8sYn+L2Oc9qNgBIy06vooeBewIB+T+IDeO7lAoo/BvG0Yckd6X/t5oQ3kX/d0wvkLNH+XHq2i9pFsj1i8MD4eR8VwGTAb6d98734bLDeeW/kdY6TlfxpX8d0OMy8ZA0hsgprYaqiqs2f2nZLDxLnvAxEuUAuRzux3ZIhHhEvPAS+vkcPXn3a97IJuA9G71hO+t7pAmA94RDCuspGtcSe9Ee6nKzBte+TgZXJARRsg807ME+HbkAEY02aGzAscd/GT9cpYe0ELvy+PXYgICaTFLM349iDng== 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=cbAYiYW42KdJTqSuWfOstLknlNwHmM+iHowcLx3rDog=; b=bW/13Oves28hopFYbIt0mlCOX5snALHYzkxLGUY25BjSRjQ5AzHbHiLHfWHsJLFnLt7+cdn1YBAMdnbHSexS1AJ7LgTM/aQKb3gN6na5OWZcsJvLXB3tSj486rhTbgP5CuJltI1E64r7gYjl3cRkBp1Ca1AY0fmb9+33aOwBSY4dUjYwJWLpSusnnXYpFtcAp3IA+6Kx/HldrNbXzYU/fLg/VmBPEMkNpdjbV9mBc9Lwu7s7PKAsu6J5FF7O8JgBtHE7gyjoFb9ai3z+5L4oGG3/8veGfWCc5HB8sqYSq0gQ4z1ce/jYKNocYi2S/dQlKgW8umrnD6eXKsQYD95rug== 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=cbAYiYW42KdJTqSuWfOstLknlNwHmM+iHowcLx3rDog=; b=l5EZKd3Sy2mFzy9nomCTuO+qjzHqSJzpEDFZcfj3IreFYnYnNFICaDEOU/D+d31Bmsp/efLo0Iu6s4NsaKB4MjZMjCYMCd8iX8qdDz9GeEmspmT/VWjjDy/K17p4yLZVUDgzlTy2NtfSEDKrbb40rx4H3LB61W78dENtQBoHkNOmVJoZqbTYxhSmlnSz2Hoz/07i9SuxA2qNVWzx0MdRfQZ48z9JnF3Kn8/Autm2QJtG9u7dh1cIEZVPgXraOrbircqmgdaITSIMnmURXRDBT0yIGRFtk11N8auxR5cY/qTV7Luzv+tH21Si68re152GuQMDdCrFdcviAvTgO0twGg== 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 SEYPR06MB6279.apcprd06.prod.outlook.com (2603:1096:101:139::12) 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:38 +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:38 +0000 To: linux-kernel@vger.kernel.org Date: Tue, 10 Sep 2024 21:57:19 -0600 Message-Id: <99802996a3f4a0c2d89c79ec17be94e9c62ff8b6.1726024116.git.bo.wu@vivo.com> 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_|SEYPR06MB6279:EE_ X-MS-Office365-Filtering-Correlation-Id: 8877363b-55bb-46f6-4eda-08dcd213ebd5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|52116014|366016|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: hcWEKG+sf+SSOdmiaWDM4zadxCoQj//++JBjoB2BLwf56hbbq5OAlRhBp4KDpfgIITFrOTHJMJqTV7JsxioR9r0OMGGlBwSoBvxQxiOW9wAWReWz3NQsnv84T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WivCjo4c8L5+2YIyiukyEyVRjJfV7IgxcCPeBbYorejxxyOYSEIIFoqhvfQfRtOc22zl6Bxkpsf64AyMs5Ev9UIkA0TbR+Cd+mgTHIR9FGW3W9c3oLnLx/a9yduevhCS+Zq7kD9xUO6RIl6tgP9MUJIC3gr7cz61H0DQNne78PBjW8AfR0JLXD3+mnGcHgYF9+NfBF67LcB/aXlWWfxjOPfyAORpr0TQbSOWkU4zT2GbSlXRQhiUQ== 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)(376014)(52116014)(366016)(1800799024)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: szMCZhptJGqDzQWHTnXmAOXTWGhTWWfP0SfJD7ZIi+jPYc/qHsGu+gPtrCyKLDJwViIIK/e4pXA0VljTxLCMrD757LKQQlGoZr0me8iL/Ov67CD+XT6U2BfaBUDZUGktJTqWK6X5Av2DeZCLejtCS7H9A7Ra5I2roRIeFspqzlGEHnz59T7GG0FO8793e235lAEmoNMTqldHsmUA9KMH6Ha+v4se/oPdDTHCX2gP6ZU8Qqqkhp92fPnK1Iz5xJDhA6ertgcZ/RQ+PD1m5Gpulp7zMxhWMp8+GB7WuUvha4KUDpG/IxoNTL2bPLyeoTSZ9/jnjJMQrICnxM3IU/Go0c3FNyZ6Sr/AJ3f4t4sbdAaopNQZcjvggALyicYyAnqg10BdR8QQWUFOd4RfGxLx23Lh5XRcOe9jgcuTo53xANi3/pCnwEKN2BdibAIcO9qOUrx0aAK42yJBQIRg4teajS+UhEeb5gWv8TfUe51ECgjHBwnpIoLc79L7UWSRweGrWkrZznJW/3EMfA0XgpCKQeC1Frqy2H/wHvZpk69jAQJ02/TB9kKtGIgInFgygQmS/L2Mzq5f9dPpFoPG8WrxkFP7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rossTenant-AuthSource: PSAPR06MB4486.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Sep 2024 03:43:38.4854 (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: AKc+COEImFD3s8NOJ3YRALLS5NvAKl49DZYargA3O1j2XslPXSdr8FhdVN3bhXImpgsqi+JHD/yVKA8mRYCBYg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB6279 X-Headers-End: 1soEGo-0000Oj-Jc Subject: [f2fs-dev] [PATCH v2 06/13] f2fs: fix address info has been truncated 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 If there is no data inline, the address table should not be truncate, in case there may be reserved address info. Signed-off-by: Wu Bo --- fs/f2fs/inline.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c index 30b18053e784..a542956d618a 100644 --- a/fs/f2fs/inline.c +++ b/fs/f2fs/inline.c @@ -224,7 +224,8 @@ int f2fs_clear_inline_tail(struct inode *inode, bool force) if (IS_ERR(ipage)) return PTR_ERR(ipage); - f2fs_truncate_inline_inode(inode, ipage, 0); + if (f2fs_exist_data(inode)) + f2fs_truncate_inline_inode(inode, ipage, 0); clear_page_private_inline(ipage); if (force || end_index >= COMPACT_ADDRS_PER_INODE)