Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1816993rdb; Tue, 3 Oct 2023 01:37:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEyqn4RMy4JpWf5/Ka2kExGu7iqdhqbejsp+UPVdD3xOBmqVHRaPaOg55Hny9dTxZ3QwBNy X-Received: by 2002:a05:6a20:a11a:b0:13d:ee19:7727 with SMTP id q26-20020a056a20a11a00b0013dee197727mr13511462pzk.18.1696322275250; Tue, 03 Oct 2023 01:37:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696322275; cv=pass; d=google.com; s=arc-20160816; b=mf1kCnGW9ruaERWTeQyw9Gk3Ysv1wzTn8T+tnI9lmplid5GDXJwwM9TCBhDAxwlgzv xv7qL4Gqc4mteC89od4bW/sCskrnUzm4WQFDXAI14583P+l2TIX1d/e6M1+Bsgbv9ANF xaSXLEFymy6TIdl7LAKwdD5cQR9NAsJfMRgb+HIGa1VAby56wYCCUz1LKsr3O6Q8n0h9 lQr3bst0jrh0MLmbKnLXnYoB7aGl/Ix3m7ukiycuKOOPh8GrE7B31ahmDzMKRfYd4TA2 uoWUDd/sd3ifwmeXjShuCsgIE995genhLXx63GvPLZt5ZASvRtDt7rEM6RzBaUZgPOHS fEyA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:organization:from:content-language:references:cc:to :subject:user-agent:date:message-id:dkim-signature:dkim-signature; bh=ngt/nM9fNttBLatsBNaoYgrb677nlxAlM80nVIPwgps=; fh=3KTdo0MBR6/5BjknyFI7nH0/plWEUd8icNMgVAkI0vA=; b=VaffX32LjEi+iGHr5HLvLtEk19dYWTMO0sfp+pbwYfF+NHPrJXti04DPS7SBNd5obF NTT1I0Tu4GUrYl6dg4HzDU60eF9BtwMU6Ca59viYOPYQNiCq4dPkDVLp1YjTpgEkBE9Z nRq6a9zVy+YGggg4/cZs5v6gC60i3f7DapUHvg3gSfy3xcW7XrEeqkLNA2REfb2GBBx0 +teNBd2gBtTKA3zJHbFPc9NBrJzRaTeHhh7QyssIu3o761yWUIHAbyN2qRgkuy/TGUkh B+lEUFmyEdmmhcofCk6r2JcZvBG3gkKS3aYE3rqj7w482UoNmacVRCo16QfK/J/VgLq9 ZPHg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=jEl2OGzj; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=k+o2tKKi; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id m12-20020a170902c44c00b001c3e13018ffsi928849plm.51.2023.10.03.01.37.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 01:37:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=jEl2OGzj; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=k+o2tKKi; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 2F92D801B4A7; Tue, 3 Oct 2023 01:37:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231247AbjJCIhs (ORCPT + 99 others); Tue, 3 Oct 2023 04:37:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230439AbjJCIhq (ORCPT ); Tue, 3 Oct 2023 04:37:46 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0571991; Tue, 3 Oct 2023 01:37:43 -0700 (PDT) Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3930iS1M027733; Tue, 3 Oct 2023 08:37:20 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-03-30; bh=ngt/nM9fNttBLatsBNaoYgrb677nlxAlM80nVIPwgps=; b=jEl2OGzjMT+8J8zCT3gUe8ZOpLLh1/ay/QSMUTBeLI0gDeuDymOO/yUreIRkp5AutxGJ iFUW9FeQISHWXK1kSEk+v5rvH+nY9R4blolnfaV0uzRGKkFJ+hICuhUebZm79eoCuFJf PBM4m4WgOT7A/780kCW1thDBQL6BL8/2H5iOhO4B9qLyq/XV0uGF2CmA5WlH8jkjPP/G ZwAYyzm504UPpXB7G4anmn87aZogqPubZKRIcER2OUTsKBqeC7MCOGF6J0hnEMc5TQFR OpoCBq3Qhim6TYSeS1Tt1JI/IGiyo0THN8kDAK39DHhno2gWUJ+f90tJRdUC2BbsajAO kg== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3teb9uc567-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 03 Oct 2023 08:37:20 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3937uL52005918; Tue, 3 Oct 2023 08:37:19 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2169.outbound.protection.outlook.com [104.47.58.169]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3tea45p6wj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 03 Oct 2023 08:37:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JOY/gU4mlMNbz5033LLBB3wTKZkzpM+waeLCn3q7eKi+WC/lEj+EJBUJw4Srw9SquzmqC/efiwUsck6a75WYXgpkRTJ1U5L/DTKq5g5Sx6D95ULLsxXsmefYMq5GY1lWQtvSuZ7u4C85oarJZw/85H6NfJ0RiAvX5AE+fC7r97i4dc6W0rqZZErLCUwCssDP/C8cZjVm0MCiEe82himVQtOOYDTiPLLRPhYisCeOG68SOTtBjZYvwBhGFXEChgMLqpSQiYctjlQM7IhgP/rkt32BumDhzscYM3XQjfpqvNdgCCiKaAIdpuUNG8RcBjuDfU58zRk23mMmvFUTJDkcYg== 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=ngt/nM9fNttBLatsBNaoYgrb677nlxAlM80nVIPwgps=; b=f3DNnJvPOm/8cMf2APUPSSHBJPgZxCgpzm949q7p1ygEKKcjbxfKSL0F9LNhyZAbcbaVpB7HQbqcXL9XMXOqixvoRN2wFAR3UwNW5wu429JOKeEWBNIdVJQBpH39hblJEWaIvX8wqkaWOvS7H0WJQy7d4QxiN5GgmskWIDWYHNMApWNWDHYXXSnBhY8ev8vIkkJSdsZXRNOSSDbYxaUBbxvqCjufHOlz7pwQsypdhpOsYlOo3X/uUDyTtaUPmdvbgJKKGvqgUrS9DxCYIB5oDh3huyqStSsTw0bjYNxCXYBz84rkvbfk5yuusvKc8jsNUc0wQsClcEwdxxbi6cX3gg== 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=ngt/nM9fNttBLatsBNaoYgrb677nlxAlM80nVIPwgps=; b=k+o2tKKiXnhSmg5MfPXG4ED8Du11JFXW+PLvUc3C04aW8yi2HHM+cjejCBS5VDYTPC+dovWplAg6TanoCuVvyiPjP2yuYkHNsp0+7XEdrWL05FdOPvwTJFap1sOsEIyvatrYE8HyvZ/Lmom8A01fVHLpt+UHJp1CSr0Zl5EUN18= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by PH0PR10MB5753.namprd10.prod.outlook.com (2603:10b6:510:146::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.24; Tue, 3 Oct 2023 08:37:16 +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.6838.033; Tue, 3 Oct 2023 08:37:16 +0000 Message-ID: <1adeff8e-e2fe-7dc3-283e-4979f9bd6adc@oracle.com> Date: Tue, 3 Oct 2023 09:37:10 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH 10/21] block: Add fops atomic write support To: Bart Van Assche , 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 References: <20230929102726.2985188-1-john.g.garry@oracle.com> <20230929102726.2985188-11-john.g.garry@oracle.com> <17ee1669-5830-4ead-888d-a6a4624b638a@acm.org> <5d26fa3b-ec34-bc39-ecfe-4616a04977ca@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: 8bit X-ClientProxiedBy: AM0PR02CA0154.eurprd02.prod.outlook.com (2603:10a6:20b:28d::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_|PH0PR10MB5753:EE_ X-MS-Office365-Filtering-Correlation-Id: 9512fd83-66db-4c96-9ff3-08dbc3ebf318 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yg/2bWPQmPN6ci+2Kptxz2i4ziQKcWWPibuThDlPnkvpskFXYyMcFgc2zgSaQgBChEJGDhroIYeZt+1f4NS9GEBew1MFK/XckRp3LJhlhzehWdbbRwDPGfAeVy0znt5nqwecEu+ZJE+3XG+Dk73ilZYUtVeLVLf9bMdZzyUhR3YlADzXGb586VxB0+cske5ZhyRAhXz5Ug580/VWyaEBCtgJjj5k2N4hkjshVv1YhhL3ss1na3Rzfz7nt6ZNn5npJ0lsuaKZ4ugyM4PKmFyLPLxb6QA+DI+Itq/8y9RXxQVJ5KNEQyWRPqK3fhiKy5cAQcQRvBRnmfL/FCpzfzGBfnsMqGC/642+/tdCjiFIednlK3rQHdGdprTBKNFfMOBOULj8Sj2nWvi3a4wWXV06ThXn+L9MOsxi0sRtU/HJzVggSXKZ/8rhHZq9D42367utcgzNFdZgXfe8y2ZYE/Tw0PaQp6e8M9qbhxYcH+IyZrWhYux4HlIOePEbBnjtjIIWW/sMKC+JCz426S5khGFfO/+nj0fPt5e3r7twrgFrkjTbBoEMyEDeqR56d5m1Fyh0tgkeDZvYhiqoR31oH8+wtSi9C3+grrjEJLi3D2SpAhB1GMeU0Cpc/MnPuLlE89PvI5mUpL85XMmpcUVZTa7hmlTKX3Mkknxy4lfaI9sNn2g= 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)(396003)(376002)(346002)(39860400002)(136003)(366004)(230922051799003)(64100799003)(186009)(1800799009)(451199024)(6666004)(53546011)(6486002)(6506007)(36916002)(478600001)(83380400001)(2616005)(6512007)(26005)(7416002)(2906002)(41300700001)(66556008)(5660300002)(8676002)(8936002)(4326008)(66476007)(316002)(66946007)(36756003)(38100700002)(31696002)(86362001)(921005)(31686004)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-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k?= =?utf-8?B?SHJGRzF1eXFEU0pXcXRwR0J0NkRkZEZWZER3Ky9Nb1E5d3BNMjRMeUpaTDNy?= =?utf-8?B?clFaWS9IUFg4blNubGJlUHdCK3FoVEczRUhQeVNzNXVhLzBVc0s1anRTbXAr?= =?utf-8?B?bmVYU0Y1NEVBcGlHNjZvelh2bDROOTl0d2l0SWN2VDZzV2l4RXZPZ0pJaGQw?= =?utf-8?Q?mk67MI=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9512fd83-66db-4c96-9ff3-08dbc3ebf318 X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Oct 2023 08:37:16.8612 (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: p3pKRlXExUuLSIeGDvq0tCwoR2GC08PnNcFQHm8npvXaCXiUXIJ82rJrJxWeSjcS3wH3GFj+Es8Cghk9GvDbaA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB5753 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-10-03_06,2023-10-02_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 bulkscore=0 adultscore=0 mlxlogscore=999 phishscore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310030056 X-Proofpoint-ORIG-GUID: AxHjBfNKNzbUwfUpGeJbjCwQV4nRijQj X-Proofpoint-GUID: AxHjBfNKNzbUwfUpGeJbjCwQV4nRijQj X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 03 Oct 2023 01:37:54 -0700 (PDT) On 02/10/2023 20:12, Bart Van Assche wrote: >>  > +    if (!is_power_of_2(iov_iter_count(iter))) >>  > +        return false; >> >> This rule comes from FS block alignment and NVMe atomic boundary. >> >> FSes (XFS) have discontiguous extents. We need to ensure that an >> atomic write does not cross discontiguous extents. To do this we >> ensure extent length and alignment and limit >> atomic_write_unit_max_bytes to that. >> >> For NVMe, an atomic write boundary is a boundary in LBA space which an >> atomic write should not cross. We limit atomic_write_unit_max_bytes >> such that it is evenly divisible into this atomic write boundary. >> >> To ensure that the write does not cross these alignment boundaries we >> say that it must be naturally aligned and a power-of-2 in length. >> >> We may be able to relax this rule but I am not sure it buys us >> anything - typically we want to be writing a 64KB block aligned to >> 64KB, for example. > > It seems to me that the requirement is_power_of_2(iov_iter_count(iter)) > is necessary for some filesystems but not for all filesystems. > Restrictions that are specific to a single filesystem (XFS) should not > occur in code that is intended to be used by all filesystems > (blkdev_atomic_write_valid()). I don't think that is_power_of_2(write length) is specific to XFS. It is just a simple mathematical method to ensure we obey length and alignment requirement always. Furthermore, if ext4 wants to support atomic writes, for example, then it will probably base that on bigalloc. And bigalloc is power-of-2 based. As for the rules, current proposal is: - atomic_write_unit_min and atomic_write_unit_max are power-of-2 - write needs to be at a naturally aligned file offset - write length needs to be a power-of-2 between atomic_write_unit_min and atomic_write_unit_max, inclusive Those could be relaxed to: - atomic_write_unit_min and atomic_write_unit_max are power-of-2 - write length needs to be a multiple of atomic_write_unit_min and a max of atomic_write_unit_max - write needs to be at an offset aligned to atomic_write_unit_min - write cannot cross atomic_write_unit_max boundary within the file Are the relaxed rules better? I don't think so, and I don't like "write cannot cross atomic_write_unit_max boundary" in terms of wording. Thanks, John