[PATCH v3 5/5] nvme: raise FDP placement handle cap to U8_MAX and warn on overflow
Nilay Shroff
nilay at linux.ibm.com
Wed Aug 5 08:16:36 PDT 2026
On 8/4/26 7:49 AM, Guixin Liu wrote:
> he RUH status buffer and the placement-handle clamp used S8_MAX - 1
> (126) as the maximum descriptor count. That value was picked only so the
> io-mgmt-receive result fit in a page, not because of any protocol or
> driver restriction.
>
> The meaningful upper bound is U8_MAX: write hints (bio->bi_write_stream)
> are u8, so placement handles beyond U8_MAX can never be selected. Size
> the buffer and clamp nr_plids to U8_MAX, and emit a dev_warn() when the
> device reports more handles than the driver tracks so the truncation is
> observable.
>
> Suggested-by: Kanchan Joshi<joshi.k at samsung.com>
> Signed-off-by: Guixin Liu<kanie at linux.alibaba.com>
> Reviewed-by: Kanchan Joshi<joshi.k at samsung.com>
Looks good to me.
Reviewed-by: Nilay Shroff <nilay at linux.ibm.com>
More information about the Linux-nvme
mailing list