Re: [PATCH 4/4] nvme: clamp FDP placement handle count to the buffer size

Guixin Liu <[email protected]> Fri, 31 Jul 2026 10:00:51 +0800
Newsgroups org.infradead.lists.linux-nvme
Message-ID <[email protected]>

在 2026/7/30 20:41, Keith Busch 写道:
> On Thu, Jul 30, 2026 at 01:37:22PM +0200, Christoph Hellwig wrote:
>> On Thu, Jul 30, 2026 at 03:10:59PM +0530, Kanchan Joshi wrote:
>>> But I feel the need to improve (what we have) with a follow-up patch:
>>> 1. Revise the cap, from S8_MAX - 1 to U8_MAX; since bio->bi_write_hint
>>> is u8.
>> Signed 8-bit -1 is indeed a really odd value, and from looking at the
>> original commit I'm not really sure how we arrived there.
> "S8_MAX - 1" is a weird way to represent it, but the reason that value
> was used (and it's admittedly not a good reason) was that the result
> fits in a page. Not that there's any restriction on admin commands using
> PRP lists; it's just a coincidental limit for all the driver initiated
> admin commands.
I will send another patch build on top of the patch4 to:
   1. Change "S8_MAX -1" to U8_MAX
   2.  Add a warning log

Best Regards,
Guixin Liu