Commit 31508da
null_blk: prevent submit and poll queues update for shared tagset
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 <[email protected]>
Reviewed-by: Damien Le Moal <[email protected]>
Reviewed-by: Yu Kuai <[email protected]>1 parent 8ae67b8 commit 31508da
1 file changed
+22
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
391 | 397 | | |
392 | 398 | | |
393 | 399 | | |
| |||
1884 | 1890 | | |
1885 | 1891 | | |
1886 | 1892 | | |
1887 | | - | |
1888 | | - | |
1889 | | - | |
1890 | | - | |
1891 | | - | |
1892 | | - | |
1893 | | - | |
1894 | | - | |
1895 | | - | |
1896 | | - | |
| 1893 | + | |
| 1894 | + | |
1897 | 1895 | | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
1898 | 1909 | | |
| 1910 | + | |
1899 | 1911 | | |
1900 | 1912 | | |
1901 | 1913 | | |
| |||
0 commit comments