Re: [PATCH v2 4/5] scsi: Add scsi_restart_hctx()

Bart Van Assche
2017-04-04T15:56:34Z

On 04/03/2017 11:42 PM, Christoph Hellwig wrote:=0A=
>> +static void scsi_restart_hctx(struct request_queue *q,=0A=
>> + struct blk_mq_hw_ctx *hctx)=0A=
>> +{=0A=
>> + struct blk_mq_tags *tags =3D hctx->tags;=0A=
>> + struct blk_mq_tag_set *set =3D q->tag_set;=0A=
>> + int i;=0A=
>> +=0A=
>> + rcu_read_lock();=0A=
>> + list_for_each_entry_rcu(q, &set->tag_list, tag_set_list)=0A=
>> + queue_for_each_hw_ctx(q, hctx, i)=0A=
>> + if (hctx->tags =3D=3D tags)=0A=
>> + blk_mq_sched_restart_hctx(hctx);=0A=
>> + rcu_read_unlock();=0A=
>> +}=0A=
> =0A=
> This looks like generic block layer code, why is it in SCSI?=0A=
=0A=
Hello Christoph,=0A=
=0A=
That's an excellent question. I assume that you are fine with moving=0A=
this code to the block layer?=0A=
=0A=
Bart.=0A=
=0A=