From owner-freebsd-hackers Fri Mar 2 8:57: 7 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from homer.softweyr.com (bsdconspiracy.net [208.187.122.220]) by hub.freebsd.org (Postfix) with ESMTP id B281D37B71B for ; Fri, 2 Mar 2001 08:57:04 -0800 (PST) (envelope-from wes@softweyr.com) Received: from [127.0.0.1] (helo=softweyr.com ident=Fools trust ident!) by homer.softweyr.com with esmtp (Exim 3.16 #1) id 14Yt21-0000AK-00; Fri, 02 Mar 2001 10:07:53 -0700 Message-ID: <3A9FD369.D6A84FC8@softweyr.com> Date: Fri, 02 Mar 2001 10:07:53 -0700 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Anton Berezin Cc: Dag-Erling Smorgrav , Peter Dufault , hackers@FreeBSD.ORG Subject: Re: how to actually find out whether data hit the disk? References: <200102281418.f1SEILG28001@hda.hda.com> <20010302143149.D55912@heechee.tobez.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Anton Berezin wrote: > > On Fri, Mar 02, 2001 at 01:59:34PM +0100, Dag-Erling Smorgrav wrote: > > Peter Dufault writes: > > > > > Do an msync with MS_SYNC someplace. Also, use MAP_NOSYNC in > > > > > mmap until 4.3 when Matt Dillon plans to make that the default behavior. > > > > Ahh, no. That's the other way around - I do not *want* it to hit the > > > > disk, but would like to *know* when it nevertheless does. > > > OK, doing a stat and checking the mtime should give you > > > the info at the expense of polling, I can't think of another way. > > > > Won't help. You'll get the same mtime no matter whether the file is > > actually written to disk or not. > > That's what I suspected. :-( > > So is there a way, or is not? Even if the system tells you the data has been flushed to the drive, you don't know that the data has been flushed from the buffers on the drive to the platters unless you specifically tell the drive to sync the buffers. -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://softweyr.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message