lkml.org 
[lkml]   [2020]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] block: rename 'q->debugfs_dir' in blk_unregister_queue()
From
Date
On 2020-02-10 19:51, yu kuai wrote:
> +static struct dentry *blk_prepare_release_queue(struct request_queue *q)
> +{
> + struct dentry *new = NULL;
> + char name[DNAME_INLINE_LEN];
> + int i = 0;
> +
> + if (IS_ERR_OR_NULL(q->debugfs_dir))
> + return q->debugfs_dir;
> +
> + while (new == NULL) {
> + sprintf(name, "ready_to_remove_%d", i++);
> + new = debugfs_rename(blk_debugfs_root, q->debugfs_dir,
> + blk_debugfs_root, name);
> + }
> +
> + return new;
> +}

What is the behavior of this loop if multiple block devices are being
removed concurrently? Does it perhaps change remove block device removal
from an O(1) into an O(n) operation?

Since this scenario may only matter to syzbot tests: has it been
considered to delay block device creation if the debugfs directory from
a previous incarnation of the block device still exists?

Thanks,

Bart.

\
 
 \ /
  Last update: 2020-02-12 04:29    [W:0.083 / U:1.820 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site