Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp569651rdh; Tue, 19 Dec 2023 07:18:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IFVns9W5eZVzDWsJRf2x0fo8RWTys1QBB0bjzGr3KrpVyUBBLvJtPXg0Fj9quC/IH38M7ku X-Received: by 2002:a17:906:7f1a:b0:a23:6ba2:7862 with SMTP id d26-20020a1709067f1a00b00a236ba27862mr472826ejr.235.1702999104241; Tue, 19 Dec 2023 07:18:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702999104; cv=none; d=google.com; s=arc-20160816; b=xO9bj+FR3FtvaDgIr2FTXaiDP1Q4bh8zvMYutsmtmG766iZW5ETWiDB2wEQheaM5Dx Z7LCoFTAXnrpoUez7zHIKZNpx1X99aH/sJP0ITa3blJPZwCpaBnwXoPRsOgIQuF6fJhW 3JAiFW/MlkuUW27O+YjrwZv0vsahQRuVIZvPSKfBhg+0aM4VI3YeXimSd6AtjFLszm12 8cmcZTtcfkFxtTK/OJSjX6lHYUhEoLv55EkAyGR8zsu0BsU2+YJgEwNjcUSbM77tkvEJ BJEWNGIljljxV6JfZrQZWMjz4STmZvpfZRMqMN4nqu3KzQU8cjvw5C5FbZr99hpW49Zm m27Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=xiAuXmgC8GVNW3XfE0yfuXdAqapU0a48/ad7W5fezDs=; fh=pRFDb1qzPVEVLkPLiwPjjL6kEjGObSneCb7bU5CT3Q8=; b=bsrRzVI/N3HUqZsOLcUavN4ZrCbeNuRBY3A3IUrwJ6sOFCj0SQirXU0V4ItqsmaHO1 Vjndaom0CyyEo+FzzHhMTdRj3q8QIKhk6J1KQLB8UmRvEsJwXS0d+hq/APgLlE8N5v4r Iv9K3yM6HZynE/YFFy80C03n+6vagwTa/ClsTNrL3gJkSdBQyt0L6sry8X4P4WKyugVz iSU226LkGYsUon0Miw97SPmPZltZOAGNqXyeJ3WeKNXZfZ0CECSgcbto2y2isaE53CAb cRPRUskX+VZysvI5dZZPIv16KHM5HBkSkfGTq6uAwT480nmmHPRf0GqpzffE30HARnDP XtLA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-5471-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5471-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id s24-20020a170906bc5800b00a23331dd5e7si2726938ejv.689.2023.12.19.07.18.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 07:18:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5471-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-5471-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5471-linux.lists.archive=gmail.com@vger.kernel.org" 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 025031F22614 for ; Tue, 19 Dec 2023 15:18:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6217F1CAAA; Tue, 19 Dec 2023 15:18:08 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (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 1EAC61C6AA; Tue, 19 Dec 2023 15:18:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id D046C68BFE; Tue, 19 Dec 2023 16:17:59 +0100 (CET) Date: Tue, 19 Dec 2023 16:17:59 +0100 From: Christoph Hellwig To: John Garry Cc: Christoph Hellwig , "Darrick J. Wong" , axboe@kernel.dk, kbusch@kernel.org, sagi@grimberg.me, jejb@linux.ibm.com, martin.petersen@oracle.com, viro@zeniv.linux.org.uk, brauner@kernel.org, dchinner@redhat.com, jack@suse.cz, 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-scsi@vger.kernel.org, ming.lei@redhat.com, jaswin@linux.ibm.com, bvanassche@acm.org Subject: Re: [PATCH v2 00/16] block atomic writes Message-ID: <20231219151759.GA4468@lst.de> References: <20231212110844.19698-1-john.g.garry@oracle.com> <20231212163246.GA24594@lst.de> <20231213154409.GA7724@lst.de> <20231219051456.GB3964019@frogsfrogsfrogs> <20231219052121.GA338@lst.de> <76c85021-dd9e-49e3-80e3-25a17c7ca455@oracle.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <76c85021-dd9e-49e3-80e3-25a17c7ca455@oracle.com> User-Agent: Mutt/1.5.17 (2007-11-01) On Tue, Dec 19, 2023 at 12:41:37PM +0000, John Garry wrote: > How about something based on fcntl, like below? We will prob also require > some per-FS flag for enabling atomic writes without HW support. That flag > might be also useful for XFS for differentiating forcealign for atomic > writes with just forcealign. I would have just exposed it through a user visible flag instead of adding yet another ioctl/fcntl opcode and yet another method. And yes, for anything that doesn't always support atomic writes it would need to be persisted.