Linux block layer
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Mike Snitzer <snitzer@redhat.com>, Ming Lei <ming.lei@redhat.com>
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 10:16:15 -0700	[thread overview]
Message-ID: <e0a147a8-e936-e818-7f10-b32422ebe9cc@kernel.dk> (raw)
In-Reply-To: <20190122171504.GA11234@redhat.com>

On 1/22/19 10:15 AM, Mike Snitzer wrote:
> 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>

I am, thanks both of you for looking into this. I'm a bit behind on email
and patches from over the long weekend.

-- 
Jens Axboe


      reply	other threads:[~2019-01-22 17:16 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
2019-01-22 17:16   ` 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=e0a147a8-e936-e818-7f10-b32422ebe9cc@kernel.dk \
    --to=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 \
    --cc=snitzer@redhat.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