From: Bart Van Assche <Bart.VanAssche@sandisk.com>
To: "tj@kernel.org" <tj@kernel.org>,
"paolo.valente@linaro.org" <paolo.valente@linaro.org>,
"axboe@kernel.dk" <axboe@kernel.dk>
Cc: "ulf.hansson@linaro.org" <ulf.hansson@linaro.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"broonie@kernel.org" <broonie@kernel.org>,
"linus.walleij@linaro.org" <linus.walleij@linaro.org>
Subject: Re: [PATCH BUGFIX] block: make elevator_get robust against cross blk/blk-mq choice
Date: Mon, 13 Feb 2017 21:12:59 +0000 [thread overview]
Message-ID: <1487020366.2719.5.camel@sandisk.com> (raw)
In-Reply-To: <20170213210107.4848-2-paolo.valente@linaro.org>
On Mon, 2017-02-13 at 22:01 +0100, Paolo Valente wrote:
> -static struct elevator_type *elevator_get(const char *name, bool try_loading)
> +static struct elevator_type *elevator_get(const char *name, bool try_loading,
> + bool mq_ops)
Please choose a better name for that argument, e.q. "mq". To me the name "mq_ops"
means "a pointer to a data structure with operation function pointers".
> + if (e && (e->uses_mq != mq_ops)) {
> + pr_err("ERROR: attempted to choose %s %s I/O scheduler in blk%s",
> + name, e->uses_mq ? "blk-mq" : "legacy", mq_ops ? "-mq" : "");
> + e = NULL;
> + }
How about changing the above into:
+ if (e && e->uses_mq != mq) {
+ pr_err("ERROR: attempt to configure %s as I/O scheduler for a %s queue\n",
+ name, mq ? "blk-mq" : "legacy");
+ e = NULL;
+ }
Thanks,
Bart.
next prev parent reply other threads:[~2017-02-13 21:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-13 21:01 [PATCH BUGFIX] attempt to fix wrong scheduler selection Paolo Valente
2017-02-13 21:01 ` [PATCH BUGFIX] block: make elevator_get robust against cross blk/blk-mq choice Paolo Valente
2017-02-13 21:12 ` Bart Van Assche [this message]
2017-02-13 22:09 ` Omar Sandoval
2017-02-13 22:28 ` Jens Axboe
2017-02-13 23:10 ` Jens Axboe
2017-02-14 8:14 ` Paolo Valente
2017-02-14 15:16 ` Jens Axboe
2017-02-14 15:48 ` Paolo Valente
2017-02-14 6:58 ` Hannes Reinecke
2017-02-14 7:07 ` Omar Sandoval
2017-02-14 7:11 ` Hannes Reinecke
2017-02-14 15:13 ` Jens Axboe
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=1487020366.2719.5.camel@sandisk.com \
--to=bart.vanassche@sandisk.com \
--cc=axboe@kernel.dk \
--cc=broonie@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paolo.valente@linaro.org \
--cc=tj@kernel.org \
--cc=ulf.hansson@linaro.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