use /proc/self/mountinfo and handle a device being mounted in multiple places
This is an effort to fix
https://bugzilla.redhat.com/show_bug.cgi?id=491924
Basically we have to somehow cope with a device being mounted in
multiple places. So we replace the property
String device-mount-path
with an array of mount paths
String device-mount-paths[]
We also try to make an effort to ensure that the shortest mount point
is shown before others. E.g. if you bind mount / on /foo then
device-mount-paths = ["/", "/foo"]
This means that desktop clients can just take the first mount path.
Also make a note that this is the mount point in the root
namespace. On systems clients running in other namespaces care has to
be taken; in this case the client probably needs to examine
/proc/self/mountinfo on his own to determine if a given block device
is mounted or not.
Also drop support for the 'remount' option; we might add it back later
but since we now support multiple mount points it makes everything a
bit weird.
12 files changed: