gnome-vfs2- is confused by mount -o bind entries

Bug #93050 reported by didier on 2007-03-17
Affects Status Importance Assigned to Milestone
gnome-vfs2 (Ubuntu)

Bug Description

How to reproduce it:
from a terminal within gnome

if /dev and /home are one the same partition the trash count is wrong and:

$ gnomevfs-df

/ xxx MB (604188672)
/dev/.static/dev xxx MB (604188672)
$ sudo mount -o bind / /mnt/foo
$ gnomevfs-df
/ xxx MB (604188672)
/mnt/foo xxx MB (604188672)

Debian patch 08_uuid_mount.patch should do the test for symlink and realpath call before the test for duplicate entries in libgnomevfs/gnome-vfs-unix-mounts.c _gnome_vfs_get_current_unix_mounts()

Sebastien Bacher (seb128) wrote :

Thank you for your bug. What number do you expect when running df? The patch is there to not list duplicate mounts, why do you think it's wrong?

Changed in gnome-vfs2:
assignee: nobody → desktop-bugs
importance: Undecided → Low


from the comment in _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.
                 * The '/' is to handle procfs, tmpfs and other no device mounts.
So I'm expecting gnomevfs-df returning only one line.
$ sudo mount -o bind / /mnt/foo
$ gnomevfs-df
/ xxx MB (604188672)
/mnt/foo xxx MB (604188672)

/mnt/foo is a duplicate and shouldn't be there.

At least the trash applet is expecting the same. (the tooltips count is wrong when /home and / are on the same partition because the mount bind on /dev/.static/dev ).

The test is always false with 08_uuid_mount.patch applied when the device path is a symlink (volume mounted by uuid) because it's comparing symlinks with realpath.

I will attached a modified 08_uuid_mount.patch.

A new patch because a modified 08_uuid_mount has conflicts with 13_resolve_fstab_symlinks.patch

Changed in gnome-vfs2:
status: Unconfirmed → Confirmed
Sebastien Bacher (seb128) wrote :

unsubscribing the sponsor team, gnomevfs is deprecated and the bug didn't get an update for years that will not change now

Changed in gnome-vfs2 (Ubuntu):
assignee: Ubuntu Desktop Bugs (desktop-bugs) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers