Messages in this thread | | | From | Jan Ciger <> | Subject | Re: umounting | Date | Tue, 22 Jan 2002 15:52:07 +0100 |
| |
On Tuesday 22 January 2002 15:07, Samuel Maftoul wrote: > If user 1 had an ext2 disk, when user 2 umounts the filesystem with his > disk plugged his filesystem got broken ( tested with ext2 and vfat). > If user 1 had a vfat disk, then user 2 can cleanly umount the disk > without breaking any filesystem.
In general, when you unmount a filesystem, the system caches and data relevant for that filesystem are flushed to the disk. So if the first one leaves withou unmounting his disk, he can even have a corrupted fs himself, because some data didn't make it to the drive yet, there are just in caches.
When a second user comes and unmounts a disk, then the data are flushed (the old data) and he gets a fs corruption, because the data were not from his disk.
It is just matter of luck and it depends a lot on the buffering approach chosen by the fs developers - ext2 tends to cache a lot of things to improve performance and the disk flushes are not that frequent. If you manage to plug your drive in a wrong moment, then you end up with a mess. You can easily test this problem with floppies.
So, the solution is - teach your users to unmount disks before leaving, or mount them in synchronous mode - but I am not sure, whether VFAT supports that and it is a performance hog too.
Jan - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |