mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: yu kuai <yukuai3@huawei.com>, axboe@kernel.dk, ming.lei@redhat.com
Cc: yi.zhang@huawei.com, zhangxiaoxu5@huawei.com,
	luoshijie1@huawei.com, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] block: rename 'q->debugfs_dir' in blk_unregister_queue()
Date: Tue, 11 Feb 2020 19:27:24 -0800	[thread overview]
Message-ID: <c57b050d-9ed7-9d6b-b1d0-628a197f6ea6@acm.org> (raw)
In-Reply-To: <20200211035137.19454-1-yukuai3@huawei.com>

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.

  reply	other threads:[~2020-02-12  3:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-11  3:51 yu kuai
2020-02-12  3:27 ` Bart Van Assche [this message]
2020-02-12  4:20   ` yukuai (C)
2020-02-13  4:38 ` kbuild test robot
2020-02-13 11:39 ` kbuild test robot

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=c57b050d-9ed7-9d6b-b1d0-628a197f6ea6@acm.org \
    --to=bvanassche@acm.org \
    --cc=axboe@kernel.dk \
    --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=yukuai3@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

all inboxes | Powered by JetHome®