udisks and eSATA: a question about the meaning of "detachable"

David Zeuthen zeuthen at gmail.com
Tue Jul 12 12:57:53 PDT 2011


Hi,

On Tue, Jul 12, 2011 at 3:27 PM, Phillip Susi <psusi at cfl.rr.com> wrote:
> On 7/12/2011 11:47 AM, David Zeuthen wrote:
>>
>> Btw, this is how Nautilus and the GTK+ file chooser already work: if
>> you click the volume icon and the device is not mounted, then we mount
>> it (normally takes<  0.1s) and then you get to see its contents. The
>> only difference, really, is a) that you don't see an eject icon next
>> to the volume; and b) we don't look for directories like /DCIM and
>> prompt "woot, would you like to import cat photos". So I'd argue that
>> GNOME is already doing the right thing here.
>
> That's exactly the kind of thing a desktop distribution wants to avoid.
>  Users expect to see "woot, would you like to import cat photos" when they
> plug in that flash drive.

As I've already explained GNOME does this for devices connected via
USB/Firewire (99% of all flash readers) or for devices specifically
tagged as being flash readers (covering flash readers connected via
SDIO). So it's fine, GNOME is doing the right thing here for 99.9% of
all users.

> I guess a desktop distribution probably doesn't
> care much about the rather contrived case of a workstation attached to a SAS
> SAN and not wanting to auto mount every new disk that shows up, so it
> probably is fine to auto mount any unknown fs that shows up after the user
> is logged in.

You would think so, sure. But as I already explained, this is not the
case - people use GNOME everywhere even on servers and people don't
tend to install the right variant of the distro. We just can't
automount the world willy-nilly, sorry.

And, here's the thing, we _don't_ need to automount the world that
because the current limited whitelist consisting of USB/Firewire/Flash
is already working fine for 99.9% of all users. And when it's not
working, the user can now tweak it himself using UDISKS_AUTOMOUNT_HINT
(if he even cares). If it's for a popular kind of device we can even
ship that udev rule with upstream udisks.

Btw, your socalled "desktop distribution" can just set
UDISKS_AUTOMOUNT_HINT=always for every device if they so desire - it's
a simple udev rule. But I wouldn't recommend doing this.

> My point is that you don't really want to do it based on the bus or
> interface being used, or try to guess at a concept of whether it is "system
> internal" or not.

As a rule of thumb, sure, it's never good to rely on heuristics,
connection bus types, protocol types and whitelists. But it's just not
that black/white and if data-loss can happen, as it can and _will_ if
you just blindly automount filesystems, I'd rather err on the side of
not losing data.

    David


More information about the devkit-devel mailing list