udisks2: Improve bind mount handling
@oholy
Submitted by Ondrej Holy Assigned to gvf..@..e.bugs
Link to original bug (#794154)
Description
There is no way to detect bind mounts over UDisks2/GLib APIs currently if mount point (i.e. fstab entry) doesn't exists. However, we can improve handling of bind mounts with existing mount points. If device path of the correspoing mount point resides on another mount, it is supposedly a bind mount and it can be joined with corresponding fstab volume, not with udisks volume. New APIs for UDisks2/GLib are needed in order to fix this also for mounts without fstab entries...
So for the following fstab:
/dev/sda1 / ext4 defaults 1 1 /mnt/foo /foo none bind,x-gvfs-show 0 0
Output from "gio mount -l" will be:
Drive(0): drive Type: GProxyDrive (GProxyVolumeMonitorUDisks2) Volume(1): foo Type: GProxyVolume (GProxyVolumeMonitorUDisks2) Mount(0): foo -> file:///mnt/foo Type: GProxyMount (GProxyVolumeMonitorUDisks2)
Instead of the current:
Drive(0): drive Type: GProxyDrive (GProxyVolumeMonitorUDisks2) Volume(0): root Type: GProxyVolume (GProxyVolumeMonitorUDisks2) Mount(0): root -> file:///mnt/foo Type: GProxyMount (GProxyVolumeMonitorUDisks2) Volume(1): foo Type: GProxyVolume (GProxyVolumeMonitorUDisks2)