All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Ciger <jan.ciger@epfl.ch>
To: Samuel Maftoul <maftoul@esrf.fr>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: umounting
Date: Tue, 22 Jan 2002 15:52:07 +0100	[thread overview]
Message-ID: <m16T2IB-02103HC@ligsg2.epfl.ch> (raw)
In-Reply-To: <20020122150703.B13509@pcmaftoul.esrf.fr>
In-Reply-To: <20020122150703.B13509@pcmaftoul.esrf.fr>

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

  reply	other threads:[~2002-01-22 14:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-22 14:07 umounting Samuel Maftoul
2002-01-22 14:52 ` Jan Ciger [this message]
2002-01-22 19:01   ` umounting Oliver Neukum
2002-01-22 19:46     ` umounting Jan Ciger
2002-01-23  8:06     ` umounting Samuel Maftoul
2002-01-23 21:42       ` umounting Oliver Neukum
2002-01-23 23:52         ` umounting Samuel Maftoul
2002-01-24  9:22           ` umounting Xavier Bestel
2002-01-22 22:10   ` umounting Horst von Brand
2002-01-23 10:33     ` umounting Jan Ciger
2002-01-23 10:40       ` umounting Horst von Brand
2002-01-23 11:01         ` umounting Jan Ciger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m16T2IB-02103HC@ligsg2.epfl.ch \
    --to=jan.ciger@epfl.ch \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maftoul@esrf.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.