On Tue, May 06, 2025 at 09:13:33AM -0700, Caleb Sander Mateos wrote: > On Tue, May 6, 2025 at 5:31 AM Kanchan Joshi <joshi.k@xxxxxxxxxxx> wrote: > > @@ -2225,6 +2361,12 @@ static int nvme_update_ns_info_block(struct nvme_ns *ns, > > if (!nvme_init_integrity(ns->head, &lim, info)) > > capacity = 0; > > > > + lim.max_write_streams = ns->head->nr_plids; > > + if (lim.max_write_streams) > > + lim.write_stream_granularity = max(info->runs, U32_MAX); > > What is the purpose of this max(..., U32_MAX)? Should it be min() instead? You're right, should have been min. Because "runs" is a u64 and the queue_limit is a u32, so U32_MAX is the upper limit, but it's not supposed to exceed "runs".