mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yu Kuai <yukuai1@huaweicloud.com>
To: Bart Van Assche <bvanassche@acm.org>,
	YangYang <yang.yang@vivo.com>, Yu Kuai <yukuai1@huaweicloud.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	"yukuai (C)" <yukuai3@huawei.com>
Subject: Re: [PATCH] block: fix deadlock between sd_remove & sd_release
Date: Fri, 19 Jul 2024 11:15:22 +0800	[thread overview]
Message-ID: <331c036b-322e-0658-ff88-4cce080c5aba@huaweicloud.com> (raw)
In-Reply-To: <e7c95d49-d279-451c-9bd0-3f4009c7afcd@acm.org>



在 2024/07/18 0:23, Bart Van Assche 写道:
> On 7/17/24 3:15 AM, YangYang wrote:
>> These sysfs nodes are in different directories, the scsi node located
>> at /sys/bus/scsi/devices/0:0:0:0 and the gendisk node located at
>> /sys/block/sda. Would it be necessary to wait for the completion of
>> the scsi sysfs nodes' read/write operations before removing the
>> gendisk sysfs node?
> 
> No. sysfs_remove_files() waits for pending read and write operations to
> complete.
> 

So I check this and actually gendisk kobject is a child of scsi disk
kobject, not the other way. sda/device is just a symbol link.

sda/device -> ../../../14:2:0:0.

So, the sysfs api for gendisk itself doesn't issue IO, and as long as
related driver doesn't create new such api under gendisk, this won't
be a problem.

Thanks,
Kuai
> Bart.
> 
> .
> 


      reply	other threads:[~2024-07-19  3:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-16  8:38 Yang Yang
2024-07-16  9:15 ` Yu Kuai
2024-07-16  9:30   ` YangYang
2024-07-17  3:53     ` Yu Kuai
2024-07-17 10:15       ` YangYang
2024-07-17 16:23         ` Bart Van Assche
2024-07-19  3:15           ` Yu Kuai [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=331c036b-322e-0658-ff88-4cce080c5aba@huaweicloud.com \
    --to=yukuai1@huaweicloud.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yang.yang@vivo.com \
    --cc=yukuai3@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®