[lkml]   [2005]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Why is one sync() not enough?
Nico Schottelius <> wrote:
> Hello again!
> When my system shuts down and init calls sync() and after that
> umount and then reboot, the filesystem is left in an unclean state.
> If I do sync() two times (one before umount, one after umount) it
> seems to work.

That's a bug.

The standards say that sync() is supposed to "start" I/O, or something
similarly vague and waffly. The Linux implementation of sync() has always
started all I/O and then waited upon all of it before returning from

And umount() itself will sync everything to disk, so the additional sync()
calls should be unnecessary.

That being said, if umount was leaving dirty filesystems then about 1000000
people would be complaining. So there's something unusual about your
What filesystem? What kernel version? Any unusual bind mounts, loopback
mounts, etc? There must be something there...
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-06-15 06:54    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean