Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp406002lqm; Wed, 1 May 2024 04:36:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV5WD5vDpxaKiQlZgdZKzGNo6XbyGhx+3shXF5+UoJFGNGUU0GKh6Jucs7HOnnBfvGyR/A+6vbdxMU8pGY1QkB3qJpNQd2poXZ7Cm2AcA== X-Google-Smtp-Source: AGHT+IF1mh+G75HxuPAZPdJN1ziZgk2oxPmk5S4ZuYmTcaS74fXgEIVAelqIiFcdGfAcUip9sxnS X-Received: by 2002:a17:902:6bc6:b0:1eb:a636:ecab with SMTP id m6-20020a1709026bc600b001eba636ecabmr1927875plt.34.1714563416123; Wed, 01 May 2024 04:36:56 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id s11-20020a17090302cb00b001ebd7bc7013si5809036plk.496.2024.05.01.04.36.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 04:36:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-165191-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=IwEsjy+I; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=XXHG0QAg; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-165191-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-165191-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 512A5284FAB for ; Wed, 1 May 2024 11:36:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 153D682488; Wed, 1 May 2024 11:36:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="IwEsjy+I"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="XXHG0QAg" 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 AD7A57710B; Wed, 1 May 2024 11:36:43 +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=1714563405; cv=fail; b=Zz5seZ5RmKa2ehIGmt7X4abgESD3FjhYoSxx6S8eJoP1DdO65rm4nCh+rIzCrX7bSfyt0jTN6Jda8S5ObncX27HUMSTLW3kalo0aIibGnb6NyXpqR51ZANdd9jGon64zsBheSkDm27SYbvmMrlV/DDExQ6RodEL2xcAh1WCd7d0= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714563405; c=relaxed/simple; bh=dJNS3sZGvFTdpt3brjDDXRk+mG5+miY5qz/IKEpj2HM=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=lpDqawRHT7iMZRA0kohZQhJ+nLJ7bnlN1lzNX1FVKiDsjbVImY36ADkFb4/rncn1YhV6zShQ2LKYT5Dh+SdOYS9WgVRPSLCTCLoYli8091hM5iccItPCbM9l+XuS8+J1mMHWdIZP7Z587d1ZaqKnT/JRXBkwIcqpzvLcIUJgbaQ= 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=IwEsjy+I; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=XXHG0QAg; 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 441ASQc9000841; Wed, 1 May 2024 11:36:21 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=JGRNBvC3/N+VOr+sWUDvPh7J4Vf9Jg/NApNFm/EJdmc=; b=IwEsjy+IWw4pPV1bs4mqVkKwb7EB0zkFyrdsvKoV8C1AKJOhvO0ZgZafZQ8uTNPStglP +8BYJZ79efuclIWHoO5FL9cI4LBNtRi2Pw9qfUmsFtVaeqiVmrTHiF4+Pj6MeJf1GLJR rDQft1FZD7mli8PZiGCSbpC264QzY1ssuYWlUlVEvJwyD6lWai1aZC5/dRbuEgdnBp3l tfEzRZmj9fxcwIMAl/GvBwOENkXRznZKirpfO8WZ/COdWHSy5LI7TudhsufsgFhly5qr nGzfgnJJZjwWZcgiHgKfpjEJO74JY+t0qQcf82Kih1qy4Dtkrne57tLDJR2TKgKMiBsQ iw== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3xrqsexyay-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 01 May 2024 11:36:20 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 441B9L09033191; Wed, 1 May 2024 11:36:20 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2168.outbound.protection.outlook.com [104.47.56.168]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3xrqt8yrav-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 01 May 2024 11:36:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q7/jrz4nN/cCkIYgI64hoHfPitsGvWauygIq/sgVgxcQpI3Taxcr38aN9nLlYZGXer0HdEmdzW7+JWEkKRBa1iNw6r4gYCTwN4v1pflh/VF9VrP8dLbOT8404K21BhDHRdKfVfe2+79qqalCarQnxcIasHqd1jHzuw4GfE6Hy/jJrAwzsLH8/A+5kxqvAqyQXW7Z4Ef6YrpRL+090YEywS4kC8B/Q/h4UUry6YVywn3gUq2Vd6/fN5GCULmlxz3oQYk4AOuiDBX+fPBa7chWFvkrl12MEvBNVRerK8zcrDawkqGm5paSxyN3iV0gBylIzceN6hANSbubKZ8BrUiyIg== 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=JGRNBvC3/N+VOr+sWUDvPh7J4Vf9Jg/NApNFm/EJdmc=; b=AHHqnTvywRuKk/0rSJQhE9VM5jDZZlkBDCXLqpXsVaonXz2SqP6o//UEwQJLLyHA0v4w1g71TR9dFlX4qJIPEA4iiYTbHQX28a0E/T4aUjIZIPI2NDuzsrCYNp8SnFqNoVYl0ZNX8y5KmXMjITaGprPuikBYPZOVYYiA7OxRIDWY4uiHToERMBjal/B93QlFFGjcr8hSbuF/grsyKig/jQaRQsCQbdUZAVNlX9dAhXUydmUrqtmO8UBU3BdSSI827HyxiUx/9ZfoGbNIxgBxJeHroXzCtaW7zLxvYhMASb5g9u4crnavVxg1fRXiyhIJ2g0BCsIprbx1inLBejs5gA== 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=JGRNBvC3/N+VOr+sWUDvPh7J4Vf9Jg/NApNFm/EJdmc=; b=XXHG0QAg8WsOU0y+rCaYAwOaKks+5IXlJ4z/wbCirS6oI6rKDBx/pP92vP67h7owpm3gKD/1NqRBaGX38PhUACU00RrVkaa+UkcV7ADidA0U9ruH2+z9gsPtt9WikkQVv4BbZl84hQu2Vpt3VN1dBXJcl/nNI9V3VmRc8suljVA= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by DM6PR10MB4266.namprd10.prod.outlook.com (2603:10b6:5:210::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.28; Wed, 1 May 2024 11:36:17 +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 11:36:17 +0000 Message-ID: <0eb8b5b6-1a59-445c-8ac1-1de2a1c0ce4a@oracle.com> Date: Wed, 1 May 2024 12:36:02 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 15/21] fs: xfs: iomap: Sub-extent zeroing 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-16-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: LO4P265CA0290.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:38f::17) 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_|DM6PR10MB4266:EE_ X-MS-Office365-Filtering-Correlation-Id: 05f3be51-390b-4575-1dcc-08dc69d2ea08 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|376005|7416005|1800799015; X-Microsoft-Antispam-Message-Info: =?utf-8?B?aVBhWFhoZitYRi85NEloM29ON0FjRkxjZTRXOW9ObW9DeUU3SUtRNEU5K3hL?= =?utf-8?B?M2RNM2E0SGZhTzEzOHVzV2IrdCtCMThkV1R0d0Zxc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NjlpdjZnNGtvY3RpeFUvMXQrR0VlOWZqMTR6bWRuNzEw?= =?utf-8?B?STRlSFJIWm9LVU9yb3d2WWY1ZytFQkQ1OUJ3UUtDY1A4bmprbTZ5YmY5cXJR?= =?utf-8?B?cEdMdG05TXJlb0xWenBOVHNyTHJNcGNMeFp4cGVYUkpVWUN5NkN6V1VGZENo?= =?utf-8?B?KzJneDlmTCtMTzJYcm5qektUK0R1VlRoWC9VdFpFSUtQTkI2YnRTTWE0MEdp?= =?utf-8?B?bW1rc2pLcm5XQWEyU0dLS3dVS255dnAzeU5oVG5Md1dyVTF5U0ZvMnU1MERE?= =?utf-8?B?aEt6dmRGRHF1NWEvVTkvVnNacEViT3FOemFOcUx5anl6RXhoMGRwOHEwZkVZ?= =?utf-8?B?c3UwcW9ObjAxbndHVGhlMWRtMndsUUJPZzFZaGoyRU5mQWZIcml2V2dIZDYy?= =?utf-8?Q?HL0s4isemGD9UFTf6qW6XPLGZ?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: H0MBkU1MdI1TU48Ph710ciJ5XB7Y0RcRJVq40Y8/DRwimAebGs7ynp9ikjShoMzaJh+dbLhFJD+yjINQcBXfEpUzrLmlDWFyII+Tz11YFUuxzKc25YQyAtZeQ2w3t/nWKHY4H9zV/BOwYnthI/MoNbmynV8xmP1zv0MRR7d9m00VKXloHCbA/mOLlMuixDURIwUfPxY93tqOAF09HSmEy/fNqud52DQfpF653fp6xZYtx6QasDFRYv+da/JfMWbmy7Sh9JdDjm+zuF3LNb/engZFPDZLwd7G6x71SsMse42FyJ9JGDFtGLpW+AXTbYt5yEeFslJXHY6I9gI95JdOj0ARonOpgHxDNX66VWE3gsZwrq8XFouhodeZdvdkpWF9VAbamokIdh6hKr+aboXwawoBOCm45f2wITrLyAs2LoSdIQdYLMm3lE1y3Kyp51GxT6O7BZ55al4crhPe5SmFlnsmhd1HtuQuvDvj91PdqdFlhcCS2TnqQNdM0yEHCHybeI+rtlndTYdTWoS6u/Im187qPpUsObUN6W0tVWKpZv3sHO5jVMMwRYXgmOMRVX8q+8BJGel9UadlE5cMCevSvz/DeXKmrj3wp6mvACI4TT8= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 05f3be51-390b-4575-1dcc-08dc69d2ea08 X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 May 2024 11:36:17.2123 (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: yFfIfxjIyf2FuOvMyJBXHaOPb13/KkgXk48ac9Py51i9S/e4pRmjUoi3w+oonFiR2S48SA4jFw/qz1qKWAf7QQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR10MB4266 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_11,2024-04-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 phishscore=0 bulkscore=0 suspectscore=0 malwarescore=0 spamscore=0 adultscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2405010080 X-Proofpoint-ORIG-GUID: CnRu1_afS67ps0ou2lBVmi_jB_XfxrOG X-Proofpoint-GUID: CnRu1_afS67ps0ou2lBVmi_jB_XfxrOG On 01/05/2024 02:32, Dave Chinner wrote: > On Mon, Apr 29, 2024 at 05:47:40PM +0000, John Garry wrote: >> Set iomap->extent_size when sub-extent zeroing is required. >> >> We treat a sub-extent write same as an unaligned write, so we can leverage >> the existing sub-FSblock unaligned write support, i.e. try a shared lock >> with IOMAP_DIO_OVERWRITE_ONLY flag, if this fails then try the exclusive >> lock. >> >> In xfs_iomap_write_unwritten(), FSB calcs are now based on the extsize. > > If forcedalign is set, should we just reject unaligned DIOs? Why would we? That's very restrictive. Indeed, we got to the point of adding the sub-extent zeroing just for supporting that. > > ..... >> Signed-off-by: John Garry >> --- >> fs/xfs/xfs_file.c | 35 ++++++++++++++++++++++------------- >> fs/xfs/xfs_iomap.c | 13 +++++++++++-- >> 2 files changed, 33 insertions(+), 15 deletions(-) >> >> diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c >> index e81e01e6b22b..ee4f94cf6f4e 100644 >> --- a/fs/xfs/xfs_file.c >> +++ b/fs/xfs/xfs_file.c >> @@ -620,18 +620,19 @@ xfs_file_dio_write_aligned( >> * Handle block unaligned direct I/O writes > > * Handle unaligned direct IO writes. > >> * >> * In most cases direct I/O writes will be done holding IOLOCK_SHARED, allowing >> - * them to be done in parallel with reads and other direct I/O writes. However, >> - * if the I/O is not aligned to filesystem blocks, the direct I/O layer may need >> - * to do sub-block zeroing and that requires serialisation against other direct >> - * I/O to the same block. In this case we need to serialise the submission of >> - * the unaligned I/O so that we don't get racing block zeroing in the dio layer. >> - * In the case where sub-block zeroing is not required, we can do concurrent >> - * sub-block dios to the same block successfully. >> + * them to be done in parallel with reads and other direct I/O writes. >> + * However if the I/O is not aligned to filesystem blocks/extent, the direct >> + * I/O layer may need to do sub-block/extent zeroing and that requires >> + * serialisation against other direct I/O to the same block/extent. In this >> + * case we need to serialise the submission of the unaligned I/O so that we >> + * don't get racing block/extent zeroing in the dio layer. >> + * In the case where sub-block/extent zeroing is not required, we can do >> + * concurrent sub-block/extent dios to the same block/extent successfully. >> * >> * Optimistically submit the I/O using the shared lock first, but use the >> * IOMAP_DIO_OVERWRITE_ONLY flag to tell the lower layers to return -EAGAIN >> - * if block allocation or partial block zeroing would be required. In that case >> - * we try again with the exclusive lock. >> + * if block/extent allocation or partial block/extent zeroing would be >> + * required. In that case we try again with the exclusive lock. > > Rather than changing every "block" to "block/extent", leave the bulk > of the comment unchanged and add another paragraph to it that says > something like: > > * If forced extent alignment is turned on, then serialisation > * constraints are extended from filesystem block alignment > * to extent alignment boundaries. In this case, we treat any > * non-extent-aligned DIO the same as a sub-block DIO. ok, fine > >> */ >> static noinline ssize_t >> xfs_file_dio_write_unaligned( >> @@ -646,9 +647,9 @@ xfs_file_dio_write_unaligned( >> ssize_t ret; >> >> /* >> - * Extending writes need exclusivity because of the sub-block zeroing >> - * that the DIO code always does for partial tail blocks beyond EOF, so >> - * don't even bother trying the fast path in this case. >> + * Extending writes need exclusivity because of the sub-block/extent >> + * zeroing that the DIO code always does for partial tail blocks >> + * beyond EOF, so don't even bother trying the fast path in this case. >> */ >> if (iocb->ki_pos > isize || iocb->ki_pos + count >= isize) { >> if (iocb->ki_flags & IOCB_NOWAIT) >> @@ -714,11 +715,19 @@ xfs_file_dio_write( >> struct xfs_inode *ip = XFS_I(file_inode(iocb->ki_filp)); >> struct xfs_buftarg *target = xfs_inode_buftarg(ip); >> size_t count = iov_iter_count(from); >> + struct xfs_mount *mp = ip->i_mount; >> + unsigned int blockmask; >> >> /* direct I/O must be aligned to device logical sector size */ >> if ((iocb->ki_pos | count) & target->bt_logical_sectormask) >> return -EINVAL; >> - if ((iocb->ki_pos | count) & ip->i_mount->m_blockmask) >> + >> + if (xfs_inode_has_forcealign(ip) && ip->i_extsize > 1) >> + blockmask = XFS_FSB_TO_B(mp, ip->i_extsize) - 1; >> + else >> + blockmask = mp->m_blockmask; > > alignmask = XFS_FSB_TO_B(mp, xfs_inode_alignment(ip)) - 1; Do you mean xfs_extent_alignment() instead of xfs_inode_alignment()? > > Note that this would consider sub rt_extsize IO as unaligned, > which > may be undesirable. In that case, we should define a second helper > such as xfs_inode_io_alignment() that doesn't take into account RT > extent sizes because we can still do filesystem block sized > unwritten extent conversion on those devices. The same IO-specific > wrapper would be used for the other cases in this patch, too. ok, fine > >> + >> + if ((iocb->ki_pos | count) & blockmask) >> return xfs_file_dio_write_unaligned(ip, iocb, from); >> return xfs_file_dio_write_aligned(ip, iocb, from); >> } >> diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c >> index 4087af7f3c9f..1a3692bbc84d 100644 >> --- a/fs/xfs/xfs_iomap.c >> +++ b/fs/xfs/xfs_iomap.c >> @@ -138,6 +138,8 @@ xfs_bmbt_to_iomap( >> >> iomap->validity_cookie = sequence_cookie; >> iomap->folio_ops = &xfs_iomap_folio_ops; >> + if (xfs_inode_has_forcealign(ip) && ip->i_extsize > 1) >> + iomap->extent_size = XFS_FSB_TO_B(mp, ip->i_extsize); > > iomap->io_block_size = XFS_FSB_TO_B(mp, xfs_inode_alignment(ip)); > >> return 0; >> } >> >> @@ -570,8 +572,15 @@ xfs_iomap_write_unwritten( >> >> trace_xfs_unwritten_convert(ip, offset, count); >> >> - offset_fsb = XFS_B_TO_FSBT(mp, offset); >> - count_fsb = XFS_B_TO_FSB(mp, (xfs_ufsize_t)offset + count); >> + if (xfs_inode_has_forcealign(ip) && ip->i_extsize > 1) { >> + xfs_extlen_t extsize_bytes = mp->m_sb.sb_blocksize * ip->i_extsize; >> + >> + offset_fsb = XFS_B_TO_FSBT(mp, round_down(offset, extsize_bytes)); >> + count_fsb = XFS_B_TO_FSB(mp, round_up(offset + count, extsize_bytes)); >> + } else { >> + offset_fsb = XFS_B_TO_FSBT(mp, offset); >> + count_fsb = XFS_B_TO_FSB(mp, (xfs_ufsize_t)offset + count); >> + } > > More places we can use a xfs_inode_alignment() helper. > > offset_fsb = XFS_B_TO_FSBT(mp, offset); > count_fsb = XFS_B_TO_FSB(mp, (xfs_ufsize_t)offset + count); > rounding = XFS_FSB_TO_B(mp, xfs_inode_alignment(ip)); > if (rounding > 1) { > offset_fsb = rounddown_64(offset_fsb, rounding); > count_fsb = roundup_64(count_fsb, rounding); > } ok, but again I assume you mean xfs_extent_alignment() Thanks, John