On Jul 28, 2020, at 12:06 AM, Dave Horsfall
<dave(a)horsfall.org> wrote:
On Mon, 27 Jul 2020, Warner Losh wrote:
I've done some research for a friend about
when the reboot() system call was added, and how it related to the sync, sync, sync dance.
https://bsdimp.blogspot.com/2020/07/when-unix-learned-to-reboot2.html
may be of interest. Please do let me know if I've gotten something wrong...
Seems OK to me; I was taught never to use "sync; sync; sync" for precisely
those reasons (the buffers may not have time to flush etc, as "sync" merely
schedules the I/O, not cause it.
This was summarized at MIT’s Project Athena in the mid-80s as:
When thou shuttest down the system, thou shalt sync three times. No more, no less. Three
shall be the number of the syncing, and the number of the syncing shall be three. Four
times shalt thou not sync, neither sync twice, except that thou proceedest to sync a third
time. Five is right out.
- Win