Re: [PATCHv6 3/3] block: fix potential deadlock while running nr_hw_queue update

Nilay Shroff
2025-07-01T05:20:50Z

On 7/1/25 8:54 AM, Ming Lei wrote:

>> diff --git a/block/elevator.c b/block/elevator.c
>> index 50f4b78efe66..8ba8b869d5a4 100644
>> --- a/block/elevator.c
>> +++ b/block/elevator.c
>> @@ -705,7 +705,7 @@ static int elevator_change(struct request_queue *q, struct elv_change_ctx *ctx)
>> * The I/O scheduler depends on the number of hardware queues, this forces a
>> * reattachment when nr_hw_queues changes.
>> */
>> -void elv_update_nr_hw_queues(struct request_queue *q)
>> +void elv_update_nr_hw_queues(struct request_queue *q, struct xarray *et_table)
>
> et_table isn't necessary to expose to elv_update_nr_hw_queues(), and it is
> less readable than passing 'struct elevator_tags *' directly, but it can be
> one followup improvement.
>
Yeah, makes sense... I will update this in the subsequent patchset.

Thanks,
--Nilay