Hal and fuse filesystem support

Florent Mertens flomertens at gmail.com
Thu Oct 5 19:13:06 PDT 2006


I'm actually trying your change, and i encounter a little problem
when unmounting an usb device.
I set hal to use ntfs-3g instead of ntfs by default, and i tried to plug
an usb NTFS device. With a patched pmount which add ntfs-3g support, 
mounting comes without a itch and i had read/write access. So i copy a
large file and all seams to work.
The problem came when unmounting. I used the eject button of nautilus,
unmouting seams to work, but when i replug it to check how it worked, 
i had the bad surprise to see that the file was corrupted.
I first thought that it was a driver problem (even if i never encounter
any problem with it), but when i retry the same things and unmount by
CLI (with pumount) instead of the eject button, it worked great.
A lots of test confirm me that, it seams that there is a bad interaction
when using the eject button, that stop the transfer of the file before
the end, leaving it corrupted.
I check the output of hal when unmounting an ntfs & an fat32 (the same
one but format in fat32) USB drive with the eject button, and it seams
that there is a little difference. With the fat32, hal receive first
00:31:22.229 [I] osspec.c:232: SEQNUM=2473, ACTION=umount,
SUBSYSTEM=block, DEVPATH=/sys/block/sda/sda1, DEVNAME=, IFINDEX=0, but
not with ntfs (all the output is attach).

What do you think could cause this problem ?

Le mercredi 04 octobre 2006 à 10:43 -0700, Dan Nicholson a écrit :
> On 10/4/06, David Zeuthen <david at fubar.dk> wrote:
> >
> > Think this was fixed with this commit
> 
> Cool. I tried using the ntfs-fuse gnome-vfs module a few weeks back
> with hal-0.5.7 and thought it was broken.
> 
> > as you can see, but we need to pass the right mount options so it's
> > readable by the user - do you know what mount options are good to pass
> > so the user can read/write to the NTFS partition?
> >
> > Please let me know so I can add the right bits to the hal property
> > volume.mount.valid_options, cf.
> >
> >  http://gitweb.freedesktop.org/?p=hal.git;a=blob;hb=HEAD;f=fdi/policy/10osvendor/20-storage-methods.fdi
> 
> I'm not sure what the safest options to pass are, but it seems that
> the charset settings need to be allowed for ntfs in general. For the
> ntfs driver, this appears to be nls= or the deprecated iocharset=.
> 
> http://kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;hb=HEAD;f=Documentation/filesystems/ntfs.txt
> 
> For ntfs-fuse, the setting is locale=.
> 
> http://man.linux-ntfs.org/ntfsmount.8.html
> 
> For both, fmask and dmask would be nice. I don't know about the write
> permissions.
> 
> --
> Dan
-------------- next part --------------
Output of "hald --daemon=no --verbose=yes" when clicking eject with a fat32 device :
====================================================================================

