Re: [PATCH] block: fix arg type in `blk_mq_update_nr_hw_queues`
From: Jens Axboe
Date: Tue Jun 09 2026 - 11:24:07 EST
On 6/9/26 1:59 AM, Andreas Hindborg wrote:
>> If this patch does not change the behavior of the code for any practical
>> use case that would be good to mention.
>
> The patch does not change behavior of the code as long as no overflows
> occur, and they are not likely to occur. I will be sure to add that to
> the commit message.
>
> I came across this while designing the Rust API for these functions.
> Rust is kind of particular about integer types, so it gave me some
> checks/casts on the Rust side that really should no be required. I was
> thinking we might as well change the type on the C side to unsigned when
> the data it carries really should be unsigned.
The change itself is fine imho, but I agree with Bart that the commit
messages should be phrased very differently. It's not a fix, it's a
cleanup that makes your life simpler on the rust side.
--
Jens Axboe