Re: remove ->revalidate_disk (resend)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Christoph,


在 2021/6/16 21:50, Christoph Hellwig 写道:
On Wed, Jun 16, 2021 at 05:41:54PM +0800, chenxiang (M) wrote:
Hi,

Before i reported a issue related to revalidate disk
(https://www.spinics.net/lists/linux-scsi/msg151610.html), and no one
replies, but the issue is still.

And i plan to resend it, but i find that revalidate_disk interface is
completely removed in this patchset.

Do you have any idea about the above issue?
bdev_disk_changed still calls into sd_revalidate_disk through sd_open.
How did bdev_disk_changed get called for you previously?  If it was
through the BLKRRPART ioctl please try latest mainline, which ensures
that ->open is called for that case.

I use the latest mainline (Linux Euler 5.13.0-rc6-next-20210616), and the issue is still.
It is through BLKRRPART ioctl, and the call stack is as follows:

BLKRRPART ->
        block_ioctl ->
                blkdev_ioctl ->
                        blkdev_common_ioctl ->
                                blkdev_get_by_dev ->
                                        __blkdev_get ->
                                                ...
disk->fops->open() ->
                                                        sd_open()
                                                ...
                                                dev_disk_changed()
                                                ...



In function sd_open(), it calls sd_revalidate_disk() when sdev->removable or sdkp-> write_prot is true, but for our disk, sdev->removable = 0 and
sdkp->write_prot = 0, so sd_revalidate_disk() is not called actually.
For previous code, it will call sd_revalidate_disk() in bdev_disk_changed() from here (https://elixir.bootlin.com/linux/v5.10-rc1/source/fs/block_dev.c#L1411).


.






[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux