[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200427161016.GA9719@lst.de>
Date: Mon, 27 Apr 2020 18:10:16 +0200
From: Christoph Hellwig <hch@....de>
To: Michal Koutný <mkoutny@...e.com>
Cc: Christoph Hellwig <hch@....de>, Qian Cai <cai@....pw>,
Jens Axboe <axboe@...nel.dk>,
Heiko Carstens <heiko.carstens@...ibm.com>,
Vasily Gorbik <gor@...ux.ibm.com>,
Christian Borntraeger <borntraeger@...ibm.com>,
linux-block@...r.kernel.org, linux-s390@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: s390 boot woe due to "block: fix busy device checking in
blk_drop_partitions"
Hi Michal,
can you try the patch below? That should solve the udev race for real
hopefully.
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index da693e6a834e5..20dbe4cf62cf9 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1318,6 +1318,9 @@ loop_set_status(struct loop_device *lo, const struct loop_info64 *info)
if (err)
goto out_unfreeze;
+ /* don't send uevents until we've finished the partition scan */
+ dev_set_uevent_suppress(disk_to_dev(lo->lo_disk), 1);
+
if (lo->lo_offset != info->lo_offset ||
lo->lo_sizelimit != info->lo_sizelimit) {
/* kill_bdev should have truncated all the pages */
@@ -1377,6 +1380,7 @@ loop_set_status(struct loop_device *lo, const struct loop_info64 *info)
if (partscan)
loop_reread_partitions(lo, bdev);
+ dev_set_uevent_suppress(disk_to_dev(lo->lo_disk), 0);
return err;
}
Powered by blists - more mailing lists