From: Bart Van Assche <bvanassche@acm.org>
To: Weiping Zhang <zhangweiping@didiglobal.com>,
axboe@kernel.dk, hch@infradead.org
Cc: linux-block@vger.kernel.org
Subject: Re: [PATCH v2] block: don't show io_timeout if driver has no timeout handler
Date: Tue, 02 Apr 2019 08:05:43 -0700 [thread overview]
Message-ID: <1554217543.118779.130.camel@acm.org> (raw)
In-Reply-To: <20190402131424.GA12935@192.168.3.9>
On Tue, 2019-04-02 at 21:14 +0800, Weiping Zhang wrote:
> [ ... ]
> -static struct attribute *default_attrs[] = {
> +static struct attribute *queue_attrs[] = {
> &queue_requests_entry.attr,
> &queue_ra_entry.attr,
> &queue_max_hw_sectors_entry.attr,
> @@ -770,6 +770,25 @@ static struct attribute *default_attrs[] = {
> NULL,
> };
>
> [ ... ]
>
> static ssize_t
> @@ -890,7 +909,6 @@ static const struct sysfs_ops queue_sysfs_ops = {
>
> struct kobj_type blk_queue_ktype = {
> .sysfs_ops = &queue_sysfs_ops,
> - .default_attrs = default_attrs,
> .release = blk_release_queue,
> };
>
> @@ -939,6 +957,14 @@ int blk_register_queue(struct gendisk *disk)
> goto unlock;
> }
>
> + ret = sysfs_create_group(&q->kobj, &queue_attr_group);
> + if (ret) {
> + blk_trace_remove_sysfs(dev);
> + kobject_del(&q->kobj);
> + kobject_put(&dev->kobj);
> + goto unlock;
> + }
> +
> if (queue_is_mq(q)) {
> __blk_mq_register_dev(dev, q);
> blk_mq_debugfs_register(q);
This kind of change introduces an unacceptable race against udev. I think we
should wait with making this change until the patch series "kobject: Add
default group support to kobj_type and replace subsystem uses" is upstream.
Bart.
next prev parent reply other threads:[~2019-04-02 15:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-02 13:14 [PATCH v2] block: don't show io_timeout if driver has no timeout handler Weiping Zhang
2019-04-02 15:05 ` Bart Van Assche [this message]
2019-04-03 10:48 ` Weiping Zhang
2019-04-03 16:49 ` Bart Van Assche
2019-04-03 16:54 ` Bart Van Assche
2019-04-22 14:35 ` Weiping Zhang
2019-04-22 14:37 ` Jens Axboe
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=1554217543.118779.130.camel@acm.org \
--to=bvanassche@acm.org \
--cc=axboe@kernel.dk \
--cc=hch@infradead.org \
--cc=linux-block@vger.kernel.org \
--cc=zhangweiping@didiglobal.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).