On Mon, Jan 19, 2015 at 11:23 AM, Wei, Catherine <catherine....@arris.com> wrote:
> Thank you for your answer very much. But I have removed the disk from > my set-up box, the data will be saved in memory and the system doesn't > know there's no disk, it will still call fsync. What do you think in > this case? > man fsync says: SYNOPSIS #include <unistd.h> int fsync(int fd); int fdatasync(int fd); DESCRIPTION fsync() transfers ("flushes") all modified in-core data of (i.e., modified buffer cache pages for) the file referred to by the file descriptor fd to the disk device (or other permanent storage device) ... i.e. if you have no disk (you are using an in-memory VFS), then you have no file descriptor, so fsync/datasync _cannot_ be (legally) called. -- ----- stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users