Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp385058lqm; Wed, 1 May 2024 03:55:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXcc2FAkuimOiHqMDBK/xFbo7OVJknIXRQ97Lx4k2QAuqcV/hlLtpp0Z6o6yAlYJVlVydNzVgnsJ6PFL9B3ZxzJUlY0ewshNJYj51VkKQ== X-Google-Smtp-Source: AGHT+IHNgaaCS8KjrgyUmbcQJV+pVvic6tZNFNDUJT/o5tvTyeOj9B02W0Pyxv0051GIO+G/cAKJ X-Received: by 2002:ac2:559b:0:b0:51b:c43e:ea97 with SMTP id v27-20020ac2559b000000b0051bc43eea97mr1219927lfg.69.1714560930218; Wed, 01 May 2024 03:55:30 -0700 (PDT) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id y11-20020a056402440b00b005720d0f2d01si12367980eda.39.2024.05.01.03.55.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 03:55:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-165159-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=HQDzRP03; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=KEqSrMa7; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-165159-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-165159-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=oracle.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C5B231F24734 for ; Wed, 1 May 2024 10:55:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 597E756763; Wed, 1 May 2024 10:55:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="HQDzRP03"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="KEqSrMa7" Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.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 03D974F881; Wed, 1 May 2024 10:55:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714560917; cv=fail; b=RUEDAw4Pzgaq5oDdTp/5DwxbvdLJqyzdsh0d70zrjz0pwP/8K+Xegoi96qaHf5OWGEbhXyfzO6Azfpcv0JYLzOie+neN2YBTcY0r8DzicVQbg9dBBL1bpx6cOIONY2cYjcpTRtYwu6Tnt3qlyGBxCtg/dMK5sdGyu9Jn6r2/yyQ= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714560917; c=relaxed/simple; bh=DDGt5H60xox97iKb4jsMhSc5pDN90WhesPIjYIloxzk=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=abIQgXlj1XOHGxMOsxF9zUNg/kF2kwRTPFzIiNNKQcPTrZNoaXycRgl/pwhWxMiYp9p1gjmT1H3L4Vt4yyMV2CSaxnnb+wCNyfxZAdA7eD1ser64Y2ifAh3LX+6merAr76xmWp141B7h6Tcumrv6LwJI02HtxQh9XMlLErT/LZQ= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine 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=HQDzRP03; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=KEqSrMa7; arc=fail smtp.client-ip=205.220.177.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 441ARxjL032762; Wed, 1 May 2024 10:54:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-11-20; bh=jgsqlBpQVyyC70+Hy13IxD6kVnZ2QAl+61NL5JEWOeQ=; b=HQDzRP03CIaXHvH+D9BJeSxz8nV2qwW5+oyB9nwSHB3ZntlSchqXb+exF8TxOjq85LSJ hyDbcGnBMY6/Cts5f/nR5vq6pbE8A1Hrw1q+gBfnhWySPkr71gE8eBPmXFEC9Mc24MSC WOW0Juwpq6oh3thuTNKnfeRiEXmip+PlM94hzQUccoDvUFL0MCi7o/tr3/RoGtzJRb+f G8hS3NX/6BbsrBDZuv3lnERGJ0rYJXcAzOeO2mKltYzF/O5hgi0lHZcA1iz0RifV2KQh fhX7o5+fO7X8oKVSAC1hGhRVUl8gbAgaUF3fmYCXb2YUioVj4hMEKh2zLGVbBsMYc+RQ hA== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3xrqsexww1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 01 May 2024 10:54:52 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 4419oKSa005149; Wed, 1 May 2024 10:54:51 GMT Received: from nam02-sn1-obe.outbound.protection.outlook.com (mail-sn1nam02lp2041.outbound.protection.outlook.com [104.47.57.41]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3xrqt8paar-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 01 May 2024 10:54:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mq6lOeFhpBf4yLF3cNARAhQ12wiicd901ChdOiQztTbgPIf9XzuZHLRN3EBvBZIRNV5NhY/Hn0k+6svNW3ZGuwlofNXY4WgbMcye7+IEEBRSo4S80HQlBF9MOrN4e1jx2aX5iNUAilKF6khnD3LBrKGCDxXoBcm8wAhPMMGMfJYInlSfM4vUt2niJR+C+Qt23yHjVhiS0CLiAb+Xidnfp6Fs0E2lo/9ttZCT5m7XX+z4ApURCpDEikUbjp8DYcsPwhhHWD0TP0iCMxFLWPWK+k0H8FFdfHs8BuK7XpIDNJxo+E1ZxBF3izm5gzGT33g+1XCZnn5MRuupaaHB+t2qeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=jgsqlBpQVyyC70+Hy13IxD6kVnZ2QAl+61NL5JEWOeQ=; b=S3Zx6RmPzuVLFfZKI6R1fNZc/FJNcnfNm80L4WUkmkhgNJn+yVto/fTe5g4pXmeXSjo5LjcR1yoYYRYP3/UYiMf39D3ZZxfQ9LEYU1qu7k45D1Gtk1IG0J7ko0DyB7Sh2VPji/W2gAA31fwyA5ucvaZbtAw3cB63Ur3dtAuXjREQMAJM3Igvy2rrcwDMud56Cp0MRsUs2FX4fGOy0ITr0oHDQ47pk+HsdmttxpnLEt0uIOtprVFNSDWUTJZZfs9WB4dsFlnj6p00BCF5vqaD26hyf4bZpqqTProcCU7mJx3u0jOLoZVtWVq1wA9q4l+CnUv3RVzEQALgcqWwCGDGYQ== 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=jgsqlBpQVyyC70+Hy13IxD6kVnZ2QAl+61NL5JEWOeQ=; b=KEqSrMa71gakyAJDWU3ZLiZS60EP07cCoMEVyRFfJ8dsEeYgRPXsXENcabdkpc8LCMHLR3Z9s4he+H759Qiw5rXj74Yoos0Vh/VvEl1nn1SyZ9UPCzdldf//zRbyDzgP2KEEF9Lf4eLtfh/G/oeKIrir5GZgwvaK+g5OvuV6Joc= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by CH3PR10MB6836.namprd10.prod.outlook.com (2603:10b6:610:14f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.35; Wed, 1 May 2024 10:54:49 +0000 Received: from DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::4f45:f4ab:121:e088]) by DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::4f45:f4ab:121:e088%5]) with mapi id 15.20.7544.023; Wed, 1 May 2024 10:54:49 +0000 Message-ID: <05016d8f-cc25-4148-bf78-6567cc2dfbc4@oracle.com> Date: Wed, 1 May 2024 11:54:43 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH RFC v3 11/21] xfs: Unmap blocks according to forcealign To: Dave Chinner Cc: djwong@kernel.org, hch@lst.de, viro@zeniv.linux.org.uk, brauner@kernel.org, jack@suse.cz, chandan.babu@oracle.com, willy@infradead.org, axboe@kernel.dk, martin.petersen@oracle.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, tytso@mit.edu, jbongio@google.com, ojaswin@linux.ibm.com, ritesh.list@gmail.com, mcgrof@kernel.org, p.raghav@samsung.com, linux-xfs@vger.kernel.org, catherine.hoang@oracle.com References: <20240429174746.2132161-1-john.g.garry@oracle.com> <20240429174746.2132161-12-john.g.garry@oracle.com> Content-Language: en-US From: John Garry Organization: Oracle Corporation In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P123CA0069.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1::33) To DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) 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: DM6PR10MB4313:EE_|CH3PR10MB6836:EE_ X-MS-Office365-Filtering-Correlation-Id: dcabe19d-4d1b-436d-cc5c-08dc69cd1f19 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|7416005|376005|366007|1800799015; X-Microsoft-Antispam-Message-Info: =?utf-8?B?cW1NUFVuTzJmMm1mSXplSmRZd2ZmYmlDeldFdm1sQjZGSEJ3ZFJDdE9SVTZk?= =?utf-8?B?bExYM3NqbC85WlAvc3B2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QmIRO85ksFmhma1eKln7dBfiaClZB0WNcZ8J6aXCSwkLQDNCXma4uzuN+Zvl8StESrhHgxD3Hl2sEHa3QulOMS//3T8fGXctMoFO1eJLTGrWDiPYYVr8ObqoMeuRL3WaQIJuMwvmfDjx653mLnF5D1ywSGz9nUbPQFqPOWpyqyOpcQqkS3avCcIL/Lug/EydQXOym5eI= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: dcabe19d-4d1b-436d-cc5c-08dc69cd1f19 X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 May 2024 10:54:49.2825 (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: Kh0Ke8thfVfjx/r6adRwkraRBAnin1ABLBrYYiWzjlEgOteVjbGztNGHgXhfZs0vABk7wkqt4nOySjKhXBAxSA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR10MB6836 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-01_10,2024-04-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 bulkscore=0 adultscore=0 phishscore=0 mlxscore=0 suspectscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2405010077 X-Proofpoint-ORIG-GUID: MO895rLumaoCCS7RboV3R-5emnzm9mAq X-Proofpoint-GUID: MO895rLumaoCCS7RboV3R-5emnzm9mAq On 01/05/2024 01:10, Dave Chinner wrote: > On Mon, Apr 29, 2024 at 05:47:36PM +0000, John Garry wrote: >> For when forcealign is enabled, blocks in an inode need to be unmapped >> according to extent alignment, like what is already done for rtvol. >> >> Signed-off-by: John Garry >> --- >> fs/xfs/libxfs/xfs_bmap.c | 39 +++++++++++++++++++++++++++++++++------ >> fs/xfs/xfs_inode.h | 5 +++++ >> 2 files changed, 38 insertions(+), 6 deletions(-) >> >> diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c >> index 4f39a43d78a7..4a78ab193753 100644 >> --- a/fs/xfs/libxfs/xfs_bmap.c >> +++ b/fs/xfs/libxfs/xfs_bmap.c >> @@ -5339,6 +5339,15 @@ xfs_bmap_del_extent_real( >> return 0; >> } >> >> +/* Return the offset of an block number within an extent for forcealign. */ >> +static xfs_extlen_t >> +xfs_forcealign_extent_offset( >> + struct xfs_inode *ip, >> + xfs_fsblock_t bno) >> +{ >> + return bno & (ip->i_extsize - 1); >> +} >> + >> /* >> * Unmap (remove) blocks from a file. >> * If nexts is nonzero then the number of extents to remove is limited to >> @@ -5361,6 +5370,7 @@ __xfs_bunmapi( >> struct xfs_bmbt_irec got; /* current extent record */ >> struct xfs_ifork *ifp; /* inode fork pointer */ >> int isrt; /* freeing in rt area */ >> + int isforcealign; /* freeing for file inode with forcealign */ >> int logflags; /* transaction logging flags */ >> xfs_extlen_t mod; /* rt extent offset */ >> struct xfs_mount *mp = ip->i_mount; >> @@ -5397,7 +5407,10 @@ __xfs_bunmapi( >> return 0; >> } >> XFS_STATS_INC(mp, xs_blk_unmap); >> - isrt = xfs_ifork_is_realtime(ip, whichfork); >> + isrt = (whichfork == XFS_DATA_FORK) && XFS_IS_REALTIME_INODE(ip); > > Why did you change this check? What's wrong with > xfs_ifork_is_realtime(), and if there is something wrong, why > shouldn't xfs_ifork_is_relatime() get fixed? oops, I should have not made that change. I must have changed it when debugging and not reverted it. > >> + isforcealign = (whichfork == XFS_DATA_FORK) && >> + xfs_inode_has_forcealign(ip) && >> + xfs_inode_has_extsize(ip) && ip->i_extsize > 1; > > This is one of the reasons why I said xfs_inode_has_forcealign() > should be checking that extent size hints should be checked in that > helper.... Right. In this particular case, I found that directories may be considered as well if we don't check for xfs_inode_has_extsize() (which we don't want). > >> end = start + len; >> >> if (!xfs_iext_lookup_extent_before(ip, ifp, &end, &icur, &got)) { >> @@ -5459,11 +5472,15 @@ __xfs_bunmapi( >> if (del.br_startoff + del.br_blockcount > end + 1) >> del.br_blockcount = end + 1 - del.br_startoff; >> >> - if (!isrt || (flags & XFS_BMAPI_REMAP)) >> + if ((!isrt && !isforcealign) || (flags & XFS_BMAPI_REMAP)) >> goto delete; >> >> - mod = xfs_rtb_to_rtxoff(mp, >> - del.br_startblock + del.br_blockcount); >> + if (isrt) >> + mod = xfs_rtb_to_rtxoff(mp, >> + del.br_startblock + del.br_blockcount); >> + else if (isforcealign) >> + mod = xfs_forcealign_extent_offset(ip, >> + del.br_startblock + del.br_blockcount); > > There's got to be a cleaner way to do this. > > We already know that either isrt or isforcealign must be set here, > so there's no need for the "else if" construct. right > > Also, forcealign should take precedence over realtime, so that > forcealign will work on realtime devices as well. I'd change this > code to call a wrapper like: > > mod = xfs_bunmapi_align(ip, del.br_startblock + del.br_blockcount); > > static xfs_extlen_t > xfs_bunmapi_align( > struct xfs_inode *ip, > xfs_fsblock_t bno) > { > if (!XFS_INODE_IS_REALTIME(ip)) { > ASSERT(xfs_inode_has_forcealign(ip)) > if (is_power_of_2(ip->i_extsize)) > return bno & (ip->i_extsize - 1); > return do_div(bno, ip->i_extsize); > } > return xfs_rtb_to_rtxoff(ip->i_mount, bno); > } ok, that's neater Thanks, John