From mboxrd@z Thu Jan 1 00:00:00 1970 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 9BC96BE49; Thu, 21 Dec 2023 06:50:41 +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 2ECBC68C4E; Thu, 21 Dec 2023 07:50:31 +0100 (CET) Date: Thu, 21 Dec 2023 07:50:31 +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: <20231221065031.GA25778@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> <20231219151759.GA4468@lst.de> Precedence: bulk X-Mailing-List: linux-fsdevel@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: User-Agent: Mutt/1.5.17 (2007-11-01) On Tue, Dec 19, 2023 at 04:53:27PM +0000, John Garry wrote: > On 19/12/2023 15:17, Christoph Hellwig wrote: >> 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. >> > > Any specific type of flag? > > I would suggest a file attribute which we can set via chattr, but that is > still using an ioctl and would require a new inode flag; but at least there > is standard userspace support. I'd be fine with that, but we're kinda running out of flag there. That's why I suggested the FS_XFLAG_ instead, which basically works the same.