From: Christoph Hellwig <hch@lst.de>
To: "Michal Koutný" <mkoutny@suse.com>
Cc: Christoph Hellwig <hch@lst.de>, Qian Cai <cai@lca.pw>,
Jens Axboe <axboe@kernel.dk>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
linux-block@vger.kernel.org, linux-s390@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: s390 boot woe due to "block: fix busy device checking in blk_drop_partitions"
Date: Mon, 27 Apr 2020 18:10:16 +0200 [thread overview]
Message-ID: <20200427161016.GA9719@lst.de> (raw)
In-Reply-To: <20200423110738.GA102241@blackbook>
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;
}
prev parent reply other threads:[~2020-04-27 16:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-09 23:33 s390 boot woe due to "block: fix busy device checking in blk_drop_partitions" Qian Cai
2020-04-10 5:45 ` Christoph Hellwig
2020-04-10 12:20 ` Qian Cai
2020-04-23 11:07 ` Michal Koutný
2020-04-27 16:10 ` Christoph Hellwig [this message]
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=20200427161016.GA9719@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=borntraeger@de.ibm.com \
--cc=cai@lca.pw \
--cc=gor@linux.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mkoutny@suse.com \
/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.