Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3858672rdh; Tue, 28 Nov 2023 05:56:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IEHmUl8rJ6afkIqjrDZUSRZHuzGYTXg++NltlFrbAFzwnd0gLMO3TQKYgZsGYdI7Lpcn2A9 X-Received: by 2002:a9d:64c6:0:b0:6d8:1887:d872 with SMTP id n6-20020a9d64c6000000b006d81887d872mr10388080otl.14.1701179796025; Tue, 28 Nov 2023 05:56:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701179795; cv=none; d=google.com; s=arc-20160816; b=hoYkfs5RPWEYzQ8FRkH6Z/zJ89SibujBR1smIOkcc9KjdbymqkRWP1GKHLrC3pGPCo VxJmqSeFXL13sXQwRY0Jm8QngBJ1s+wyC0Nn665IWUtch9UEu3Rc2DdPO9bLqQonPziC 4gdYgqBIchAlJbn9LTfSP5ZcHIhB3gIdLqIh9xm+B7umXnfum5ABvUdbSVHaGLgcdDP5 x97n1V9xvGKJEN7rOw3I4rbQhgmCRIs9SCdiY8AmbNtr/QlrjhdjjpBFyIuEwZEZ9N5e FkA7NeB7oQtz5N9FyK77TYoPjvHXBj81TLfzWEKnSzyVXbP2qJ0KuMhKM+X/q1ZfIdth bBDw== 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=79RQ5BK62/uIfmNJLcWbdBvAWQB/n8mjNXQaV7KOCs8=; fh=3ryIpOVQ48K5xHKHuuMQwdDhzAsDsw1xPz0+MrkgulU=; b=IzGMwfZLvvr1JgYldab/x5fCZD9yGbh0/iWdiHdbE5Jrw1jaDwbl0P9iNvGl+/SPAM 7AoWXCdIe/jDqkk7BywgmqIfVp0RtZEZFnLSnzsqx0rD24U8KJ8iWinQeqyXh0nHsiF6 VplFw5vFbAyTwv5QFtFtW4BUeo4NZLV0vxpBa30R0YEwi0ruWmnWNaTophYhymD0QnCr iR1KKBeXgg/wjeY5RSJxTOyRw3avSCtNYMFpdCIGTPgy20/a8FXxJLTrraMjt+az3ksw HTIEOx7k3+HuyUSVUn80q8TvyFVrpMxWBAbc+OMgwz9kuTJPxeCL0ltWxySUSuqszph5 GP1A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id g14-20020a63200e000000b005b92d41764dsi12126741pgg.794.2023.11.28.05.56.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 05:56:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id 8AB4E808EE62; Tue, 28 Nov 2023 05:56:33 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345288AbjK1N4U (ORCPT + 99 others); Tue, 28 Nov 2023 08:56:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344863AbjK1N4T (ORCPT ); Tue, 28 Nov 2023 08:56:19 -0500 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89F58D1; Tue, 28 Nov 2023 05:56:25 -0800 (PST) Received: by verein.lst.de (Postfix, from userid 2407) id E6897227A87; Tue, 28 Nov 2023 14:56:19 +0100 (CET) Date: Tue, 28 Nov 2023 14:56:19 +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: <20231128135619.GA12202@lst.de> References: <20230929102726.2985188-1-john.g.garry@oracle.com> <20230929102726.2985188-18-john.g.garry@oracle.com> <20231109152615.GB1521@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 fry.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 (fry.vger.email [0.0.0.0]); Tue, 28 Nov 2023 05:56:33 -0800 (PST) On Tue, Nov 28, 2023 at 08:56:37AM +0000, John Garry wrote: > Are you suggesting some sort of hybrid between the atomic write series you > had a few years ago and this solution? Very roughly, yes. > To me that would be continuing with the following: > - per-IO RWF_ATOMIC (and not O_ATOMIC semantics of nothing is written until > some data sync) Yes. > - writes must be a power-of-two and at a naturally-aligned offset Where offset is offset in the file? It would not require it. You probably want to do it for optimal performance, but requiring it feeels rather limited. > - relying on atomic write HW support always And I think that's where we have different opinions. I think the hw offload is a nice optimization and we should use it wherever we can. But building the entire userspace API around it feels like a mistake. > BTW, we also have rtvol support which does not use forcealign as it already > can guarantee alignment, but still does rely on the same principle of > requiring alignment - would you want CoW support there also? Upstream doesn't have out of place write support for the RT subvolume yet. But Darrick has a series for it and we're actively working on upstreaming it.