From patchwork Wed Oct 16 00:11:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Catherine Hoang X-Patchwork-Id: 13837459 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (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 AFC2A9443; Wed, 16 Oct 2024 00:11:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729037519; cv=fail; b=HKkQwOiWoiopI1efv6UIkANxXWBbwUvsvBDqAcPGIQhuTI1tS8alHZgROocOq1TFDNHqmh1rA+C3yIfrs009K4FxSzvVIrcw048bibBoGdlT0Q7thmfaQFbogKzZ8Zg+bnZAHNtxTUqNgP4MBt9km2HTQvCa8W90En8zOk8pLgk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729037519; c=relaxed/simple; bh=B0h34weELd0p05Ox0LuvE7CMfqtoQzrzye78I29nRKc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=YoUfiVxAGCSwjS6qKgY5TVf4CXbphOzX8kuoGVAzIUaF5SiGsZNG1yKS7lXcyxJ/yrE3qMyGhUqfd+k7V2xMITXoFGzF9gs4MYt25LXbXNxwiQz1gnt1qzSULk8Q4/6GsM4o6ZJzzllTRdY8uOqbHVarxywGNR5Jbfb338aYdmQ= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=gX0k1Hep; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=Y5uzQ1dh; arc=fail smtp.client-ip=205.220.165.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="gX0k1Hep"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="Y5uzQ1dh" Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49FHth1P019381; Wed, 16 Oct 2024 00:11:57 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= corp-2023-11-20; bh=mvtjWTiAL1Xi9oxyFCQGngt00d3w9ZhdbMPsaqffMOQ=; b= gX0k1Hepq6mtucnAjpg2MSMXg4w9qZDD/jjFhLJol+deWFGpIJQPYEQWCdDK0p5v jfmMtTH0SI1m10Dh58rRPHXObV6BkDKBZCw/jAwmhr9gIYNgTKciCe+cZoiHZwYU j286OMgAYcmP5JPR8C7MJeDMpVicOzGZXlv88kwTzUjcQjuGHG/MWXeCDMkYGRZB kqZ/RB4Ztjp251sjnPxxi+jKXNldcnluwWKyFkOHEvZ5jKIVS43jd9nth7oE/gVX HCq3eM7EATtVfJ7cVQWBcgjnrUso3aek6Mj9AM/lAqdaTvDf103YLKZe6WqOPMys qqt1bA8q1ujWTLCu3493wQ== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 427gq7jhqd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 16 Oct 2024 00:11:57 +0000 (GMT) Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 49FMbLDJ026319; Wed, 16 Oct 2024 00:11:56 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2177.outbound.protection.outlook.com [104.47.58.177]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 427fj85am5-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 16 Oct 2024 00:11:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=aWwh7UYuPGo2re6mAHldEf35vL5GeTE9r9DZGgs+AHE8XHSeMUuqiMFBYU8oEUzg+L0o3WCsfQMOHMNsM6W7rAnCXwi4gnZps7BfdBUVPt5P2wNWkEM5HS1EmXndyFsBZ6MQRRTdYP6PHsIm70TlqSTGRGloH6SszaspzAL9OM2FkxhrVYlTO+F41WMZXPTcwsovQ+dsUXfNCTo1zhY0771cUMdZgjRLPnHyQ9neyonFb+jsWvYBROR1wwRUPFqHuZcdtMQhgbGNvEttu1GUAVPQcNZap9BU2x55Y07S4mGwp5YtpGLobLeeWwHTRVR3Om1A+nid1Uf9m+Zsr6O6bA== 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=mvtjWTiAL1Xi9oxyFCQGngt00d3w9ZhdbMPsaqffMOQ=; b=StBkaDBpGNMPe+Nk3d3Lr2fvQFV01qxvE4ZyHKrFgBQDO8VD8CTm2V6hwXZidDxQc5uEp27UmPL9jf/EZTTQdzUawOyKodS79p8RY7TuvL/bbI/PPKdLoLkzf0LjhvbqN3GtqEUy+YK9opFJ1J7kTcyZYfXDqcrO1NCMx3s6LIZX8aDN9NMpZsJauE2kII+OayIUPyvtl8rG+CNncZY5QO7F4uFe9Dwx8HudO/lKP1YFbnZ0K2dYTSocihDlESxkIxcpiaIwM710MSTKDwlIQzFxnVOIhmHgA85fH+kSewOY0nhg5KCrJ9wqSsjekRYK1uBVmMzGTfDpW2GWyqxYmA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mvtjWTiAL1Xi9oxyFCQGngt00d3w9ZhdbMPsaqffMOQ=; b=Y5uzQ1dhGmuEhlBqkRl3gS5mwxb8UUn+055z+Q+8+WEYiIIOvFWynzVhDeWM7AX38XOq1H2viUOXBQ2faF9ZM5RoEefG3Fg7rV7KiCCc5B4tdijr5FmtMEqvp/uyrMm6T8/2TvLL7Ud8An7TyIVlHq+udmkxBrXNNwDFWolYhpc= Received: from BLAPR10MB5316.namprd10.prod.outlook.com (2603:10b6:208:326::6) by PH0PR10MB4727.namprd10.prod.outlook.com (2603:10b6:510:3f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.27; Wed, 16 Oct 2024 00:11:54 +0000 Received: from BLAPR10MB5316.namprd10.prod.outlook.com ([fe80::a63b:c94b:7ed8:4142]) by BLAPR10MB5316.namprd10.prod.outlook.com ([fe80::a63b:c94b:7ed8:4142%4]) with mapi id 15.20.8069.016; Wed, 16 Oct 2024 00:11:54 +0000 From: Catherine Hoang To: stable@vger.kernel.org Cc: linux-xfs@vger.kernel.org Subject: [PATCH 6.6 13/21] xfs: make the seq argument to xfs_bmapi_convert_delalloc() optional Date: Tue, 15 Oct 2024 17:11:18 -0700 Message-Id: <20241016001126.3256-14-catherine.hoang@oracle.com> X-Mailer: git-send-email 2.39.3 (Apple Git-146) In-Reply-To: <20241016001126.3256-1-catherine.hoang@oracle.com> References: <20241016001126.3256-1-catherine.hoang@oracle.com> X-ClientProxiedBy: SJ0PR05CA0206.namprd05.prod.outlook.com (2603:10b6:a03:330::31) To BLAPR10MB5316.namprd10.prod.outlook.com (2603:10b6:208:326::6) Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BLAPR10MB5316:EE_|PH0PR10MB4727:EE_ X-MS-Office365-Filtering-Correlation-Id: c7496325-2b27-4d68-215a-08dced77245b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|10070799003|366016|376014|1800799024; X-Microsoft-Antispam-Message-Info: 6ld7aYMQOygdzmDlP6VZS7Brry+AeDDcvuaS6lQ4zjfNvTcURhUpXBhsu3e365iQ0kTk6bpHE82WS9Kqe5ZbDsEmZmpkkkQNuW6VSlFuVd4O7A1w9K/j5+N+3k86Bw9vq03j3QUVKYWrP8rw4Sm2c5W6i31WeYp0GhpKiUUhx39MeDBsb43pTWMFZgJcDIvAU7FLxsadgOuBLOcmd43XXuJpQujIzqJpeRY9p0ZAvnlZ1V3QHBfu4MlY/shvT2koawgzul902qNxZfzKTKbLzeVFekpl/LlT7Cr6uGes0Ft13oElOTYTctMHCnObR8n1i0kXF7rswr+r0x2QSEiyqnl4OOsqyIHP45lyQyCsYUcpZhU33NNZe8kfmdJIrIjaAAARFYu7dKdtSfYb+DqhLwqd59sBeC4hM1uDiLCpt+qJ4RXNMOxoKLXuCHMhD9JH+lxdYQySn94w/Y+8uyLEmujh6u45OJHebSbTJ4EsRzX998C/Un+b2h0kRarxoDcv5gAIyN9hLxdLWtYLuHcQ9rkwSooSClJSUsMHD+DftJuaAp2BTY8PGT3nstag/P9k0RxX/+WFxgthQfIxTP9yFYDto52SCEmSURfEc7BixNiIcaLx8k/MwEqdP7fn8bwvcH9SzvTcGzRNTE7eZM4dIrcGOtvanyfFD3Sj/KV0bgffFjGPqiQpv1oGmWpQtHeXOVcdOPgR3PHEoQd/GVN6ceSU6bB6ECSGeLAqeTVknTrhJ8kArqmKLaFj6qgFg3EjehZSw14bnjJ8Jp9XCDpeGwp0cicc67patKiOyVWpob31xOxD17FxOB5bkCjDSxAAWul7SptseUoawY7iQEASbtKA8iUCzSAIIRH+mG1eworyvTSK9IBK+3sxZOzFN5Z+0cCvXTwvLXXrwz3/RTcXUgRXWaS492m8ajS7UrgdMQQnTCqEMCtAi8BphB8WIAOf7BLpYmvYmno1sta3w5kQQeqJzOE5NcAlhfsD/fiRIpGujqCYdIhHR72x9RVKou5CKObC9ni1gVA1UELhxl2m2c7o3BwHC8F80MTPVDG+SEI3+1GCsheuDKB1tnTDvKjVNz6+3Cec/rY1uAe4xbC4qP1m7XUUDgFwV3plv+hRRaKBRY+PioWdd4/oHzuExoejlp6arsJ7LYSWe50rcgSZ8KvLfMfjmv3CVnB3FM3ScJrSfocC0FoTnfO9ilFLQmHWUvY+PhRywzEfFuSZ10DOzQRMl8QM7AcH5lF/qvR3XLuE2QNBcfKk70JM388JLCL6At2uCSVhAykHv0tV6Vj1OQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BLAPR10MB5316.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(10070799003)(366016)(376014)(1800799024);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: FkYIsC7I8p1FpepDiibiKZ4/EqTG8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JFX4pNWlozijgEg66cl13QXCwyxiIfRFQLVAwa47ifMw3iJwat7kyNrZNeQETL3lJXTaF0P31UlQhcrcU/7r08y7Fvi0L0RaBuBKUqFsRKzYlXnPN3Uj8vbJZQtXKaNYsiaHmOFF0h2r9kexYoRsDKl7OsoUdIA5uvC35Rx/IVbACCg= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: c7496325-2b27-4d68-215a-08dced77245b X-MS-Exchange-CrossTenant-AuthSource: BLAPR10MB5316.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2024 00:11:54.8055 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Tz/pOB3AZtfEpzbxy49PX8HRK/dKLzeGV9N/MXrX4/+SS0GcJE6uICcH35zy4KFXeiCVI31wjO8wXM5m0Am7gi9MNY8/MlTO6eeyiYXM9tI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB4727 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1051,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-10-15_19,2024-10-15_01,2024-09-30_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 malwarescore=0 adultscore=0 bulkscore=0 spamscore=0 mlxlogscore=999 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2409260000 definitions=main-2410150158 X-Proofpoint-ORIG-GUID: SFMEgDH0zo1eZ9KQXUIVom_KY8o7fIrW X-Proofpoint-GUID: SFMEgDH0zo1eZ9KQXUIVom_KY8o7fIrW From: Zhang Yi commit fc8d0ba0ff5fe4700fa02008b7751ec6b84b7677 upstream. Allow callers to pass a NULLL seq argument if they don't care about the fork sequence number. Signed-off-by: Zhang Yi Reviewed-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R Signed-off-by: Catherine Hoang Acked-by: Darrick J. Wong --- fs/xfs/libxfs/xfs_bmap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c index 18429b7f7811..6ef2c2681248 100644 --- a/fs/xfs/libxfs/xfs_bmap.c +++ b/fs/xfs/libxfs/xfs_bmap.c @@ -4595,7 +4595,8 @@ xfs_bmapi_convert_delalloc( if (!isnullstartblock(bma.got.br_startblock)) { xfs_bmbt_to_iomap(ip, iomap, &bma.got, 0, flags, xfs_iomap_inode_sequence(ip, flags)); - *seq = READ_ONCE(ifp->if_seq); + if (seq) + *seq = READ_ONCE(ifp->if_seq); goto out_trans_cancel; } @@ -4641,7 +4642,8 @@ xfs_bmapi_convert_delalloc( ASSERT(!isnullstartblock(bma.got.br_startblock)); xfs_bmbt_to_iomap(ip, iomap, &bma.got, 0, flags, xfs_iomap_inode_sequence(ip, flags)); - *seq = READ_ONCE(ifp->if_seq); + if (seq) + *seq = READ_ONCE(ifp->if_seq); if (whichfork == XFS_COW_FORK) xfs_refcount_alloc_cow_extent(tp, bma.blkno, bma.length);