All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Down <chris@chrisdown.name>
To: Christoph Hellwig <hch@lst.de>
Cc: "Martin K. Petersen" <mkp@kernel.org>,
	"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-team@meta.com
Subject: Re: [PATCH 1/2] scsi: sd: Fix data corruption in WRITE SAME(10) write zeroes
Date: Sat, 28 Nov 2026 01:26:41 -0800	[thread overview]
Message-ID: <awqeUXDLbKDiovWx@chrisdown.name> (raw)
In-Reply-To: <20261111164632.GB18355@lst.de>

Hi Christoph,

Christoph Hellwig writes:
>Shoudn't we simply refuse to use writesame_10_unmap for devices
>where 10-byte commands can't fit the entire capacity instead?

Yeah, that's simpler. I'll do that in v2, both when sd picks the mode
and when it's written to zeroing_mode in sysfs.

That only takes care of the LBA, though. sd_config_write_same() keeps a
write zeroes limit above 0xffff blocks if the device reports one, so
the count can still be truncated in writesame_10_unmap mode, even on a
small disk. I think we should still cap the limit in that mode, as
sd_config_discard() already does for the discard limit in writesame_10
mode. Does that sound ok?

Thanks!

Chris

  reply	other threads:[~2026-11-28  9:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-07 16:35 [PATCH 0/2] scsi: sd: Fix WRITE SAME(10) data corruption Chris Down
2026-11-07 16:35 ` [PATCH 1/2] scsi: sd: Fix data corruption in WRITE SAME(10) write zeroes Chris Down
2026-11-11 16:46   ` Christoph Hellwig
2026-11-28  9:26     ` Chris Down [this message]
2026-11-07 16:35 ` [PATCH 2/2] scsi: sd: Fix data corruption in WRITE SAME(10) discards Chris Down
2026-11-11 16:47   ` Christoph Hellwig
2026-11-28  9:26     ` Chris Down

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=awqeUXDLbKDiovWx@chrisdown.name \
    --to=chris@chrisdown.name \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=hch@lst.de \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.