Hi,
在 2023/02/01 14:22, Christoph Hellwig 写道:
On Wed, Feb 01, 2023 at 09:04:12AM +0800, Yu Kuai wrote:
+ if (test_bit(GD_NEED_PART_SCAN, &disk->state) && !bdev->bd_holder)
bdev_disk_changed(disk, false);
I think this is wrong here... We should at least allow the exclusively
opener to scan partition, right?
bd_holder is only set in bd_finish_claiming, which is called after
the partition rescan.
.
I mean that someone open bdev exclusively first, and then call ioctl to
rescan partition.
By the way, disk_scan_partitions() won't claim bdev in the first
place...
Thanks,
Kuai