Re: [PATCH v2 0/1] nvme: core: reject invalid LBA data size from Identify Namespace
From: Chao S
Date: Fri May 15 2026 - 05:51:48 EST
Hi Keith,
Thanks for the follow-up — I misread your v1 comment.
> Not quite what I suggested. Instead, if you move up the validation
> checks, you don't have any cleanup in the error case to do.
Understood now. In v3 the validation is hoisted above
queue_limits_start_update() and blk_mq_freeze_queue(), so the
error path is a plain `goto out` with no cancel_update / unfreeze
needed. (Please let me know if I things on the right track)
> And don't bother splitting the error cases. The message about the
> "0" LBADS is in reference to the broadcast identification. It's
> never valid for a controller to return an unusable flbas index
> value for an attached namespace.
Collapsed into a single check in v3.
Sending v3 shortly.
Thanks,
Chao
On Mon, Apr 20, 2026 at 8:25 PM Keith Busch <kbusch@xxxxxxxxxx> wrote:
>
> On Mon, Apr 20, 2026 at 07:11:13PM -0400, Chao Shi wrote:
> > On Mon, Apr 20, 2026 at 02:51:00PM -0700, Keith Busch wrote:
> >
> > Fixed in v2.
> >
> > > you're missing the corresponding queue_limits_cancel_update() for this
> > > error case.
> >
> > Added in both error paths in v2.
>
> Not quite what I suggested. Instead, if you move up the validation
> checks, you don't have any cleanup in the error case to do.
>
> And don't bother splitting the error cases. The message about the "0"
> LBADS is in reference to the the broadcast identification. It's never
> valid for a controller to return an unusable flbas index value for an
> attached namespace.