On 7/23/25 22:43, Nilay Shroff wrote: > When a user updates the number of submit or poll queues on a null_blk > device, the block layer creates new hardware queues (hctxs). However, if > the device is using a shared tagset, null_blk does not map any software > queues (ctx) to the newly created hctx (via null_map_queues()), resulting > in those hardware queues being left unused for I/O. This behavior is > misleading, as the user may expect the new queues to be functional, even > though they are effectively ignored. To avoid this confusion and potential > misconfiguration: > - Reject runtime updates to submit_queues or poll_queues via sysfs when > the device uses a shared tagset by returning -EINVAL. > - During configuration validation (prior to powering on the device), reset > submit_queues and poll_queues to the module parameters (g_submit_queues > and g_poll_queues) if the shared tagset is enabled. > > This ensures consistent behavior and avoids creating unused hardware queues > (hctxs) due to ineffective runtime queue updates. > > Signed-off-by: Nilay Shroff <nilay@xxxxxxxxxxxxx> Reviewed-by: Damien Le Moal <dlemoal@xxxxxxxxxx> -- Damien Le Moal Western Digital Research