Re: [PATCH] Use of getblk differs between locations
From: Anton Altaparmakov
Date: Wed Oct 12 2005 - 16:35:54 EST
On Wed, 12 Oct 2005, Mikulas Patocka wrote:
> > > But discarding data sometimes on USB unplug is even worse than discarding
> > > data
> > > always --- users will by experimenting learn that linux doesn't discard
> > > write-cached data and reminds them to replug the device --- and one day,
> > > randomly, they lose their data because of some memory management
> > > condition...
> > And how exactly is that worse than discarding the data every time?!?!?!?
> Undeterministic behaviour is worse than deterministic. You can learn the
> system that behaves deterministically.
> If you know that unplug damages filesystem on your USB disk, you replug it,
> recheck filesystem and copy the important data again --- you have 0%
> probability of data damage.
> However, if damage on unplug happens only with 1/100 probability, will you
> still check filesystem and copy all recently created files on it? You forget
> it (or you wouldn't even know that damage might occur) and you have 1%
> probability of data damage.
So display a warning that data may be lost (or may already have been
lost), just like Windows does.
Also, your probabilities are ridiculous. You are not telling me that
there is a 1% probability of OOM every time I unplud a usb device?!? I
have used Linux for almost 10 years now and I have only ever have seen
OOMs once when I had a bad memory leak. To me that counts under
"practically never happens" so I don't care too much about that case. I
would rather see it working correctly in majority of cases. Getting
everything right is _impossible_. You cannot designd a sane system with
sane performance that cannot OOM. And when that happens applications will
get killed so you will loose all your data anyway. So who cares that
some data on the usb stick may then be lost?
And anyway you are completely wrong/unknowledgeable about usb sticks and
what filesystems are used on them if you think that "nothing is lost" at
present since user just knows to do an fsck! At the moment whenever I get
a usb stick unplugged without properly "sync, umount, sync several times",
I usually find that the fs on it is 100% destroyed the moment I try to use
it on one of the "other" OS... Fsck, ha! Total data loss everytime for
me! And I would much rather have it just work on replugging every time
except in the < 0.000000000000000000000000000001% chance of OOM than
_never_ as it is now.
Think practical, not theoretical. Theory is all nice except that it never
meets with practice. Just ask Linus what he thinks of
Specifications which are another form of Theoretically Correct entity...
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/
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/