Date: Mon, 19 Oct 1998 07:05:13 +1000 From: Peter Jeremy <peter.jeremy@auss2.alcatel.com.au> To: hackers@FreeBSD.ORG Subject: Re: softupdates and sync Message-ID: <98Oct19.070445est.40346@border.alcanet.com.au>
next in thread | raw e-mail | index | archive | help
On Sat, 17 Oct 1998 15:56:17 -0600, Warner Losh <imp@village.org> wrote: >I guess I'm not making myself clear. Why doesn't sync(1) flush these >things to disk? sync(8) just calls sync(2). sync(2) just starts the buffer flush - it does not wait for the flush to complete. This has always been true and is the origin of the `type sync 3 times before halting system' mantra. > Flush the dirty buffers to disk? sync(2) requests that all dirty buffers get flushed, it just doesn't wait for the flush to complete. > It shouldn't take an unmount to do that... Unfortunately, the only way you can guarantee that all dirty buffers have been flushed is to unmount the partition. Note that fsync(2) does allow you to synchronously flush all the buffers associated with an open FD. For most purposes, this is adequate. I don't know whether 3.x includes a system call which synchronously flushes the entire buffer cache. Peter -- Peter Jeremy (VK2PJ) peter.jeremy@alcatel.com.au Alcatel Australia Limited 41 Mandible St Phone: +61 2 9690 5019 ALEXANDRIA NSW 2015 Fax: +61 2 9690 5247 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?98Oct19.070445est.40346>