blockdev mount detection

William Jon McCann mccannwj at pha.jhu.edu
Tue Oct 11 07:20:54 PDT 2005


Hi,

I've been trying to debug why gnome-vfs/nautilus is not detecting CD/DVD 
mounts correctly for me when using gnome-volume-manager to automount 
discs.  It seems like there is a race between the sysfs mount detection 
and when it is available to getmntent_r via /proc/mounts.  So the effect 
is that blockdev.c:update_mount_point() doesn't find the mount entry and 
doesn't update the "volume.mount_point" property.  I have appended the 
debug output (I've added another HAL_INFO inside the while loop of 
update_mount_point).

To test this, I added a sleep to the beginning of update_mount_point and 
it was then able to find the mount entry.

What do you think?

Thanks,
Jon

10:16:44.141 [I] osspec.c:243: total_read=17 buf='mount@/block/hdc'
10:16:44.141 [I] blockdev.c:223: mount_status_changed for 
'/sys/block/hdc', is_mounted=1
10:16:44.141 [I] blockdev.c:237: Applies to 
/org/freedesktop/Hal/devices/volume_label_Fedora_Core
10:16:44.141 [I] blockdev.c:182: Update mount point for 
/org/freedesktop/Hal/devices/volume_label_Fedora_Core (device_file /dev/hdc)
10:16:44.141 [I] blockdev.c:195: looking for (major,minor): (22,0) in (0,0)
10:16:44.141 [I] blockdev.c:195: looking for (major,minor): (22,0) in (8,2)
10:16:44.141 [I] blockdev.c:195: looking for (major,minor): (22,0) in (0,0)
10:16:44.141 [I] blockdev.c:195: looking for (major,minor): (22,0) in (0,0)
10:16:44.141 [I] blockdev.c:195: looking for (major,minor): (22,0) in (0,0)
10:16:44.141 [I] blockdev.c:195: looking for (major,minor): (22,0) in (8,1)
10:16:44.141 [I] blockdev.c:195: looking for (major,minor): (22,0) in (0,0)
10:16:44.141 [I] blockdev.c:211: Clearing mount point for /dev/hdc


More information about the hal mailing list