Bug#396215: comments on not skipping devices

Neil Moore neil at s-z.org
Thu Jan 15 20:49:11 UTC 2009


It seems that, if the device-skipping code is omitted (as in the
second patch above), there are still some situations that could
lead to duplicate entries:

 1. Have a LABEL=, UUID=, or symlink fstab entry that refers to a
    non-existent disk.

 There is now an entry with a non-existent device

 2. Plug in the device and mount it.

 Now there is a /proc/mounts entry referring to the real device.
 The fstab entry is not re-scanned, so gnome-vfs does not know
 that the two entries refers to the same device, and shows them
 both.

To work around the problem, you can touch /etc/fstab , causing
a re-scan.

One fix would be to re-scan fstab whenever a new mount point appears.
I thought adding a call to update_fstab_drives(volume_monitor) in
mtab_changed in gnome-vfs-volume-monitor-daemon.c would do this, but
it appears it is not so simple: _gnome_vfs_get_unix_mount_table
stat()s fstab to make sure it has actually changed.  Suggestions are
welcome on how to force the rescan without complicating the code too
much.

Another possible fix might be to do the LABEL= to UUID= resolution,
and the symlink chasing, in the _gnome_vfs_unix_mount_compare
function; but I'm not sure what side effects doing so might have.

-- 
Neil Moore, neil at s-z.org, http://s-z.org/neil/






More information about the pkg-gnome-maintainers mailing list