00:31:22.229 [I] osspec.c:232: SEQNUM=2473, ACTION=umount, SUBSYSTEM=block, DEVPATH=/sys/block/sda/sda1, DEVNAME=, IFINDEX=0
9186: 00:31:23.782: addon-storage.c:426: Media removal detected on /dev/sda
00:31:23.788 [I] hald_dbus.c:2134: entering, local_interface=1
00:31:23.788 [D] hald_dbus.c:2143: udi=/org/freedesktop/Hal/devices/storage_serial_CBM2080_Flash_Disk
00:31:23.788 [I] blockdev.c:1217: Entering, udi=/org/freedesktop/Hal/devices/storage_serial_CBM2080_Flash_Disk
Run started hald-probe-storage (10000) (0) 
!  full path is '/usr/lib/hal/hald-probe-storage', program_dir is '/usr/lib/hal'
9243: 00:31:23.793: probe-storage.c:163: Doing probe-storage for /dev/sda (bus usb) (drive_type disk) (udi=/org/freedesktop/Hal/devices/storage_serial_CBM2080_Flash_Disk) (--only-check-for-fs==1)
9243: 00:31:23.795: probe-storage.c:368: Checking for file system on /dev/sda
9243: 00:31:23.795: probe-storage.c:374: Doing open ("/dev/sda", O_RDONLY)
00:31:23.795 [I] hald_dbus.c:3195: 8403: Got a connection
00:31:23.795 [I] hald_dbus.c:3196: dbus_connection_get_is_connected = 1
00:31:23.800 [I] osspec.c:232: SEQNUM=2474, ACTION=remove, SUBSYSTEM=block, DEVPATH=/sys/block/sda/sda1, DEVNAME=/dev/sda1, IFINDEX=0
00:31:23.800 [I] hotplug.c:160: /sys/block/sda/sda1 is a block device (store)
00:31:23.800 [I] blockdev.c:1050: block_rem: sysfs_path=/sys/block/sda/sda1 is_part=1
00:31:23.800 [I] blockdev.c:155: Remove callouts completed udi=/org/freedesktop/Hal/devices/volume_part1_size_254951424
00:31:23.800 [I] hald.c:99: Removed device from GDL; udi=/org/freedesktop/Hal/devices/volume_part1_size_254951424
9243: 00:31:23.865: probe-storage.c:377: Cannot open /dev/sda: No medium found
00:31:23.865 [I] hald_dbus.c:3173: Client to local_server was disconnected
00:31:23.865 [I] hald_dbus.c:3183: unregistered
/usr/lib/hal/hald-probe-storage exited
00:31:23.865 [I] blockdev.c:1175: hald-probe-storage --only-check-for-media returned 0 (exit_type=0)

Output of "hald --daemon=no --verbose=yes" when clicking eject with an ntfs device :
====================================================================================

8701: 00:27:01.339: addon-storage.c:426: Media removal detected on /dev/sda
00:27:01.342 [I] hald_dbus.c:2134: entering, local_interface=1
00:27:01.342 [D] hald_dbus.c:2143: udi=/org/freedesktop/Hal/devices/storage_serial_CBM2080_Flash_Disk
00:27:01.342 [I] blockdev.c:1217: Entering, udi=/org/freedesktop/Hal/devices/storage_serial_CBM2080_Flash_Disk
Run started hald-probe-storage (10000) (0) 
!  full path is '/usr/lib/hal/hald-probe-storage', program_dir is '/usr/lib/hal'
00:27:01.349 [I] hald_dbus.c:3195: 8403: Got a connection
00:27:01.349 [I] hald_dbus.c:3196: dbus_connection_get_is_connected = 1
8793: 00:27:01.350: probe-storage.c:163: Doing probe-storage for /dev/sda (bus usb) (drive_type disk) (udi=/org/freedesktop/Hal/devices/storage_serial_CBM2080_Flash_Disk) (--only-check-for-fs==1)
8793: 00:27:01.350: probe-storage.c:368: Checking for file system on /dev/sda
8793: 00:27:01.350: probe-storage.c:374: Doing open ("/dev/sda", O_RDONLY)
00:27:01.351 [I] osspec.c:232: SEQNUM=2399, ACTION=remove, SUBSYSTEM=block, DEVPATH=/sys/block/sda/sda1, DEVNAME=/dev/sda1, IFINDEX=0
00:27:01.351 [I] hotplug.c:160: /sys/block/sda/sda1 is a block device (store)
00:27:01.351 [I] blockdev.c:1050: block_rem: sysfs_path=/sys/block/sda/sda1 is_part=1
00:27:01.351 [I] blockdev.c:155: Remove callouts completed udi=/org/freedesktop/Hal/devices/volume_uuid_3B38120B65547D69
00:27:01.351 [I] hald.c:99: Removed device from GDL; udi=/org/freedesktop/Hal/devices/volume_uuid_3B38120B65547D69
8793: 00:27:01.413: probe-storage.c:377: Cannot open /dev/sda: No medium found
00:27:01.413 [I] hald_dbus.c:3173: Client to local_server was disconnected
00:27:01.413 [I] hald_dbus.c:3183: unregistered
/usr/lib/hal/hald-probe-storage exited
00:27:01.414 [I] blockdev.c:1175: hald-probe-storage --only-check-for-media returned 0 (exit_type=0)
0



More information about the hal mailing list