linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: John Garry <john.g.garry@oracle.com>
Cc: axboe@kernel.dk, kbusch@kernel.org, hch@lst.de, sagi@grimberg.me,
	jejb@linux.ibm.com, martin.petersen@oracle.com,
	djwong@kernel.org, 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-fsdevel@vger.kernel.org, tytso@mit.edu, jbongio@google.com,
	linux-scsi@vger.kernel.org, ojaswin@linux.ibm.com,
	linux-aio@kvack.org, linux-btrfs@vger.kernel.org,
	io-uring@vger.kernel.org, nilay@linux.ibm.com,
	ritesh.list@gmail.com
Subject: Re: [PATCH v5 00/10] block atomic writes
Date: Tue, 5 Mar 2024 23:10:37 +0000	[thread overview]
Message-ID: <ZeembVG-ygFal6Eb@casper.infradead.org> (raw)
In-Reply-To: <20240226173612.1478858-1-john.g.garry@oracle.com>

On Mon, Feb 26, 2024 at 05:36:02PM +0000, John Garry wrote:
> This series introduces a proposal to implementing atomic writes in the
> kernel for torn-write protection.

The API as documented will be unnecessarily complicated to implement
for buffered writes, I believe.  What I would prefer is a chattr (or, I
guess, setxattr these days) that sets the tearing boundary for the file.
The page cache can absorb writes of arbitrary size and alignment, but
will be able to guarantee that (if the storage supports it), the only
write tearing will happen on the specified boundary.

We _can_ support arbitrary power-of-two write sizes to the page cache,
but if the requirement is no tearing inside a single write, then we
will have to do a lot of work to make that true.  It isn't clear to me
that anybody is asking for this; the databases I'm aware of are willing
to submit 128kB writes and accept that there may be tearing at 16kB
boundaries (or whatever).



  parent reply	other threads:[~2024-03-05 23:10 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-26 17:36 [PATCH v5 00/10] block atomic writes John Garry
2024-02-26 17:36 ` [PATCH v5 01/10] block: Pass blk_queue_get_max_sectors() a request pointer John Garry
2024-02-26 17:36 ` [PATCH v5 02/10] block: Call blkdev_dio_unaligned() from blkdev_direct_IO() John Garry
2024-02-26 17:36 ` [PATCH v5 03/10] fs: Initial atomic write support John Garry
2024-03-08 16:34   ` Jens Axboe
2024-03-08 16:52     ` John Garry
2024-03-08 17:05       ` Jens Axboe
2024-03-08 17:15         ` John Garry
2024-03-08 17:18           ` Jens Axboe
2024-02-26 17:36 ` [PATCH v5 04/10] fs: Add initial atomic write support info to statx John Garry
2024-02-26 17:36 ` [PATCH v5 05/10] block: Add core atomic write support John Garry
2024-02-26 17:36 ` [PATCH v5 06/10] block: Add atomic write support for statx John Garry
2024-02-26 17:36 ` [PATCH v5 07/10] block: Add fops atomic write support John Garry
2024-02-26 17:36 ` [PATCH v5 08/10] scsi: sd: Atomic " John Garry
2024-02-26 17:36 ` [PATCH v5 09/10] scsi: scsi_debug: " John Garry
2024-02-26 17:36 ` [PATCH v5 10/10] nvme: " John Garry
2024-03-05 23:10 ` Matthew Wilcox [this message]
2024-03-06  9:05   ` [PATCH v5 00/10] block atomic writes John Garry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZeembVG-ygFal6Eb@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=brauner@kernel.org \
    --cc=dchinner@redhat.com \
    --cc=djwong@kernel.org \
    --cc=hch@lst.de \
    --cc=io-uring@vger.kernel.org \
    --cc=jack@suse.cz \
    --cc=jbongio@google.com \
    --cc=jejb@linux.ibm.com \
    --cc=john.g.garry@oracle.com \
    --cc=kbusch@kernel.org \
    --cc=linux-aio@kvack.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=nilay@linux.ibm.com \
    --cc=ojaswin@linux.ibm.com \
    --cc=ritesh.list@gmail.com \
    --cc=sagi@grimberg.me \
    --cc=tytso@mit.edu \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).