block: re-discover mtd devices on extroot mount retry
authorJo-Philipp Wich <jo@mein.io>
Sun, 5 Jan 2020 16:21:25 +0000 (17:21 +0100)
committerJo-Philipp Wich <jo@mein.io>
Sun, 5 Jan 2020 16:41:25 +0000 (17:41 +0100)
commit823faa0f3edb93fac528bc35588cea81f0a77146
treed0ff137b6a1787a98d7513b46ee58a596451bc30
parentb4e25d54035c5092e8e9b46ab63500e95ac8c730
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 <jo@mein.io>
block.c