All of lore.kernel.org
 help / color / mirror / Atom feed
From: "chenxiang (M)" <chenxiang66@hisilicon.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>, Tim Waugh <tim@cyberelk.net>,
	<martin.petersen@oracle.com>, <linux-block@vger.kernel.org>,
	<linux-scsi@vger.kernel.org>,
	"linuxarm@huawei.com" <linuxarm@huawei.com>
Subject: Re: remove ->revalidate_disk (resend)
Date: Thu, 17 Jun 2021 11:43:54 +0800	[thread overview]
Message-ID: <709468de-c8fd-0eeb-a3f9-5eb40650034b@hisilicon.com> (raw)
In-Reply-To: <20210616135015.GA30671@lst.de>

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).

>
> .
>



  reply	other threads:[~2021-06-17  3:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-08  7:45 remove ->revalidate_disk (resend) Christoph Hellwig
2021-03-08  7:45 ` [PATCH 1/3] paride/pd: remove ->revalidate_disk Christoph Hellwig
2021-03-08  7:45 ` [PATCH 2/3] umem: " Christoph Hellwig
2021-03-08  7:45 ` [PATCH 3/3] block: remove the revalidate_disk method Christoph Hellwig
2021-03-29  5:55 ` remove ->revalidate_disk (resend) Christoph Hellwig
2021-03-29 13:01   ` Jens Axboe
2021-03-30  5:28     ` Christoph Hellwig
2021-06-16  9:41 ` chenxiang (M)
2021-06-16 13:50   ` Christoph Hellwig
2021-06-17  3:43     ` chenxiang (M) [this message]
2021-06-17 10:29       ` Christoph Hellwig
2021-06-17 11:50         ` chenxiang (M)

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=709468de-c8fd-0eeb-a3f9-5eb40650034b@hisilicon.com \
    --to=chenxiang66@hisilicon.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=martin.petersen@oracle.com \
    --cc=tim@cyberelk.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.