Bug 49842 - Unhandled rootfs on bind mount
Summary: Unhandled rootfs on bind mount
Status: RESOLVED FIXED
Alias: None
Product: udisks
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: David Zeuthen (not reading bugmail)
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-12 09:17 UTC by Daniel Drake
Modified: 2012-05-15 07:24 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
gvfs-mount -li (1.50 KB, text/plain)
2012-05-12 09:17 UTC, Daniel Drake
Details
udisksctl dump (19.63 KB, text/plain)
2012-05-12 09:19 UTC, Daniel Drake
Details
/proc/self/mountinfo (3.13 KB, text/plain)
2012-05-12 09:19 UTC, Daniel Drake
Details
new dump (18.27 KB, text/plain)
2012-05-14 14:16 UTC, Daniel Drake
Details

Description Daniel Drake 2012-05-12 09:17:55 UTC
Created attachment 61504 [details]
gvfs-mount -li

OLPC run / on a bind-mount for reasons described in http://lists.freedesktop.org/archives/devkit-devel/2012-May/001267.html

udisks_mount_monitor_get_mountinfo() seems to ignore such mounts:

      /* ignore mounts where only a subtree of a filesystem is mounted */
      if (g_strcmp0 (encoded_root, "/") != 0)
        continue;

This means that when we boot, we get the partition containing the root fs mounted as a user partition at /run/media/users/olpc/OLPCRoot. As its confusing for users we'd like to get rid of this.

Can udisks be made to understand this fs layout a little better?
Comment 1 Daniel Drake 2012-05-12 09:19:27 UTC
Created attachment 61505 [details]
udisksctl dump
Comment 2 Daniel Drake 2012-05-12 09:19:58 UTC
Created attachment 61506 [details]
/proc/self/mountinfo
Comment 3 Daniel Drake 2012-05-12 09:23:45 UTC
Version info:

Fedora 17 running on OLPC XO-1.75 (same problem seen on XO-1.5).

libatasmart-0.18-2.fc17.armv7hl
udisks2-1.94.0-1.fc17.armv7hl
gvfs-1.12.2-1.fc17.armv7hl
Comment 4 David Zeuthen (not reading bugmail) 2012-05-12 15:15:52 UTC
First of all, I'm guessing the mount /run/media/olpc/OLPCRoot is done by some gvfs-using automounter exactly because MountsPoints is empty, right? (ie. if we fix the bug this shouldn't happen)

I wonder what we _should_ be showing in MountPoints... there are two possibilities, ["/", "/home", "/versions"] or just ["/"] ... seems the former is more correct (for some values of correct) but the latter is fine too ... I think the latter (just "/") can be achieved by just removing the lines you quoted, e.g.

      /* ignore mounts where only a subtree of a filesystem is mounted */
      if (g_strcmp0 (encoded_root, "/") != 0)
        continue;

Any chance you can try this?
Comment 5 Daniel Drake 2012-05-14 14:16:27 UTC
Created attachment 61654 [details]
new dump

Yes, OLPCRoot is auto-mounted by Nautilus in the above dumps.

I removed the lines suggested and it solves the problem. The device appears with mountpoints which look reasonable, and Nautilus doesn't automount it in a strange place.
Comment 6 David Zeuthen (not reading bugmail) 2012-05-15 07:24:28 UTC
OK, I've removed those two lines - thanks for the bug report and testing!

http://cgit.freedesktop.org/udisks/commit/?id=e0b8ffe3099735fefd64973e6575c67ac0759be2


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.