Comment 37 for bug 34247

Revision history for this message
Robert Lange (rcl24) wrote :

I have found some more information, although I don't really have time now to do more.

In the file gnome-vfs-unix-mounts.c there are several different possibilities based on what type of unix you have and how it stores mount information. In particular for Ubuntu the HAVE_MNTENT_H ifdef is used, so the code looks in the file /proc/mounts. The code grabs the first entry for each mountpoint and uses its listed filesystem, even if that isn't the correct listing. This is the comment in the function _gnome_vfs_get_current_unix_mounts:

-----

ignore any mnt_fsname that is repeated and begins with a '/'

We do this to avoid being fooled by --bind mounts, since these have the same device as the location they bind to. Its not an ideal solution to the problem, but its likely that the most important mountpoint is first and the --bind ones after that aren't as important. So it should work.

-----

In this case, the first mount point listing for / has the 'rootfs' filesystem type listed, whereas the second listing has the correct 'ext3' filesystem type. As an experiment, I introduced some code to ignore any entry with a filesystem type of 'rootfs' but this didn't work correctly either.

At this point I won't have time to work on this for a while, but I felt like I should document what I had found here so when I get some time, I can pick up where I left off, or someone else can.