From: Jo-Philipp Wich Date: Sun, 5 Jan 2020 16:21:25 +0000 (+0100) Subject: block: re-discover mtd devices on extroot mount retry X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=823faa0f3edb93fac528bc35588cea81f0a77146;p=project%2Ffstools.git block: re-discover mtd devices on extroot mount retry When retrying extroot mounting after waiting for the underlying device to appear, the internal device cache was rebuilt without mtd devices, leading to the following error: block: extroot: unable to lookup root device /dev/... The extroot mount procedure needs access to the actual mtd root device to temporarily mount it for uuid file verification. Fix this error by rebuilding the cache with mtd devices to allow the `check_extroot()` procedure to find the internal root device. Fixes: FS#2701 Fixes: fb0700f ("block: support hierarchical mount/umount") Signed-off-by: Jo-Philipp Wich --- diff --git a/block.c b/block.c index b6d49a8..50d877f 100644 --- a/block.c +++ b/block.c @@ -1543,7 +1543,7 @@ static int mount_extroot(char *cfg) ULOG_INFO("extroot: device not present, retrying in %u seconds\n", delay_root); sleep(delay_root); make_devs(); - cache_load(0); + cache_load(1); dev = find_block_device(m->uuid, m->label, m->device); } if (dev) {