Skip to content

Conversation

@blktests-ci
Copy link

@blktests-ci blktests-ci bot commented Nov 21, 2025

Pull request for series with
subject: null_blk: Align struct nullb_device field types with module parameters
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1026312

@blktests-ci
Copy link
Author

blktests-ci bot commented Nov 21, 2025

Upstream branch: fd95357
series: https://patchwork.kernel.org/project/linux-block/list/?series=1026312
version: 1

The struct nullb_device previously used generic int types for several
fields that represent boolean flags, unsigned counters, or large size
values. This patch updates the field types to improve type safety and
match the corresponding module parameters:

- Change boolean fields to bool (e.g., no_sched, virt_boundary)
- Change counters and queue-related fields to unsigned int
- Change size-related fields (size, cache_size, zone_size, zone_capacity)
  to unsigned long

This ensures consistency between module_param declarations and internal
data structures, prevents negative values for unsigned parameters.
The output of modinfo before and after applying this patch is as follows:

Before:
[...]
parm:           no_sched:No io scheduler (int)
parm:           submit_queues:Number of submission queues (int)
parm:           poll_queues:Number of IOPOLL submission queues (int)
parm:           home_node:Home node for the device (int)
[...]
parm:           gb:Size in GB (int)
parm:           bs:Block size (in bytes) (int)
parm:           max_sectors:Maximum size of a command
		(in 512B sectors) (int)
[...]
parm:           hw_queue_depth:Queue depth for each hardware queue.
		Default: 64 (int)
[...]
parm:           zone_append_max_sectors:Maximum size of a zone append
		command (in 512B sectors). Specify 0 for zone append
		emulation (int)

After:
[...]
parm:           no_sched:No io scheduler (bool)
parm:           submit_queues:Number of submission queues (uint)
parm:           poll_queues:Number of IOPOLL submission queues (uint)
parm:           home_node:Home node for the device (uint)
[...]
parm:           gb:Size in GB (ulong)
parm:           bs:Block size (in bytes) (uint)
parm:           max_sectors:Maximum size of a command
		(in 512B sectors) (uint)
[...]
parm:           hw_queue_depth:Queue depth for each hardware queue.
		Default: 64 (uint)
[...]
parm:           zone_append_max_sectors:Maximum size of a zone append
		command (in 512B sectors). Specify 0 for zone append
		emulation (uint)
Signed-off-by: shechenglong <shechenglong@xfusion.com>
@blktests-ci
Copy link
Author

blktests-ci bot commented Dec 8, 2025

Upstream branch: c2f2b01
series: https://patchwork.kernel.org/project/linux-block/list/?series=1026312
version: 1

@blktests-ci blktests-ci bot force-pushed the series/1026312=>linus-master branch from ed9d72a to 9c65273 Compare December 8, 2025 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants