From: Jens Axboe <axboe@kernel.dk>
To: Damien Le Moal <Damien.LeMoal@wdc.com>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Cc: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Subject: Re: [PATCH V2] block: Fix elv_support_iosched()
Date: Mon, 14 Oct 2019 13:54:23 -0600 [thread overview]
Message-ID: <dae83811-e2ce-9343-624b-209bf617b5a7@kernel.dk> (raw)
In-Reply-To: <BYAPR04MB581615B3209B75F0BE608700E7900@BYAPR04MB5816.namprd04.prod.outlook.com>
On 10/13/19 6:03 PM, Damien Le Moal wrote:
> On 2019/10/09 7:40, Damien Le Moal wrote:
>> A BIO based request queue does not have a tag_set, which prevent testing
>> for the flag BLK_MQ_F_NO_SCHED indicating that the queue does not
>> require an elevator. This leads to an incorrect initialization of a
>> default elevator in some cases such as BIO based null_blk
>> (queue_mode == BIO) with zoned mode enabled as the default elevator in
>> this case is mq-deadline instead of "none".
>>
>> Fix this by testing for a NULL queue mq_ops field which indicates that
>> the queue is BIO based and should not have an elevator.
>>
>> Reported-by: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
>> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
>> ---
>> Changes from V1:
>> * Test if q->mq_ops is NULL to identify BIO based queues
>>
>> block/elevator.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/block/elevator.c b/block/elevator.c
>> index 5437059c9261..076ba7308e65 100644
>> --- a/block/elevator.c
>> +++ b/block/elevator.c
>> @@ -616,7 +616,8 @@ int elevator_switch_mq(struct request_queue *q,
>>
>> static inline bool elv_support_iosched(struct request_queue *q)
>> {
>> - if (q->tag_set && (q->tag_set->flags & BLK_MQ_F_NO_SCHED))
>> + if (!q->mq_ops ||
>> + (q->tag_set && (q->tag_set->flags & BLK_MQ_F_NO_SCHED)))
>> return false;
>> return true;
>> }
>>
>
> Jens,
>
> Ping ? This was not in your rc3 pull request...
Yeah that missed -rc3, I've queued it up for -rc4. Thanks!
--
Jens Axboe
prev parent reply other threads:[~2019-10-14 19:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-08 22:39 [PATCH V2] block: Fix elv_support_iosched() Damien Le Moal
2019-10-09 3:31 ` Bob Liu
2019-10-14 0:03 ` Damien Le Moal
2019-10-14 19:54 ` Jens Axboe [this message]
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=dae83811-e2ce-9343-624b-209bf617b5a7@kernel.dk \
--to=axboe@kernel.dk \
--cc=Damien.LeMoal@wdc.com \
--cc=linux-block@vger.kernel.org \
--cc=shinichiro.kawasaki@wdc.com \
/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).