In article <[EMAIL PROTECTED]> 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.. > >Other than reading a few GB of data, is there a way to flush >out the cache copy of a file I've written?
You can flush the file to disk with fsync(). But I don't think that evicts the blocks from the cache, just forces them to be written. To the disk controller's cache, if you're lucky. >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? What are you hoping to accomplish? There are probably other ways to solve the larger problem. -- 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... _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"