public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Ming Lei <ming.lei@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>,
	axboe@kernel.dk, linux-block@vger.kernel.org,
	syzbot+3e3f419f4a7816471838@syzkaller.appspotmail.com
Subject: Re: [PATCH] block: disable the elevator int del_gendisk
Date: Wed, 1 Jun 2022 09:14:29 +0200	[thread overview]
Message-ID: <20220601071429.GA24431@lst.de> (raw)
In-Reply-To: <YpcQpjUlX/CTORmp@T590>

On Wed, Jun 01, 2022 at 03:09:26PM +0800, Ming Lei wrote:
> > Yes, we probably need a blk_mq_quiesce_queue call like in the incremental
> > patch below.  Do you have any good reproducer, though?
> 
> blktests block/027 should cover this.

That did not trigger the problem for me.

> >  	if (q->elevator) {
> > +		blk_mq_quiesce_queue(q);
> > +
> >  		mutex_lock(&q->sysfs_lock);
> >  		elevator_exit(q);
> >  		mutex_unlock(&q->sysfs_lock);
> > +
> > +		blk_mq_unquiesce_queue(q);
> >  	}
> >  
> 
> I am afraid the above way may slow down disk shutdown a lot, see
> the following commit, that is also the reason why I moved it into disk
> release handler, when any sync io submission are done.

SCSI devices that are just probed and never had a disk attached will
not have q->elevator set and not hit this quiesce at all.

  reply	other threads:[~2022-06-01  7:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-31 16:05 [PATCH] block: disable the elevator int del_gendisk Christoph Hellwig
2022-06-01  0:54 ` Ming Lei
2022-06-01  6:43   ` Christoph Hellwig
2022-06-01  7:09     ` Ming Lei
2022-06-01  7:14       ` Christoph Hellwig [this message]
2022-06-01  9:07         ` Ming Lei
2022-06-01 12:01           ` Christoph Hellwig

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=20220601071429.GA24431@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=syzbot+3e3f419f4a7816471838@syzkaller.appspotmail.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