On 7/23/25 15: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> --- drivers/block/null_blk/main.c | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-)
Reviwed-by: Hannes Reinecke <hare@xxxxxxx> Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@xxxxxxx +49 911 74053 688 SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich