lkml.org 
[lkml]   [2005]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Why is one sync() not enough?
    Nico Schottelius <nico-kernel@schottelius.org> 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 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/

    \
     
     \ /
      Last update: 2005-06-15 06:54    [W:0.021 / U:0.672 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site