block: support hierarchical mount/umount
authorYousong Zhou <yszhou4tech@gmail.com>
Tue, 29 Oct 2019 12:39:47 +0000 (12:39 +0000)
committerJohn Crispin <john@phrozen.org>
Sat, 2 Nov 2019 18:22:23 +0000 (19:22 +0100)
commitfb0700f0fdfc4bec220203d31df87be2b4ccc467
treea7c73a1ac349a2bc1114d56e319dd1b972555922
parent1212b5b94454e6805e1104e740b8cd0c71c34941
block: support hierarchical mount/umount

This is needed when e.g. sda1 needs to be mounted to /mnt and sda2
/mnt/srv.  We need to make sure sda1 was mounted first.

"devices" is now an ordered list with elements pointing to both "struct
probe_info" and "struct mount".  The order is firstly on presence of
mount info, then strlen(mount.target), then strcmp(probe_info.dev)

Resolves FS#2214

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
block.c