Re: [2.6.9-rc4] USB && mass-storage && disconnect broken semantics

From: Oliver Neukum
Date: Tue Oct 12 2004 - 05:35:32 EST



> With *nix, most data only gets written at unmount, so the only way this
> can "sanely" work is for mounts you haven't written to. That case is of

This is not a law of nature. You can mount sync as well. That, of course,
sucks in terms of performance and wear. A reasonable compromise
would be to do sync on close.
Supermount did this years ago.

> course not currently handled very well, but writing would be damn near
> impossible to unmount well. In order to keep the device consistent, the
> only thing you can do is wait for the user to reinsert the device and
> then clear your caches. However they might have modified the storage in

You cannot. That's giving mlock() to everybody.

[..]
> Automated mounting with special fixed names can already be done, this
> has little to do with forced dismounting. Use something like udev for
> this part.

Exactly.

[..]
> All I ever expect the kernel to eventually support is forced dismount of
> devices that haven't been written to. I think from there its up to

Devices break. You have to cope with devices going away suddenly.
You are not required to ensure data integrity in all cases, but the system
must not suffer. To allow that you must be able to get rid of the mounts
even if users do not cooperate.

Regards
Oliver
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/