Re: Why is one sync() not enough?

From: Andrew Morton
Date: Wed Jun 15 2005 - 14:42:21 EST


Nico Schottelius <nico-kernel@xxxxxxxxxxxxxxx> wrote:
>
> Hello Andrew,
>
> you wrote:
> > What filesystem?
>
> jfs

It would be useful to test with a different filesystem (ext3 mounted with
data=writeback is close to equivalent). That'll help us identify the bug.

> > What kernel version?
>
> 2.6.11.11
>
> > Any unusual bind mounts, loopback
> > mounts, etc? There must be something there...>
>
> Yes, dm-crypt-mounted-jfs.

Again, if you can temporarily eliminate dm-crypt as well it will help
narrow it down.

> So if I understood everything correctly, a simple umount() without
> a sync() before should be enough?

Yes.

> If so, I'll try that, I am happy about every less function call
> I need to do.

OK. sync()+umount() shouldn't take any longer than a bare umount() (which
has to do a sync too). Unless you have multiple disks, in which case
there's no point in syncing the disks which aren't being umounted. But
then, I have a feeling that standard util-linux umount(8) does a global
sync anyway.

-
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/