sync - commit buffer cache to disk.
sync first commits inodes to buffers, and then buffers to
sync always returns 0.
SVr4, SVID, X/OPEN, BSD 4.3
According to the standard specification (e.g., SVID), sync()
schedules the writes, but may return before the actual writ-
ing is done. However, since version 1.3.20 Linux does actu-
ally wait. (This still does not guarantee data integrity:
modern disks have large caches.)
bdflush(2), fsync(2), fdatasync(2),