[PATCH] nvme: fix write_stream_granularity initialization

Keith Busch kbusch at kernel.org
Tue May 6 12:09:47 PDT 2025


On Tue, May 06, 2025 at 11:54:12AM -0600, Caleb Sander Mateos wrote:
> write_stream_granularity is set to max(info->runs, U32_MAX), which means
> that any RUNS value less than 2 ** 32 becomes U32_MAX, and any larger
> value is silently truncated to an unsigned int.
> 
> Use min() instead to provide the correct semantics, capping RUNS values
> at U32_MAX.
> 
> Signed-off-by: Caleb Sander Mateos <csander at purestorage.com>
> Fixes: 30b5f20bb2dd ("nvme: register fdp parameters with the block layer")

Looks good

Reviewed-by: Keith Busch <kbusch at kernel.org>



More information about the Linux-nvme mailing list