From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 21 13:37:51 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5786516A4CE for ; Wed, 21 Apr 2004 13:37:51 -0700 (PDT) Received: from wattres.Watt.COM (wattres.watt.com [66.93.133.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3916243D60 for ; Wed, 21 Apr 2004 13:37:51 -0700 (PDT) (envelope-from steve@Watt.COM) Received: (from steve@localhost) by wattres.Watt.COM (8.12.11/8.12.11) id i3LKbnpT069214; Wed, 21 Apr 2004 13:37:49 -0700 (PDT) (envelope-from steve) Message-Id: <200404212037.i3LKbnpT069214@wattres.Watt.COM> From: steve@Watt.COM (Steve Watt) Date: Wed, 21 Apr 2004 13:37:49 -0700 In-Reply-To: Julian Elischer "Re: how to flush out cache.?" (Apr 21, 13:28) X-Mailer: Mail User's Shell (7.2.6 beta(5) jp(8) 11/23/00) To: Julian Elischer cc: hackers@freebsd.org Subject: Re: how to flush out cache.? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2004 20:37:51 -0000 On Apr 21, 13:28, Julian Elischer wrote: } Subject: Re: how to flush out cache.? } } On Wed, 21 Apr 2004, Steve Watt wrote: } } > In article you write: } > > } > >Ok so I have an application where I need to } > >reread a file I have just written to ensure that it went to disk } > >correctly.. } > } > What are you hoping to accomplish? There are probably other ways } > to solve the larger problem. } } I thought I was being clear.. } I need to remove all the pages from cache so that a reread of the file } is forced to go to disk. } and I don't want to go read a 2GB dummy file to force the flush.. No, my question is "what are you trying to accomplish with the reread", at a higher level than "I want to know it's on disk". Is there some reason you have for not trusting the hardware? Are you trying to do a database commit protocol? Debugging the storage system? } Someone suggested that I read the file usign 'dump' through the raw } device.. Even doing that doesn't necessarily mean the bits have made it onto the rotating media. There can also be caches in the disk controller, and/or caches on the drive itself. If you're trying for a case where you want to pull the power, unmounting and remounting the filesystem will get it about as close as you can. -- Steve Watt KD6GGD PP-ASEL-IA ICBM: 121W 56' 57.8" / 37N 20' 14.9" Internet: steve @ Watt.COM Whois: SW32 Free time? There's no such thing. It just comes in varying prices...