linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] blk-mq: Inline status checkers
Date: Mon, 30 Sep 2019 22:45:20 +0300	[thread overview]
Message-ID: <16187bf2-b3ff-651c-ddb3-24e38c78dcf0@gmail.com> (raw)
In-Reply-To: <20190930083551.GB24152@infradead.org>


[-- Attachment #1.1: Type: text/plain, Size: 1441 bytes --]

On 30/09/2019 11:35, Christoph Hellwig wrote:
> On Mon, Sep 30, 2019 at 11:25:49AM +0300, Pavel Begunkov (Silence) wrote:
>> From: Pavel Begunkov <asml.silence@gmail.com>
>>
>> blk_mq_request_completed() and blk_mq_request_started() are
>> short, inline it.
>>
>> Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
>> ---
>>  block/blk-mq.c         | 12 ------------
>>  block/blk-mq.h         |  9 ---------
>>  include/linux/blk-mq.h | 20 ++++++++++++++++++--
>>  3 files changed, 18 insertions(+), 23 deletions(-)
>>
>> diff --git a/block/blk-mq.c b/block/blk-mq.c
>> index 279b138a9e50..d97181d9a3ec 100644
>> --- a/block/blk-mq.c
>> +++ b/block/blk-mq.c
>> @@ -647,18 +647,6 @@ bool blk_mq_complete_request(struct request *rq)
>>  }
>>  EXPORT_SYMBOL(blk_mq_complete_request);
>>  
>> -int blk_mq_request_started(struct request *rq)
>> -{
>> -	return blk_mq_rq_state(rq) != MQ_RQ_IDLE;
>> -}
>> -EXPORT_SYMBOL_GPL(blk_mq_request_started);
>> -
>> -int blk_mq_request_completed(struct request *rq)
>> -{
>> -	return blk_mq_rq_state(rq) == MQ_RQ_COMPLETE;
>> -}
>> -EXPORT_SYMBOL_GPL(blk_mq_request_completed);
> 
> How about just killing these helpers instead?
> 
I'm not sure that this is better. That's more intrusive and
blk_mq_request_started() looks clearer than
(blk_mq_rq_state(rq) != MQ_RQ_IDLE).

Anyway, I've sent v2 and fine with both.


-- 
Yours sincerely,
Pavel Begunkov


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2019-09-30 20:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-30  8:25 [PATCH 1/1] blk-mq: Inline status checkers Pavel Begunkov (Silence)
2019-09-30  8:35 ` Christoph Hellwig
2019-09-30 19:45   ` Pavel Begunkov [this message]
2019-09-30 19:43 ` [PATCH v2 1/1] blk-mq: Inline request " Pavel Begunkov (Silence)
2019-09-30 19:53   ` Bart Van Assche
2019-09-30 20:12     ` Pavel Begunkov
2019-10-02 13:09       ` Jens Axboe
2019-09-30 20:13     ` Mike Snitzer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16187bf2-b3ff-651c-ddb3-24e38c78dcf0@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=hch@infradead.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).