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)



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.

>There is billion reasons for a device
>to alter its file-system while it is supposedly doing nothing. In the
>best case, we crash, in the worst case, we corrupt the remote
>file-system.

There is no need to crash and, if you play by the rules, you won't
corrupt anything. If you do not play by the rules then you might
lose data in transit, probably violating fsync() semantics or the
like.

>Not speaking that you'll need to keep track of every
>possible unique ID that can exist, good luck.

You need to keep track of those unique IDs that belong to filesystems
that you have mounted now and that are busy.

-- 
-- 
                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."


Home | Main Index | Thread Index | Old Index