From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0ECB2331A4A for ; Thu, 13 Nov 2025 10:32:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763029939; cv=none; b=TDgYqEcAk1qwMmXkuIQ19SrRx139E6bJvc6ATSkCqpL5aGR0BdDYcqYv/68lzkiyqoWUSk0Lj9ztndOjmPGAgIGXsMd77Ltfuht9N9RbkVRT1J/kZHMQX1a0RJZNRyPIhUtZnrm4XSK0DGDYUcxzdiGmOedMU26lusXgQH9C9/U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763029939; c=relaxed/simple; bh=/ez4viGQxwKl6xh/PPq/TWsOWmDT70HNbDNx4QUOYcw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GQCfcuuLUTrq9O4xmxsMo+PlvO/dHsuupTySPbVEs4cXCYn8tpZ2TAjxk9S9OfpjpzoowTmVWOx6cAS8/v/2GBlOqtICCBaBBQE/36IcZiqtak+2YtE1iGy9XjimSj5Lskry8o1YqEJsbjmwwcuzDL8duAwXuR2+ImUPaLpFEvA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=fromorbit.com; spf=pass smtp.mailfrom=fromorbit.com; dkim=pass (2048-bit key) header.d=fromorbit-com.20230601.gappssmtp.com header.i=@fromorbit-com.20230601.gappssmtp.com header.b=tSNZuhly; arc=none smtp.client-ip=209.85.214.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=fromorbit.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fromorbit.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fromorbit-com.20230601.gappssmtp.com header.i=@fromorbit-com.20230601.gappssmtp.com header.b="tSNZuhly" Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-297e239baecso16354425ad.1 for ; Thu, 13 Nov 2025 02:32:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fromorbit-com.20230601.gappssmtp.com; s=20230601; t=1763029935; x=1763634735; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=QURbCPhZLgDFuDO50oTy4YxAU/M/cxLF0F1zsVf26eM=; b=tSNZuhlyAsQdCBROny1W2LKQ+njhOt2F7hJrDAVykMsiBZA2MsD9NPFanFer8ixnfI sdkBrAmS0uqU6umEqeHqPVbTAle0GYtByJLkmItLMttKPO8XRDP73qkQbC6Fk/Juwqd1 shoafwuSzT7epdC6vUtw6oapaYnkQHyTNmWSRjPCqiEXdnAjgW6Z0qCiCt54EKdDGzRE pJp7ktXn2HGrXD+4hBvWl7fl6rjgS8nluU/PbinBDE7EejqbotPO8fLloqqISnl6HC23 kq69ahcD1dtQNS+fzxbMp8d7RWVFJAwOohDH7u01gS0lzSvXcx7xY14NndQNP7hqGl34 wiNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763029935; x=1763634735; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QURbCPhZLgDFuDO50oTy4YxAU/M/cxLF0F1zsVf26eM=; b=adEm9AzDwp4QhnkVjUou91MpFMNTKtzEWYq3EcZKqQRqb0XB6w+n9BcZAEZW4U9QEy C5jtghasj/sEbKmJap0e0pPIevRhCpAzfGFp3dUeRz4TdN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yTXr91VjJoLaVXeTfMQ== X-Received: by 2002:a17:903:1af0:b0:267:912b:2b36 with SMTP id d9443c01a7336-2985a51863emr28237365ad.23.1763029934984; Thu, 13 Nov 2025 02:32:14 -0800 (PST) Received: from dread.disaster.area (pa49-181-58-136.pa.nsw.optusnet.com.au. [49.181.58.136]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2985c2b0fe9sm20457965ad.65.2025.11.13.02.32.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Nov 2025 02:32:14 -0800 (PST) Received: from dave by dread.disaster.area with local (Exim 4.98.2) (envelope-from ) id 1vJUcd-0000000ADSS-414B; Thu, 13 Nov 2025 21:32:11 +1100 Date: Thu, 13 Nov 2025 21:32:11 +1100 From: Dave Chinner To: Ritesh Harjani Cc: Christoph Hellwig , Ojaswin Mujoo , Christian Brauner , djwong@kernel.org, john.g.garry@oracle.com, tytso@mit.edu, willy@infradead.org, dchinner@redhat.com, linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, jack@suse.cz, nilay@linux.ibm.com, martin.petersen@oracle.com, rostedt@goodmis.org, axboe@kernel.dk, linux-block@vger.kernel.org, linux-trace-kernel@vger.kernel.org Subject: Re: [RFC PATCH 0/8] xfs: single block atomic writes for buffered IO Message-ID: References: <20251113052337.GA28533@lst.de> <87frai8p46.ritesh.list@gmail.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: <87frai8p46.ritesh.list@gmail.com> On Thu, Nov 13, 2025 at 11:12:49AM +0530, Ritesh Harjani wrote: > Christoph Hellwig writes: > > > On Thu, Nov 13, 2025 at 08:56:56AM +1100, Dave Chinner wrote: > >> On Wed, Nov 12, 2025 at 04:36:03PM +0530, Ojaswin Mujoo wrote: > >> > This patch adds support to perform single block RWF_ATOMIC writes for > >> > iomap xfs buffered IO. This builds upon the inital RFC shared by John > >> > Garry last year [1]. Most of the details are present in the respective > >> > commit messages but I'd mention some of the design points below: > >> > >> What is the use case for this functionality? i.e. what is the > >> reason for adding all this complexity? > > > > Seconded. The atomic code has a lot of complexity, and further mixing > > it with buffered I/O makes this even worse. We'd need a really important > > use case to even consider it. > > I agree this should have been in the cover letter itself. > > I believe the reason for adding this functionality was also discussed at > LSFMM too... > > For e.g. https://lwn.net/Articles/974578/ goes in depth and talks about > Postgres folks looking for this, since PostgreSQL databases uses > buffered I/O for their database writes. Pointing at a discussion about how "this application has some ideas on how it can maybe use it someday in the future" isn't a particularly good justification. This still sounds more like a research project than something a production system needs right now. Why didn't you use the existing COW buffered write IO path to implement atomic semantics for buffered writes? The XFS functionality is already all there, and it doesn't require any changes to the page cache or iomap to support... -Dave. -- Dave Chinner david@fromorbit.com