From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 21 12:23:25 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 98A5D16A4CE for ; Wed, 21 Apr 2004 12:23:25 -0700 (PDT) Received: from sccrmhc12.comcast.net (sccrmhc12.comcast.net [204.127.202.56]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE84943D45 for ; Wed, 21 Apr 2004 12:23:24 -0700 (PDT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org ([24.7.73.28]) by comcast.net (sccrmhc12) with ESMTP id <2004042119232301200p0lm9e>; Wed, 21 Apr 2004 19:23:23 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id MAA32919 for ; Wed, 21 Apr 2004 12:23:22 -0700 (PDT) Date: Wed, 21 Apr 2004 12:23:20 -0700 (PDT) From: Julian Elischer To: hackers@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: 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 19:23:25 -0000 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.. Other than reading a few GB of data, is there a way to flush out the cache copy of a file I've written? possibilities include: a file flag saying "don't keep a copy after it's written to disk"? a syscall discard_cached_blocks(fd); ? any other suggestions? julian (BTW this would be for 4.x initially)