Open bugreporter42 opened 6 years ago
Any suggestions for a possible solution? There are definitely many ways, but I'm not quite sure what would be a preferred one.Maybe put the bind mounts aside into a separate property?
Maybe put the bind mounts aside into a separate property?
I think that would be a nice solution, since it would automatically make Gnome and KDE (and other user software) pick the actual mount point.
One of the relevant gnome bug reports: https://bugzilla.gnome.org/show_bug.cgi?id=782814
We need definitely a way to distinguish the regular mount points from bind mounts. It would also be nice to have available bind mount roots...
This might actually be quite hard to implement -- it is not possible to check if a mountpoint is "normal" or "bind".
See this comment for more information: https://bugzilla.gnome.org/show_bug.cgi?id=782814#c30
The same problem is with btrfs subvolumes. Yes, we can't detect bind mounts, but we can find fs root e.g. over mnt_fs_get_root. It returns something else than "/" for bind mounts (which points to subdirectory - the problematic ones) and btrfs subvolumes...
Also, handling of multiple mountpoints itself is suboptimal, because you can't choose which mountpoint will be unmounted... and seems that just one of those is going to be unmounted if Unmount method is called.
The new kernel mount API might be of some help perhaps...
udisks doesn't seem to provide a way to figure out the mountpoint of block devices, since it only provides an alphabetically sorted list of mounts, which includes bind mounts. Both Gnome and KDE 5 don't work properly.
Both KDE 5 (Dolphin) and Gnome (gnome-disks) show 'test-disk' mounted under '/mnt/aaa' (they just pick the first reported mount point).
KDE bug report: https://bugs.kde.org/show_bug.cgi?id=349617