Re: Why is one sync() not enough?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nico Schottelius <[email protected]> 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
sync().

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
setup.

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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux