[oe] [PATCH] udev/mount.sh: try to kill active processes before umount

Phil Blundell philb at gnu.org
Tue Jun 22 20:54:25 UTC 2010


On Tue, 2010-06-22 at 14:01 +0200, Steffen Sledz wrote:
> mount.sh is called with REMOVE action when the device *is
> disconnected* i.e. the filesystem is no longer available.
> So i believe it is not possible to "cleanup all references
> to the filesystem as soon as it is not busy anymore".
> 
> I think killing all the processes is the only way here.

I don't think that's necessarily true.  Any process that is holding a
file open on the removed device will get an I/O error the next time it
tries to access that filesystem.  Obviously, whether or not it handles
that error correctly is open to question, but increasingly many apps do
get it right and it seems a bit sad to kill them all off just in case
one doesn't do the right thing.

In the worst case, an app that chronically ignores I/O errors will just
keep the file descriptor open forever (or until it exits normally).
That doesn't sound like such an awful outcome.

p.






More information about the Openembedded-devel mailing list