lkml.org 
[lkml]   [2020]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] block: revert pushing the final release of request_queue to a workqueue.
From
Date
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

\
 
 \ /
  Last update: 2020-02-10 09:51    [W:0.142 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site