From: Mike Snitzer <snitzer@redhat.com>
To: Ming Lei <ming.lei@redhat.com>, Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org,
Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
NeilBrown <neilb@suse.com>
Subject: Re: block: cover another queue enter recursion via BIO_QUEUE_ENTERED
Date: Tue, 22 Jan 2019 12:15:04 -0500 [thread overview]
Message-ID: <20190122171504.GA11234@redhat.com> (raw)
In-Reply-To: <20190122082017.9020-1-ming.lei@redhat.com>
On Tue, Jan 22 2019 at 3:20am -0500,
Ming Lei <ming.lei@redhat.com> wrote:
> Except for blk_queue_split(), bio_split() is used for splitting bio too,
> then the remained bio is often resubmit to queue via generic_make_request().
> So the same queue enter recursion exits in this case too. Unfortunatley
> commit cd4a4ae4683dc2 doesn't help this case.
>
> This patch covers the above case by setting BIO_QUEUE_ENTERED before calling
> q->make_request_fn.
>
> In theory the per-bio flag is used to simulate one stack variable, it is
> just fine to clear it after q->make_request_fn is returned. Especially
> the same bio can't be submitted from another context.
>
> Fixes: cd4a4ae4683dc2 ("block: don't use blocking queue entered for recursive bio submits")
> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Cc: Mike Snitzer <snitzer@redhat.com>
> Cc: NeilBrown <neilb@suse.com>
> Signed-off-by: Ming Lei <ming.lei@redhat.com>
Looks good, I'll drop my DM patch that set/cleared BIO_QUEUE_ENTERED.
Jens, you OK with picking this up for 5.0-rc?
Reviewed-by: Mike Snitzer <snitzer@redhat.com>
next prev parent reply other threads:[~2019-01-22 17:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-22 8:20 [PATCH] block: cover another queue enter recursion via BIO_QUEUE_ENTERED Ming Lei
2019-01-22 17:15 ` Mike Snitzer [this message]
2019-01-22 17:16 ` 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=20190122171504.GA11234@redhat.com \
--to=snitzer@redhat.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=neilb@suse.com \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
/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