From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 21 14:38:27 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 AC92B16A4CE for ; Wed, 21 Apr 2004 14:38:27 -0700 (PDT) Received: from mxsf23.cluster1.charter.net (mxsf23.cluster1.charter.net [209.225.28.223]) by mx1.FreeBSD.org (Postfix) with ESMTP id 17D7043D1F for ; Wed, 21 Apr 2004 14:38:27 -0700 (PDT) (envelope-from ups@tree.com) Received: from stups.com ([209.187.143.11])i3LLLx52018233; Wed, 21 Apr 2004 17:21:59 -0400 (EDT) Received: from tree.com (localhost [127.0.0.1]) by stups.com (8.9.3/8.9.3) with ESMTP id RAA14907; Wed, 21 Apr 2004 17:21:58 -0400 Message-Id: <200404212121.RAA14907@stups.com> X-Mailer: exmh version 2.0.2 To: Julian Elischer In-Reply-To: Message from Julian Elischer Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 21 Apr 2004 17:21:58 -0400 From: Stephan Uphoff 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 21:38:27 -0000 mmap() and msync(..MS_INVALIDATE..) should work. Stephan > > 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) > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >