Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2791434rdb; Mon, 4 Dec 2023 07:39:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IHS2O03JpKTiv8AjrSlDDygoH2arSrT86QqWmCI6+WThDIWIUVBJgCak88i1uNYHZAbPBdv X-Received: by 2002:a05:6a20:3d07:b0:18c:4105:9aa8 with SMTP id y7-20020a056a203d0700b0018c41059aa8mr26955957pzi.51.1701704372533; Mon, 04 Dec 2023 07:39:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701704372; cv=none; d=google.com; s=arc-20160816; b=asCUQos17bQQ93uIxTszuu/F+Qf2/vIAyz1eAirNf/Mwk0w349S7O6LlvGPFrL19l/ QnRkzAt8EGS/Wb1g0FDzaTq+jyYmhMk4izqTzMbHyTLH2HLh+7pwHfJl7oZ4ZY1ais2u 94Yp4Z+IYuKl41Z1wL55bzbNhw2J71yVpx+XPdpp3huiy1oeh8qiYClACpjbzkZa/023 9knQS8pys+cxCygo8bdOAlpgMqlwdysbA1hmrzOz/hwHcq+w7Wrnmom2JOO7McLLzyEP Qh4bdHnUggLBdQKPylZCPFdRauPx2Y+WVM2XS3stJaCnGKukBorI8eq8AsTSXpE6E7ih iSvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=mFu/WEPzXTIUnCGJQ8uWfl8c0+zaXa08beUT2qQU0Ko=; fh=3ryIpOVQ48K5xHKHuuMQwdDhzAsDsw1xPz0+MrkgulU=; b=nF5kbnrO6Sb6ivku695PKWsQLCqBhb+RJvptjZ7F1H4mzgUps4oQWyQZdviAtUfl0S /tGY2btrJCVe2FDsOLMFFleI5sp9fSFPRN/fPTTHF6pS7y3LolSN6k2uRQHhNVkxyGlq mkRLjb/3F7oucIMK1EOxWmEWGTP8MB99Lv1+VwCbhane5vq0eeeUAwOrMUIQg46LwMIz qmZG+sLf+57ljA73tVIqq7WE9rBp2cM1gXJsY7kFLIAT+oUrRwD1q/KeRL9UTiuApeq/ JU+hDHDFv6eDKmS7PymOQ8ZpyNKWYSTd0vFwhqAqYQQ5rdHVYgtWKDd5VMqSruHdgyGn cVXA== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id a2-20020a056a000c8200b006cdf615b690si6905539pfv.149.2023.12.04.07.39.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 07:39:32 -0800 (PST) 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; 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 Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id CB8088049179; Mon, 4 Dec 2023 07:39:29 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234748AbjLDPjM (ORCPT + 99 others); Mon, 4 Dec 2023 10:39:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234728AbjLDPjK (ORCPT ); Mon, 4 Dec 2023 10:39:10 -0500 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4578FFD; Mon, 4 Dec 2023 07:39:16 -0800 (PST) Received: by verein.lst.de (Postfix, from userid 2407) id 59D36227A8E; Mon, 4 Dec 2023 16:39:12 +0100 (CET) Date: Mon, 4 Dec 2023 16:39:12 +0100 From: Christoph Hellwig To: John Garry Cc: Christoph Hellwig , axboe@kernel.dk, kbusch@kernel.org, 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, 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 Subject: Re: [PATCH 17/21] fs: xfs: iomap atomic write support Message-ID: <20231204153912.GA3580@lst.de> References: <20230929102726.2985188-1-john.g.garry@oracle.com> <20230929102726.2985188-18-john.g.garry@oracle.com> <20231109152615.GB1521@lst.de> <20231128135619.GA12202@lst.de> <20231204134509.GA25834@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email 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]); Mon, 04 Dec 2023 07:39:30 -0800 (PST) On Mon, Dec 04, 2023 at 03:19:15PM +0000, John Garry wrote: > On 04/12/2023 13:45, Christoph Hellwig wrote: >> On Tue, Nov 28, 2023 at 05:42:10PM +0000, John Garry wrote: >>> ok, fine, it would not be required for XFS with CoW. Some concerns still: >>> a. device atomic write boundary, if any >>> b. other FSes which do not have CoW support. ext4 is already being used for >>> "atomic writes" in the field - see dubious amazon torn-write prevention. >> >> What is the 'dubious amazon torn-write prevention'? > > https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/storage-twp.html > > AFAICS, this is without any kernel changes, so no guarantee of unwanted > splitting or merging of bios. > > Anyway, there will still be !CoW FSes which people want to support. Ugg, so they badly reimplement NVMe atomic write support and use it without software stack enablement. Calling it dubious is way to gentle.. >> Relying just on the hardware seems very limited, especially as there is >> plenty of hardware that won't guarantee anything larger than 4k, and >> plenty of NVMe hardware without has some other small limit like 32k >> because it doesn't support multiple atomicy mode. > > So what would you propose as the next step? Would it to be first achieve > atomic write support for XFS with HW support + CoW to ensure contiguous > extents (and without XFS forcealign)? I think the very first priority is just block device support without any fs enablement. We just need to make sure the API isn't too limited for additional use cases. > Ignoring FSes, then how is this supposed to work for block devices? We just > always need HW support, right? Yes.