From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 26 23:40:36 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 8F31F106566C; Tue, 26 Oct 2010 23:40:36 +0000 (UTC) Date: Tue, 26 Oct 2010 23:40:36 +0000 From: Alexander Best To: Bruce Cran Message-ID: <20101026234036.GA17347@freebsd.org> References: <20101026213618.GA3013@freebsd.org> <20101027003229.00002b91@unknown> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101027003229.00002b91@unknown> Cc: freebsd-hackers@freebsd.org Subject: Re: fsync(2) manual and hdd write caching X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Oct 2010 23:40:36 -0000 On Wed Oct 27 10, Bruce Cran wrote: > On Tue, 26 Oct 2010 21:36:18 +0000 > Alexander Best 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 > flushed." > > 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 section to fsync(2)? the reason posix mentions this sync/fsync behavior is probably the fact that they know that this cannot be avoided. so that statement seems itself to be a caveat rather than a feature. ;) cheers. alex > > -- > Bruce Cran -- a13x