All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: Nick Spooner <nicholas.spooner@seagate.com>
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 12:30:41 -0800	[thread overview]
Message-ID: <3fb242cb-d8a0-4dab-b495-9f5de7713f4d@kernel.org> (raw)
In-Reply-To: <20261116164709.25064-1-nicholas.spooner@seagate.com>

On 11/16/26 08:47, Nick Spooner wrote:
> 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.

Good. Thanks for checking!


-- 
Damien Le Moal
Western Digital Research

  reply	other threads:[~2026-11-16 20:30 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
2026-11-16 20:30     ` Damien Le Moal [this message]
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=3fb242cb-d8a0-4dab-b495-9f5de7713f4d@kernel.org \
    --to=dlemoal@kernel.org \
    --cc=cassel@kernel.org \
    --cc=hare@kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=mkp@kernel.org \
    --cc=nicholas.spooner@seagate.com \
    --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 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.