From patchwork Fri Sep 29 10:27:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 13404041 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B4E8E732D0 for ; Fri, 29 Sep 2023 10:33:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233233AbjI2Kdw (ORCPT ); Fri, 29 Sep 2023 06:33:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233232AbjI2KdF (ORCPT ); Fri, 29 Sep 2023 06:33:05 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8113F1BDF; Fri, 29 Sep 2023 03:31:31 -0700 (PDT) Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38SK9STr022442; Fri, 29 Sep 2023 10:28:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=m+7AvDx9yW5qI8bkPF30T94MYRbkTwt6XcN/+CgEjBs=; b=hXrzUSF01iMuOB07c8YlFZsTNu7UySaJm4IKKM0jGIxJbPkoQSYEN93eS4Ic3De2wD3/ 2WiS/BqUkZ16AyAOdwytA1qCRD8Ep+6l/ILug0oi5fVh9cEfcQ7jTwTav0J4ES0jxd5v pkpU6CrcgqTAJTee+gGF3cR3qIBKPFZklMFMb8H+f2abeTFo881zrpFlJ0UwL0nKDwRV zHzafiikU8GanzKGw9Gh/e4n9HnMeNECC/jg+DdgadwfFxnOEaomwPvOQM/4ooINo+BX I+chWtTws8p8BHunD7McCq3WipMHnr8y7uRl0wkx1Q0RCAYcgCId/VbN7h5wiB62DAxx Ug== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3t9qwbpbr0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 29 Sep 2023 10:28:46 +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 38T9iSOE015821; Fri, 29 Sep 2023 10:28:45 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2102.outbound.protection.outlook.com [104.47.70.102]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3t9pfh4vtc-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 29 Sep 2023 10:28:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DBzIpqvO/ALLBkPujpMZGIEIhRbKVUPPCb0AIqobEr06V/CHyMaV2Kvd9vrqCYkGti1QxdBZ1yfD7OFnCt9ST0Oa7c8WzJypX+Se6tD5ej8KBt9XbHvgKbjAOkwtZdZED4BTL/IP6VuEO0gshU4CqIPgSPhRY+EG60jVbGaeg0IpqHC/NinCSr6obgtoOjklZJl+4tYUVNO16Ene7yudlHEUofUBsXPOb9nduuKixIATXt3Z8puLHtpPr0zBxj+/4YxdA4ougZ8RLoP64EJPN8JDVITzhUBnmh6/eNpWgyuQibH6W7kNRkwYuVRDgaGrOaNC5WQdb/gt1pm5SYPzlA== 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=m+7AvDx9yW5qI8bkPF30T94MYRbkTwt6XcN/+CgEjBs=; b=M+TwEOXp9nt0hyB4lMG07DGbRe9HDiMSKS7EeiMrnQj8yMr6kW90fTtgjC3WguAhceQsx9ueDWeyDSJLc+fcCcb0tGbymW24MFa9ftcf5inBUguNcqWUMVicGx7UWeznoYjzUUqMyJGIaEiPiS1ruUbow5yDlH7Du0xQ6KmVpeYXYZSEbE41nhF3CRQWWy5mhuzTsNzgoDXvbjnrPkti23P7eYRgGg8fHjbPqMtZqbUh2qmV6iyQYWBdI4ipMc99/uGNkXlEi+esyVMwfKyDx/d1GpvRkD32CLgktVnP49czs1hm7yHBjFe8wZFGsvOFMtgpDMEqUmanGVQAFFFGOg== 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=m+7AvDx9yW5qI8bkPF30T94MYRbkTwt6XcN/+CgEjBs=; b=wY8oKXGn/f3L0f9X7SdTq8BQv7VoobwJswoElyfCNEbOqS3+kMI69QgsRiuUILhjHcbOQGm8IRRckpKTKxynXpkmLOG169ExHJ6Zj9nePwS2JDMR3EJv4MTW8zE8DCuEEKgMGdX3pa3rE8RbbYnLDQ5E4lZJ6ldq0Pw405yFzrY= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by PH7PR10MB6153.namprd10.prod.outlook.com (2603:10b6:510:1f7::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Fri, 29 Sep 2023 10:28:21 +0000 Received: from DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::ebfd:c49c:6b8:6fce]) by DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::ebfd:c49c:6b8:6fce%7]) with mapi id 15.20.6813.027; Fri, 29 Sep 2023 10:28:21 +0000 From: John Garry To: axboe@kernel.dk, kbusch@kernel.org, hch@lst.de, sagi@grimberg.me, jejb@linux.ibm.com, martin.petersen@oracle.com, djwong@kernel.org, viro@zeniv.linux.org.uk, brauner@kernel.org, chandan.babu@oracle.com, dchinner@redhat.com Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, tytso@mit.edu, jbongio@google.com, linux-api@vger.kernel.org, John Garry Subject: [PATCH 11/21] fs: xfs: Don't use low-space allocator for alignment > 1 Date: Fri, 29 Sep 2023 10:27:16 +0000 Message-Id: <20230929102726.2985188-12-john.g.garry@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230929102726.2985188-1-john.g.garry@oracle.com> References: <20230929102726.2985188-1-john.g.garry@oracle.com> X-ClientProxiedBy: PH8PR07CA0022.namprd07.prod.outlook.com (2603:10b6:510:2cd::21) To DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR10MB4313:EE_|PH7PR10MB6153:EE_ X-MS-Office365-Filtering-Correlation-Id: b6ac4eb9-bb30-46dd-6a95-08dbc0d6cdfb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Syg2bljJJIPtyHffVkRlpnM6YCFzxI8gtT76q22TxP4Txw+PQqcFX/g74rPy5Bbrmn7S29IBl6JENmABUt67NKV2WSJ6y0eXw2EOAlr/tq3ygnrwCCRphZ8VZFxW8X1OoQJCUqy9Tuf9Qup9+F0LRjsvtZYmGNU5x4O3SdwVVXC9FhRPQYIP0ClqB9mC1NLb5BXYSq3lKWr0EeYO0DlD3ZKgGz1/j8g0TSi8epCe4GommMUXhGi4NJp/dW650FuOEkHDV6DMcqJkxmHxuc3QaY+yagOzfV9loMSeG0TxagSC8DYn7y/L87ULphl3TVsV/PdBH6/JCvzsiCb7K5VjpsIzlc0zZc7y+YQfUdkWMrPDUJxbbjB6J75OlSJ08MhsWMA9hF6YbwD/yTcsd5rZukAwRQHTgm8dLqXQL2rijvurlNPBd0fhAaJri/LGO+BPoZxQP9bX1ZNK9kfq1W7mPGDVthWYez4jirDxgZyxLYlsuMV/g+BqdDO5rK7CFfKgNoQN9UdzibFP4rJPf+sgypeinDOs+hZ1mbaCxyfF3YihtOuhBqWPxwBvM375+u6HyYK3RhYMT3YClIBVOU47RE/wV0BTDjjx2VDimY/Ev34= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR10MB4313.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(39860400002)(366004)(346002)(376002)(396003)(230922051799003)(186009)(64100799003)(1800799009)(451199024)(6506007)(6512007)(4744005)(921005)(107886003)(1076003)(26005)(2616005)(8936002)(4326008)(36756003)(103116003)(66556008)(7416002)(2906002)(5660300002)(41300700001)(66946007)(86362001)(316002)(8676002)(66476007)(6666004)(478600001)(38100700002)(6486002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: L+I6qjqLuj6cGynD5FlYFq++A1oXkLy2gyLMvGALXBDkVm7CHegOg/K2aDwnPp/Cb7yJM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+22TI5Yl1nei3w400uuR0okye4oUt9f9nWrfxdBiFWS0tFMPKUgpye2Dz3BWJzqifiMPHv6H7k+uaA6i2nK8GwDqeAXEvAgxeu+mqSETsylDauP/P5kJ/JnVTl057sPZbg+uh3UZdFL9Nkw4fQP8oj1Zss9u1NuXjYOm0kBMPlxCmgHtJZpI6EKocd8auaOQIFhqpA3PvBiRhj8ZKxSFlnMgz+Gwub52bxo37/ebFcjsW8ZT3vCYKjayl9M4YPe2LDMxtUUXpW6vwWQ329dHod+ypFIf+9pLYy6F5/eesdsiQage8JqdMFGWUNFnYckRZ9tEO6TIFWJ4VDPcl6cBGgF0MnliIJ+hSvC6kHQSZEduJt4pClcAYXvJkQJc+N3skkTgr8QjCRL82PjfHpoP8Y4b+EmfCPIVSvNeRYZlzWSqVv3G250wGElb0U21j2As5Hqg6d5Jk7k2GaBYN32PJ/62yNTypaaPWZJ24OTNOESwhmMKpu+VpUbfz2hJ0lvg7gMYGO6vGZMi9pdEo6ULij747HhmRoiR4CeTMFB821uuGfA== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: b6ac4eb9-bb30-46dd-6a95-08dbc0d6cdfb X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Sep 2023 10:28:21.5703 (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: 8WuKUfrgiUZQCbf1zQI5Er2jw9v6yfZfJoJ36mZKPomh5kf4TVgrm1cEzyihuWAshGyDG/uYMtRjRGHjOZUBRw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB6153 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-09-29_08,2023-09-28_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 spamscore=0 mlxscore=0 malwarescore=0 suspectscore=0 bulkscore=0 mlxlogscore=999 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2309290090 X-Proofpoint-GUID: 7BWe1edzjEANjQfNHNqdqNIe3xLjJes- X-Proofpoint-ORIG-GUID: 7BWe1edzjEANjQfNHNqdqNIe3xLjJes- Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org The low-space allocator doesn't honour the alignment requirement, so don't attempt to even use it (when we have an alignment requirement). Signed-off-by: John Garry --- fs/xfs/libxfs/xfs_bmap.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c index 30c931b38853..328134c22104 100644 --- a/fs/xfs/libxfs/xfs_bmap.c +++ b/fs/xfs/libxfs/xfs_bmap.c @@ -3569,6 +3569,10 @@ xfs_bmap_btalloc_low_space( { int error; + /* The allocator doesn't honour args->alignment */ + if (args->alignment > 1) + return 0; + if (args->minlen > ap->minlen) { args->minlen = ap->minlen; error = xfs_alloc_vextent_start_ag(args, ap->blkno);