Hi!

I'm helping port a utility [1] to program the EyeFi card [2] and I seem
to be running into problems properly manipulating the configuration.

The card is programmed by writing encoded commands to certain hidden
files on the card, and reading the coded responses back from other
files. Since the card modifies the data in these files independently of
the host operating system, there is a need to avoid all caching (read
and write) whenever interacting with the card's interface. fsync(2)
works for eliminating write caching, so that's no issue.

While the Linux port of the software successfully accomplishes avoiding
read caching by utilizing posix_fadvise and POSIX_FADV_DONTNEED to clear
the caches for a particular file, the same does not appear to function
on FreeBSD. I have also tried using msync with MS_INVALIDATE, but this
doesn't appear to work either.

Is there an official (or at least consistent) API for discarding a
file's cached read data, so that it may be fetched afresh from the
backing store?

Thanks!

[1] http://git.cyberleo.net/eyefi-config.git
[2] http://www.eye.fi/

-- 
Fuzzy love,
-CyberLeo
Technical Administrator
CyberLeo.Net Webhosting
http://www.CyberLeo.Net
<cyber...@cyberleo.net>

Furry Peace! - http://wwww.fur.com/peace/
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to