Date: Tue, 26 Oct 2010 17:14:18 -0700 From: Garrett Cooper <gcooper@FreeBSD.org> To: Alexander Best <arundel@freebsd.org> Cc: Bruce Cran <bruce@cran.org.uk>, freebsd-hackers@freebsd.org Subject: Re: fsync(2) manual and hdd write caching Message-ID: <AANLkTikMMB2JgSporrQA315JiB2%2BNNBysXNiao16ohs=@mail.gmail.com> In-Reply-To: <20101026234036.GA17347@freebsd.org> References: <20101026213618.GA3013@freebsd.org> <20101027003229.00002b91@unknown> <20101026234036.GA17347@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Oct 26, 2010 at 4:40 PM, Alexander Best <arundel@freebsd.org> wrote= : > On Wed Oct 27 10, Bruce Cran wrote: >> On Tue, 26 Oct 2010 21:36:18 +0000 >> Alexander Best <arundel@freebsd.org> wrote: >> >> > since there's a thread on freebsd-questions@ concerning fsync(2) and >> > the fact that hdd write caching can cause this syscall to basically >> > be a no op, could somebody please copy the BUGS section from sync(2) >> > to fsync(2)? >> >> Shouldn't the BUGS section of sync(2) be removed? >> >> "The sync() system call may return before the buffers are completely >> =A0 =A0 =A0flushed." >> >> But from >> http://www.opengroup.org/onlinepubs/009695399/functions/sync.html : >> >> "The writing, although scheduled, is not necessarily complete upon >> return from sync()." >> >> That would suggest it's not actually a bug. > > well...you are right on the one hand. but still this should be documented= imo. > how about turning BUGS into a CAVEATS section and then adding that sectio= n to > fsync(2)? > > the reason posix mentions this sync/fsync behavior is probably the fact t= hat > they know that this cannot be avoided. so that statement seems itself to = be a > caveat rather than a feature. ;) Just a sidenote, but that's POSIX 2004[.6?] spec, not POSIX 2008.1 (which is the most current spec -- http://www.unix.org/2008edition/ ). I double checked and the wording didn't differ for the fsync(2) system interface, but it could differ in others. HTH, -Garrett
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikMMB2JgSporrQA315JiB2%2BNNBysXNiao16ohs=>