Re: [PATCH 14/79] block: rnull: add submit queue count config option

Alice Ryhl
2026-03-16T10:40:37Z

On Mon, Feb 16, 2026 at 12:35:01AM +0100, Andreas Hindborg wrote:
> Allow user space to control the number of submission queues when creating
> null block devices.
>
> Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
> ---
> drivers/block/rnull/configfs.rs | 56 +++++++++++++++++++++++++++++++++--------
> drivers/block/rnull/rnull.rs | 56 +++++++++++++++++++++++++++--------------
> 2 files changed, 83 insertions(+), 29 deletions(-)
>
> diff --git a/drivers/block/rnull/configfs.rs b/drivers/block/rnull/configfs.rs
> index b5dc30c5d3e20..fd3cbf7aa012e 100644
> --- a/drivers/block/rnull/configfs.rs
> +++ b/drivers/block/rnull/configfs.rs
> @@ -59,7 +59,10 @@ impl AttributeOperations<0> for Config {
>
> fn show(_this: &Config, page: &mut [u8; PAGE_SIZE]) -> Result<usize> {
> let mut writer = kernel::str::Formatter::new(page);
> - writer.write_str("blocksize,size,rotational,irqmode,completion_nsec,memory_backed\n")?;
> + writer.write_str(
> + "blocksize,size,rotational,irqmode,completion_nsec,memory_backed\
> + submit_queues\n",
> + )?;

Missing comma? If so, this may indicate missing test coverage :)

> +struct NullBlkOptions<'a> {
> + name: &'a CStr,
> + block_size: u32,
> + rotational: bool,
> + capacity_mib: u64,
> + irq_mode: IRQMode,
> + completion_time: Delta,
> + memory_backed: bool,
> + submit_queues: u32,
> +}
> struct NullBlkDevice;
>
> impl NullBlkDevice {
> - fn new(
> - name: &CStr,
> - block_size: u32,
> - rotational: bool,
> - capacity_mib: u64,
> - irq_mode: IRQMode,
> - completion_time: Delta,
> - memory_backed: bool,
> - ) -> Result<GenDisk<Self>> {
> + fn new(options: NullBlkOptions<'_>) -> Result<GenDisk<Self>> {
> + let NullBlkOptions {
> + name,
> + block_size,
> + rotational,
> + capacity_mib,
> + irq_mode,
> + completion_time,
> + memory_backed,
> + submit_queues,
> + } = options;

Nice!

Alice