Date: Wed, 21 Apr 2004 13:47:43 -0700 (PDT) From: Julian Elischer <julian@elischer.org> To: Garance A Drosihn <drosih@rpi.edu> Cc: hackers@freebsd.org Subject: Re: how to flush out cache.? Message-ID: <Pine.BSF.4.21.0404211346500.31770-100000@InterJet.elischer.org> In-Reply-To: <p0602041cbcac8b3862c2@[128.113.24.47]>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 21 Apr 2004, Garance A Drosihn wrote: > At 12:23 PM -0700 4/21/04, Julian Elischer wrote: > >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) > > Hmm. That means you couldn't use a 'snapshot' to force the > issue, right? If you *could* use snapshots, you could close > the file, snapshot the partition, mount the snapshot, and > read the file from it's copy in the snapshot-filesystem. ingenious, but, no we can't do that.. As I mentionned.. someone suggested using 'dump' to extract the file from raw disk and checksumming that... :-) > > -- > Garance Alistair Drosehn = gad@gilead.netel.rpi.edu > Senior Systems Programmer or gad@freebsd.org > Rensselaer Polytechnic Institute or drosih@rpi.edu >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0404211346500.31770-100000>