From: Bart Van Assche <Bart.VanAssche@sandisk.com>
To: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"axboe@kernel.dk" <axboe@kernel.dk>
Subject: Re: [PATCH] blk-mq-sched: add might_sleep() check for flush/fua insert
Date: Thu, 20 Apr 2017 23:20:53 +0000 [thread overview]
Message-ID: <1492730452.2642.17.camel@sandisk.com> (raw)
In-Reply-To: <a31e70b9-0a9a-44bc-fefa-ac317b4e095b@kernel.dk>
On Thu, 2017-04-20 at 17:09 -0600, Jens Axboe wrote:
> From: Jens Axboe <axboe@fb.com>
> Subject: [PATCH] blk-mq: add might_sleep check to blk_mq_get_driver_tag()
>=20
> If the caller passes in wait=3Dtrue, it has to be able to block
> for a driver tag. We just had a bug where flush insertion
> would block on tag allocation, while we had preempt disabled.
> Ensure that we catch cases like that earlier next time.
>=20
> Signed-off-by: Jens Axboe <axboe@fb.com>
>=20
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index 992f09772f8a..dd6e5dd62804 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -866,6 +866,8 @@ bool blk_mq_get_driver_tag(struct request *rq, struct=
blk_mq_hw_ctx **hctx,
> .flags =3D wait ? 0 : BLK_MQ_REQ_NOWAIT,
> };
> =20
> + might_sleep_if(wait);
> +
> if (rq->tag !=3D -1)
> goto done;
> =20
>=20
Thanks!
Reviewed-by: Bart Van Assche <Bart.VanAssche@sandisk.com>=
prev parent reply other threads:[~2017-04-20 23:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-20 22:45 [PATCH] blk-mq-sched: add might_sleep() check for flush/fua insert Jens Axboe
2017-04-20 22:57 ` Bart Van Assche
2017-04-20 23:09 ` Jens Axboe
2017-04-20 23:20 ` Bart Van Assche [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=1492730452.2642.17.camel@sandisk.com \
--to=bart.vanassche@sandisk.com \
--cc=axboe@kernel.dk \
--cc=linux-block@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.