4 ms·
Interesting. http://linux.die.net/man/2/sync http://linux.die.net/man/2/sync says On Linux, sync is guaranteed only to schedule the dirty blocks for Ac
by jabiko 13y ago
Interesting. http://linux.die.net/man/2/sync http://linux.die.net/man/2/sync says
On Linux, sync is guaranteed only to schedule the dirty blocks for
According to the standard specification (e.g., POSIX.1-2001), sync()
schedules the writes, but may return before the actual writing is done.
However, since version 1.3.20 Linux does actually wait. (This still
does not guarantee data integrity: modern disks have large caches.)
So it seems like the sleep(2) is there to give the disk enough time to write the cache data.
- igravious 13y agoPity no-one thought to comment this little piece of reboot/halt magic - 'twould have saved a bit of digging.