Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: John Garry <john.garry@linux.dev>
To: Niklas Cassel <cassel@kernel.org>
Cc: "James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
	"Martin K. Petersen" <mkp@kernel.org>,
	linux-scsi@vger.kernel.org, Damien Le Moal <dlemoal@kernel.org>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH 2/2] scsi: scsi_debug: Validate zone access for WRITE ATOMIC (16)
Date: Thu, 17 Sep 2026 17:40:03 +0100	[thread overview]
Message-ID: <77a96280-f7ee-46ed-bf9e-c2726bb75c57@linux.dev> (raw)
In-Reply-To: <3709D24B-4D27-44CC-92C5-59DC66309931@kernel.org>

On 9/17/26 17:10, Niklas Cassel wrote:
>>> Right now, I don't see why WRITE ATOMIC should not be allowed on a ZBC
>>> drive.
>>>
>>>
>> So what happens when the write pointer is not aligned with Atomic alignment? Are atomic writes just not permitted in that scenario?
> 
> You are the expert when it comes to atomic writes.
> 
> But I would imagine that a device that implements both WRITE ATOMIC and ZBC
> would set the atomic alignment to the physical block size.

Sure, that sounds like a sane implementation. But there is nothing in 
the SCSI spec which mandates this (as far as I remember).

Maybe I am just being pedantic here in expecting the SCSI specs to be 
specific about interoperability of these two features.

> 
> That way the write pointer in sequential write required zones would always be aligned to both.
> 
> I/Os too larger than MAXIMUM ATOMIC TRANSFER LENGTH could be invalid for WRITE ATOMIC, but could be valid for regular writes.
> 
> Anyway, I will probably just drop this patch when I respin, since Damien did not fancy it.
> 
> I will keep the fix that ensures that we mark the blocks written by WRITE ATOMIC are marked as mapped:
> https://lore.kernel.org/linux-scsi/12d01f4b-4d9f-4079-908d- 
> ede50f7a28b4@kernel.org/

ok, I'll check it.

Thanks!


  reply	other threads:[~2026-09-17 16:40 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-17  8:45 [PATCH 0/2] scsi: scsi_debug: fix zoned write validation Niklas Cassel
2026-09-17  8:45 ` [PATCH 1/2] scsi: scsi_debug: Enforce physical block alignment of zoned writes Niklas Cassel
2026-09-17  9:05   ` Damien Le Moal
2026-09-17 10:42     ` Niklas Cassel
2026-09-17  8:45 ` [PATCH 2/2] scsi: scsi_debug: Validate zone access for WRITE ATOMIC (16) Niklas Cassel
2026-09-17  9:00   ` sashiko-bot
2026-09-17  9:09     ` Niklas Cassel
2026-09-17  9:07   ` Damien Le Moal
2026-09-17  9:38   ` John Garry
2026-09-17  9:56     ` Niklas Cassel
2026-09-17 10:26       ` John Garry
2026-09-17 10:35         ` Niklas Cassel
2026-09-17 15:42           ` John Garry
2026-09-17 16:10             ` Niklas Cassel
2026-09-17 16:40               ` John Garry [this message]
2026-09-17 17:37               ` Niklas Cassel
2026-09-18  2:27                 ` Damien Le Moal
2026-09-18  5:37                   ` Niklas Cassel
2026-09-18  6:15                     ` Damien Le Moal
2026-09-18  7:06                       ` Christoph Hellwig
2026-09-18  7:27                         ` Niklas Cassel

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=77a96280-f7ee-46ed-bf9e-c2726bb75c57@linux.dev \
    --to=john.garry@linux.dev \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=cassel@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=hch@lst.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mkp@kernel.org \
    /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