Linux ATA/IDE development
 help / color / mirror / Atom feed
From: Nick Spooner <nicholas.spooner@seagate.com>
To: dlemoal@kernel.org
Cc: cassel@kernel.org, linux-ide@vger.kernel.org,
	stable@vger.kernel.org, hare@kernel.org, mkp@kernel.org
Subject: Re: [PATCH] ata: libata-scsi: fix REQUESTED MAX LBA field for REMOVE ELEMENT AND TRUNCATE
Date: Mon, 16 Nov 2026 09:47:09 -0700	[thread overview]
Message-ID: <20261116164709.25064-1-nicholas.spooner@seagate.com> (raw)
In-Reply-To: <f72e653e-2cef-4920-89c3-f32ebc68de95@kernel.org>

On 11/15/26 01:58 UTC, Damien Le Moal wrote:
> So we should not silently ignore the 1 case and fail it.
> Can you send a v2 with that failure added?

The 1 case should already fail. The check was in the existing code just
above where I patched, but the diff context cut it off:

	req_capacity = get_unaligned_be64(&cdb[2]);
	if (req_capacity == 1) {
		ata_scsi_set_invalid_field(dev, scmd, 2, 0);
		return 1;
	}

	if (req_capacity > 1)
		req_capacity--;

I believe that should cover all three cases in SAT-6.

  reply	other threads:[~2026-11-16 16:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13 15:19 [PATCH] ata: libata-scsi: fix REQUESTED MAX LBA field for REMOVE ELEMENT AND TRUNCATE Nick Spooner
2026-11-15  1:58 ` Damien Le Moal
2026-11-16 16:47   ` Nick Spooner [this message]
2026-11-16 20:30     ` Damien Le Moal
2026-11-16 17:40 ` 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=20261116164709.25064-1-nicholas.spooner@seagate.com \
    --to=nicholas.spooner@seagate.com \
    --cc=cassel@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=hare@kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=mkp@kernel.org \
    --cc=stable@vger.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