Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: usb flash drive removal (Re: Desktop NetBSD needs your help)



On Mon, Feb 09, 2009 at 09:04:55PM +0000, Michael van Elst wrote:
> lacombar%gmail.com@localhost (Arnaud Lacombe) writes:
> 
> >> No, you're wrong.  You CAN ensure, with a reasonably high degree of 
> >> certainty,
> >> that the device is the same as the old one.
> >Sorry to say that, but if it's not 100% of certainty you won't go far.
> 
> It actually works fine on those systems that use this method.
> 
> 
> >in the mean time, I took a picture with my camera/got a phone call,
> >the file-system on the device changed, you replug-it, things are not
> >as they used to be... and boom!
> 
> And boom, suddenly there is new or changed data in the filesystem.
> Just like it could happen on a network filesystem.

Boom, the problem is unexpected metadata.  Any disk file system
goes south lightspeed if there isn't a match between on-media and
in-memory metadata.  Network fail systems aren't a valid comparison,
since their protocols are at a completely different logical level
than on-disk file systems.

Generally speaking, I would consider it extremely unwise to add
code to attempt to recover a mount for a device which was forcibly
unplugged.

And of course you never want to mount untrusted file systems using
a kernel file server, but everyone knows that by now.


Home | Main Index | Thread Index | Old Index