[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a18fa379-5a9b-ff45-3be4-b253efd96a50@huawei.com>
Date: Fri, 17 Jun 2022 17:42:36 +0100
From: John Garry <john.garry@...wei.com>
To: Bart Van Assche <bvanassche@....org>, <axboe@...nel.dk>,
<damien.lemoal@...nsource.wdc.com>, <hch@....de>,
<jejb@...ux.ibm.com>, <martin.petersen@...cle.com>, <hare@...e.de>,
<satishkh@...co.com>, <sebaddel@...co.com>, <kartilak@...co.com>
CC: <linux-rdma@...r.kernel.org>, <linux-mmc@...r.kernel.org>,
<linux-nvme@...ts.infradead.org>, <linux-s390@...r.kernel.org>,
<linux-scsi@...r.kernel.org>, <mpi3mr-linuxdrv.pdl@...adcom.com>,
<linux-block@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<nbd@...er.debian.org>
Subject: Re: [PATCH 5/5] blk-mq: Drop 'reserved' member of busy_tag_iter_fn
On 17/06/2022 17:33, Bart Van Assche wrote:
> On 6/17/22 03:55, John Garry wrote:
>> We no longer use the 'reserved' member in for any iter function so it
> ^^^^^^
> One of these two words probably should be removed.
Yeah, it's a typo - I can fix it.
>
>> diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c
>> index 2dcd738c6952..b8cc8b41553f 100644
>> --- a/block/blk-mq-tag.c
>> +++ b/block/blk-mq-tag.c
>> @@ -266,7 +266,6 @@ static bool bt_iter(struct sbitmap *bitmap,
>> unsigned int bitnr, void *data)
>> struct blk_mq_hw_ctx *hctx = iter_data->hctx;
>> struct request_queue *q = iter_data->q;
>> struct blk_mq_tag_set *set = q->tag_set;
>> - bool reserved = iter_data->reserved;
>> struct blk_mq_tags *tags;
>> struct request *rq;
>> bool ret = true;
>> @@ -276,7 +275,7 @@ static bool bt_iter(struct sbitmap *bitmap,
>> unsigned int bitnr, void *data)
>> else
>> tags = hctx->tags;
>> - if (!reserved)
>> + if (!iter_data->reserved)
>> bitnr += tags->nr_reserved_tags;
>> /*
>> * We can hit rq == NULL here, because the tagging functions
>
> Is the above change really necessary?
It's not totally necessary. Since local variable 'reserved' would now
only be used once I thought it was better to get rid of it.
I can keep it if you really think that is better.
>> @@ -337,12 +336,11 @@ static bool bt_tags_iter(struct sbitmap *bitmap,
>> unsigned int bitnr, void *data)
>> {
>> struct bt_tags_iter_data *iter_data = data;
>> struct blk_mq_tags *tags = iter_data->tags;
>> - bool reserved = iter_data->flags & BT_TAG_ITER_RESERVED;
>> struct request *rq;
>> bool ret = true;
>> bool iter_static_rqs = !!(iter_data->flags &
>> BT_TAG_ITER_STATIC_RQS);
>> - if (!reserved)
>> + if (!(iter_data->flags & BT_TAG_ITER_RESERVED))
>> bitnr += tags->nr_reserved_tags;
>> /*
>
> Same question here: is the above change really necessary?
As above.
Thanks,
john
Powered by blists - more mailing lists