linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "yukuai (C)" <yukuai3@huawei.com>
To: Bart Van Assche <bvanassche@acm.org>, <axboe@kernel.dk>,
	<ming.lei@redhat.com>, <chaitanya.kulkarni@wdc.com>,
	<damien.lemoal@wdc.com>, <dhowells@redhat.com>,
	<asml.silence@gmail.com>, <ajay.joshi@wdc.com>
Cc: <linux-block@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<yi.zhang@huawei.com>, <zhangxiaoxu5@huawei.com>,
	<luoshijie1@huawei.com>, jan kara <jack@suse.cz>
Subject: Re: [PATCH] block: revert pushing the final release of request_queue to a workqueue.
Date: Mon, 10 Feb 2020 16:49:48 +0800	[thread overview]
Message-ID: <b1fead0a-5508-33e8-7aa0-5d061884716a@huawei.com> (raw)
In-Reply-To: <46a5ec83-5a26-fc8a-4cd9-a77d100b7833@acm.org>

On 2020/2/10 11:14, Bart Van Assche wrote:
> I think that calling blk_mq_exit_queue() from blk_unregister_queue()
> would break at least the sd driver. The sd driver can issue I/O after
> having called del_gendisk(). See also the sd_sync_cache() call in
> sd_shutdown().

If blk_mq_exit_queue() can't move to blk_unregister_queue(),
neither can blk_mq_debugfs_unregister(). It'a dead end.

The purpose is that when __blk_trace_setup() is called, the cleanup of
last loop_device(__blk_release_queue()) should finish aready.

I wonder if we can test that if the dir still exist in loop_add():

static int loop_add(struct loop_device **l, int i)
{
...
           char disk_name[DISK_NAME_LEN];
           struct dentry *dir, *root;

           sprintf(disk_name, "loop%d", i);
           root = debugfs_lookup("block", NULL);
           if (root) {
                   dir = debugfs_lookup(disk_name, root);
                   if (dir) {
                           dput(dir);
                           dput(root);
                          pr_err("Directory '%s' with parent 'block' 
already present!\n",disk_name);
                           return -EBUSY;
                   }
                   dput(root);
           }
...

Thanks!
Yu Kuai


      reply	other threads:[~2020-02-10  8:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-06 11:10 [PATCH] block: revert pushing the final release of request_queue to a workqueue yu kuai
2020-02-07  4:09 ` Bart Van Assche
2020-02-07  6:02   ` yukuai (C)
2020-02-07  7:10     ` yukuai (C)
2020-02-07  9:30 ` Ming Lei
2020-02-07 10:26   ` yukuai (C)
2020-02-07 12:24     ` yukuai (C)
2020-02-07 13:04       ` Ming Lei
2020-02-08  6:12         ` yukuai (C)
2020-02-10  1:00 ` Bart Van Assche
2020-02-10  2:13   ` yukuai (C)
2020-02-10  2:32     ` Ming Lei
2020-02-10  3:14     ` Bart Van Assche
2020-02-10  8:49       ` yukuai (C) [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=b1fead0a-5508-33e8-7aa0-5d061884716a@huawei.com \
    --to=yukuai3@huawei.com \
    --cc=ajay.joshi@wdc.com \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=chaitanya.kulkarni@wdc.com \
    --cc=damien.lemoal@wdc.com \
    --cc=dhowells@redhat.com \
    --cc=jack@suse.cz \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luoshijie1@huawei.com \
    --cc=ming.lei@redhat.com \
    --cc=yi.zhang@huawei.com \
    --cc=zhangxiaoxu5@huawei.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;
as well as URLs for NNTP newsgroup(s).