Re: [PATCH v2 1/1] blk-mq: Inline request status checkers
- To: Bart Van Assche <bvanassche@acm.org>
- Cc: "Pavel Begunkov (Silence)" <asml.silence@gmail.com>, Jens Axboe <axboe@kernel.dk>, Josef Bacik <josef@toxicpanda.com>, Keith Busch <kbusch@kernel.org>, Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, nbd@other.debian.org, linux-nvme@lists.infradead.org
- Subject: Re: [PATCH v2 1/1] blk-mq: Inline request status checkers
- From: Mike Snitzer <snitzer@redhat.com>
- Date: Mon, 30 Sep 2019 16:13:24 -0400
- Message-id: <[🔎] 20190930201324.GA19526@redhat.com>
- In-reply-to: <[🔎] e4d452ad-da24-a1a9-7e2d-f9cd5d0733da@acm.org>
- References: <1cd320dad54bd78cb6721f7fe8dd2e197b9fbfa2.1569830796.git.asml.silence@gmail.com> <[🔎] e6fc239412811140c83de906b75689530661f65d.1569872122.git.asml.silence@gmail.com> <[🔎] e4d452ad-da24-a1a9-7e2d-f9cd5d0733da@acm.org>
On Mon, Sep 30 2019 at 3:53pm -0400,
Bart Van Assche <bvanassche@acm.org> wrote:
> On 9/30/19 12:43 PM, Pavel Begunkov (Silence) wrote:
> > @@ -282,7 +282,7 @@ static bool bt_tags_iter(struct sbitmap *bitmap, unsigned int bitnr, void *data)
> > * test and set the bit before assining ->rqs[].
> > */
> > rq = tags->rqs[bitnr];
> > - if (rq && blk_mq_request_started(rq))
> > + if (rq && blk_mq_rq_state(rq) != MQ_RQ_IDLE)
> > return iter_data->fn(rq, iter_data->data, reserved);
> >
> > return true>
> > @@ -360,7 +360,7 @@ static bool blk_mq_tagset_count_completed_rqs(struct request *rq,
> > {
> > unsigned *count = data;
> >
> > - if (blk_mq_request_completed(rq))
> > + if (blk_mq_rq_state(rq) == MQ_RQ_COMPLETE)
> > (*count)++;
> > return true;
> > }
>
> Changes like the above significantly reduce readability of the code in
> the block layer core. I don't like this. I think this patch is a step
> backwards instead of a step forwards.
I agree, not helpful.
Reply to: