mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Garry <john.garry@linux.dev>
To: Tal Zussman <tz2294@columbia.edu>, Jens Axboe <axboe@kernel.dk>,
	Christian Brauner <brauner@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 2/2] iomap: remove the atomic write length check in iomap_dio_bio_iter_one()
Date: Tue, 10 Nov 2026 08:42:05 +0000	[thread overview]
Message-ID: <f9fd6fc0-8694-45e5-bf00-77bd961ab788@linux.dev> (raw)
In-Reply-To: <21793564-61f4-4d57-b375-1271ad9bc70c@columbia.edu>

On 11/9/26 22:46, Tal Zussman wrote:
>>> What specifically would you want to see tested? I can do an atomic write with
>>> a partially unmapped buffer, with and without stable writes, and check that it
>>> fails and that nothing is written.
>> Just something similar to the blktests case which you added.
>>
> Sounds good, I'll add it to the queue.

Thanks

> 
>> BTW, have you tested this partially-unmapped case for CoW-based atomics
>> on xfs? You can just do that by setting atomic_wr=0
>>
> Yeah, I just tested it. It behaves as expected: returns -EFAULT with the file
> unchanged, both with and without bouncing.
> 
> The single-bio check depends on REQ_ATOMIC, which only the HW atomic path sets,
> so it doesn't apply to CoW writes, both before and after this series.
> 
> In terms of consistency, the unmapped buffer returns -EINVAL on the non-bounce
> HW path (from bio_iov_iter_get_pages()) but -EFAULT for all other paths. That
> should probably be made consistent across HW and SW and bounce vs. non-bounce,
> but that's a separate change.

Yeah, we should fail for the same reason on HW- and CoW-based atomics. I 
would like if any such rules could be documented and we ensure that both 
HW- and CoW-based atomics always fail for non-adherence to the rules.

cheers

      reply	other threads:[~2026-11-10  8:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-08  4:24 [PATCH 0/2] block: fail short atomic bounce bios in bio_iov_iter_bounce_write() Tal Zussman
2026-11-08  4:24 ` [PATCH 1/2] block: fail a short atomic bounce " Tal Zussman
2026-11-08 17:13   ` John Garry
2026-11-09 18:27     ` Tal Zussman
2026-11-09 18:41       ` John Garry
2026-11-08  4:24 ` [PATCH 2/2] iomap: remove the atomic write length check in iomap_dio_bio_iter_one() Tal Zussman
2026-11-08 17:06   ` John Garry
2026-11-09 18:34     ` Tal Zussman
2026-11-09 18:44       ` John Garry
2026-11-09 22:46         ` Tal Zussman
2026-11-10  8:42           ` John Garry [this message]

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=f9fd6fc0-8694-45e5-bf00-77bd961ab788@linux.dev \
    --to=john.garry@linux.dev \
    --cc=axboe@kernel.dk \
    --cc=brauner@kernel.org \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=tz2294@columbia.edu \
    /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

all inboxes | Powered by JetHome®