[PATCH 16/17] blk-mq: add tagset quiesce interface

Sagi Grimberg sagi at grimberg.me
Wed Oct 26 06:02:51 PDT 2022


>> @@ -315,6 +315,31 @@ void blk_mq_unquiesce_queue(struct request_queue *q)
>>   }
>>   EXPORT_SYMBOL_GPL(blk_mq_unquiesce_queue);
>> +void blk_mq_quiesce_tagset(struct blk_mq_tag_set *set)
>> +{
>> +    struct request_queue *q;
>> +
>> +    mutex_lock(&set->tag_list_lock);
>> +    list_for_each_entry(q, &set->tag_list, tag_set_list) {
>> +        if (!blk_queue_skip_tagset_quiesce(q))
>> +            blk_mq_quiesce_queue_nowait(q);
>> +    }
>> +    blk_mq_wait_quiesce_done(set);
>> +    mutex_unlock(&set->tag_list_lock);
>> +}
>> +EXPORT_SYMBOL_GPL(blk_mq_quiesce_tagset);
>> +
>> +void blk_mq_unquiesce_tagset(struct blk_mq_tag_set *set)
>> +{
>> +    struct request_queue *q;
>> +
>> +    mutex_lock(&set->tag_list_lock);
>> +    list_for_each_entry(q, &set->tag_list, tag_set_list)
>> +        blk_mq_unquiesce_queue(q);
> We should add the check of blk_queue_skip_tagset_quiesce() to keep 
> consistent
> with blk_mq_quiesce_tagset(), it doesn't make much sense, but maybe look 
> a little better.
>          if (!blk_queue_skip_tagset_quiesce(q))
>              blk_mq_unquiesce_queue(q);

I agree.



More information about the Linux-nvme mailing list