LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: He Zhe <zhe.he@windriver.com>
To: Christoph Hellwig <hch@lst.de>
Cc: jack@suse.cz, Jens Axboe <axboe@kernel.dk>,
	viro@zeniv.linux.org.uk, bvanassche@acm.org,
	keith.busch@intel.com, tglx@linutronix.de, mwilck@suse.com,
	yuyufen@huawei.com, linux-block@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: disk revalidation updates and OOM
Date: Wed, 11 Mar 2020 12:03:43 +0800	[thread overview]
Message-ID: <f48683d9-7854-ba5f-da3a-7ef987a539b8@windriver.com> (raw)
In-Reply-To: <20200310162647.GA6361@lst.de>



On 3/11/20 12:26 AM, Christoph Hellwig wrote:
> On Tue, Mar 10, 2020 at 11:30:27PM +0800, He Zhe wrote:
>>> So this is the exact requirement of commits to be reverted from a bisect
>>> or just a first guess?
>> Many commits failed to build or boot during bisection.
>>
>> At least the following four have to be reverted to make it work.
>>
>> 979c690d block: move clearing bd_invalidated into check_disk_size_change
>> f0b870d block: remove (__)blkdev_reread_part as an exported API
>> 142fe8f block: fix bdev_disk_changed for non-partitioned devices
>> a1548b6 block: move rescan_partitions to fs/block_dev.c
> Just to make sure we are on the same page:  if you revert all four it
> works, if you rever all but
>
> a1548b6 block: move rescan_partitions to fs/block_dev.c
>
> it doesn't?

After reverting 142fe8f, rescan_partitions would be called in block/ioctl.c
and cause a build failure. So I need to also revert a1548b6 to provide
rescan_partitions.

OR if I manually add the following diff instead of reverting a1548b6, then yes,
it works too.

diff --git a/block/ioctl.c b/block/ioctl.c
index 8d724d11c8f5..bac562604cd0 100644
--- a/block/ioctl.c
+++ b/block/ioctl.c
@@ -192,6 +192,7 @@ static int compat_blkpg_ioctl(struct block_device *bdev,
  * acquire bd_mutex. This API should be used in case that
  * caller has held bd_mutex already.
  */
+extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev, bool invalidate);
 int __blkdev_reread_part(struct block_device *bdev)
 {
        struct gendisk *disk = bdev->bd_disk;
diff --git a/fs/block_dev.c b/fs/block_dev.c
index ec10dacd18d0..30da0bc85c31 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -1508,7 +1508,7 @@ EXPORT_SYMBOL(bd_set_size);

 static void __blkdev_put(struct block_device *bdev, fmode_t mode, int for_part);

-static int rescan_partitions(struct gendisk *disk, struct block_device *bdev,
+int rescan_partitions(struct gendisk *disk, struct block_device *bdev,
                bool invalidate)
 {
        int ret;


Zhe



  reply	other threads:[~2020-03-11  4:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-02  3:55 He Zhe
2020-03-04 13:37 ` Jan Kara
2020-03-04 16:26   ` Christoph Hellwig
2020-03-07 14:29     ` Christoph Hellwig
2020-03-08 11:00       ` He Zhe
2020-03-10  7:40 ` Christoph Hellwig
2020-03-10 15:30   ` He Zhe
2020-03-10 16:26     ` Christoph Hellwig
2020-03-11  4:03       ` He Zhe [this message]
2020-03-11 15:54         ` Christoph Hellwig
2020-03-16 11:01           ` He Zhe
2020-03-16 11:37             ` Christoph Hellwig
2020-03-17  8:50               ` He Zhe
2020-03-17 12:42                 ` Christoph Hellwig
2020-03-18  6:33                   ` He Zhe
2020-03-11 10:29 ` Martin Wilck
2020-03-11 15:11   ` Martin Wilck
2020-03-16 11:02     ` He Zhe
2020-03-16 11:17       ` Martin Wilck
2020-03-17  8:51         ` He Zhe

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=f48683d9-7854-ba5f-da3a-7ef987a539b8@windriver.com \
    --to=zhe.he@windriver.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=hch@lst.de \
    --cc=jack@suse.cz \
    --cc=keith.busch@intel.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mwilck@suse.com \
    --cc=tglx@linutronix.de \
    --cc=viro@zeniv.linux.org.uk \
    --cc=yuyufen@huawei.com \
    --subject='Re: disk revalidation updates and OOM' \
    /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

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