Hal and fuse filesystem support

David Zeuthen david at fubar.dk
Fri Oct 6 08:41:43 PDT 2006


Hi Martin!

On Fri, 2006-10-06 at 15:53 +0200, Martin Pitt wrote:
> Nice, but that's limited to a subset of music players only. Why it's
> such a bad thing to power off other devices, too?

So, the eject SCSI command is pretty device specific. What makes you
think it actually powers off the device? 

Btw, if we want to power of devices when the user presses some UI button
(which is different from the user running 'pumount /dev/sda1' or
'gnome-umount -d /dev/sda1') we should export methods in HAL to actually
selectively suspend the device. Sadly, the Linux kernel don't export an
useful interface for this yet... but people are working on it.

> >  1. mask the problem - e.g. by ejecting everything, which is wrong, we
> >     miss valuable bug reports on what to actually eject; and
> 
> As I already explained, this particular problem does not happen in the
> default configuration; we do not eject all devices (like NTFS volumes
> on your hard disk or fuse mounts), only removable ones.

My point was really that we want know that "Acme Music Player XYZ" needs
to have the storage.requires_eject quirk set via a HAL fdi file. This
information is lost if you just brutally eject everything without paying
attention to the quirk HAL gives you. That's my major complaint.

> >  2. fundamentally changes how Ubuntu works compared to other
> >     distributions - e.g. unmounting a device makes all the partitions go
> >     away (that's the semantics of eject) 
> 
> Indeed we had complaints that in order to remove an USB hard disk you
> had to unmount all partitions instead of just 'removing the device' in
> the UI. Ejecting does exactly this as a side-effect, that's another
> reason why we do that (i. e. we consider that a feature, not a bug).

So I think this needs to be fixed in gnome-vfs so gnome-vfs unmounts all
partitions. I'll write a patch for this for the next GNOME release.

> > and this will break partitioning tools that use e.g. gnome-vfs to
> > unmount the device.
> 
> We currently do not support any partitioning tool that does that. Once
> we do, we have to think about it again, of course.

Yup, sounds good, I'm actually working on one if you hadn't noticed

 http://people.freedesktop.org/~david/gdu-6.png

> >     Pretty sure it's weird for users too. Users should except to be able
> >     to mount a device after they've unmounted it. They can't do this if
> >     you eject the device because the partitions go away.
> 
> (1) That works fine with my USB stick and USB hard disk. However,
>     that's not the case on all types of hardware, sometimes the
>     devices indeed disappear and are not mountable any more.

Examples?

> (2) It's not the most common use case to unmount a removable disk and
>     to immediately mount it again. Usually you unmount it because you
>     want to remove it.

Yup. It will become an issue sooner or later though. 

> Thank you, and have a nice weekend,

Thanks, you too.

    David




More information about the hal mailing list