Re: panic after removing usb flash drive

From: Eric Anderson <anderson_at_centtech.com>
Date: Wed, 31 Aug 2005 08:13:36 -0500
Daniel O'Connor wrote:
> On Wednesday 31 August 2005 22:19, Eric Anderson wrote:
> 
>>>Although last time I saw this discussed I came away with the impression
>>>that it wasn't possible for the kernel to do this..? (without substantial
>>>work anyway)
>>
>>Why not just use the automounter to mount/umount this for you?  This
>>probably won't get around umounting while in use, but you might be able
>>to tell amd to use a umount -f on it.
> 
> 
> I would have thought you'd still get a panic anyway..?
> The VM will try and flush the dirty pages when you umount and consequently 
> panic.

My thinking was that amd would auto-unmount the filesystem when it isn't 
being used, and if the timeout is set low (I think the default is 5 
minutes), then once done using the flash, it would have time to umount 
before it was unplugged.  Now that I think about it though, if he is 
using it (and open files), it won't even attempt to unmount it anyhow.

This is where I think it would be great to have a sort of 'flashfs' - 
something like a UFS2 filesystem, but read only until a write happens, 
and all writes would be synchronous, and after the write occurs, the fs 
goes back to a 'read only' state.  Maybe this could be done with 
gjournal or even unionfs - mount the usb flash read only, do all writes 
to a memory backed disk, and then flush the writes out to the usb flash 
periodically.  Not perfect, but maybe this will stir some ideas up.

Eric



-- 
------------------------------------------------------------------------
Eric Anderson        Sr. Systems Administrator        Centaur Technology
Anything that works is better than anything that doesn't.
------------------------------------------------------------------------
Received on Wed Aug 31 2005 - 11:13:23 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:42 UTC