[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <97498865-bb36-7367-4cf3-de6d812b23cb@gmail.com>
Date: Mon, 30 Sep 2019 12:20:18 +0300
From: Pavel Begunkov <asml.silence@...il.com>
To: Christoph Hellwig <hch@...radead.org>
Cc: Jens Axboe <axboe@...nel.dk>, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] blk-mq: reuse code in blk_mq_check_inflight*()
On 9/30/2019 11:33 AM, Christoph Hellwig wrote:
> On Mon, Sep 30, 2019 at 11:27:32AM +0300, Pavel Begunkov (Silence) wrote:
>> From: Pavel Begunkov <asml.silence@...il.com>
>>
>> 1. Reuse the same walker callback for both blk_mq_in_flight() and
>> blk_mq_in_flight_rw().
>>
>> 2. Store inflight counters immediately in struct mq_inflight.
>> It's type-safer and removes extra indirection.
>
> You really want to split this into two patches. Part 2 looks very
Good point, diff is peculiarly aligned indeed. I will resend it.
> sensible to me, but I don't really see how 1 is qn equivalent
> transformation right now. Splitting it out and writing a non-trivial
> changelog might help understanding it if you think it really is
> equivalent as-is.
>
blk_mq_check_inflight() increments only inflight[0].
blk_mq_check_inflight_rw() increments inflight[0] or inflight[1]
depending on a flag, so summing them gives what the first function returns.
--
Yours sincerely,
Pavel Begunkov
Powered by blists - more mailing lists