*I&Berkeley DB: memp_fsync[P

memp_fsync





#include <db.h>

intmemp_fsync(DB_MPOOLFILE *mpf);





Description



<The memp_fsync function writes all pages associated with the:DB_MPOOLFILE structure, that were marked as modified usingˇmemp_fput or memp_fset, back to the source file.DIf any of the modified pages are also pinned (i.e., currentlyCreferenced by this or another process) memp_fsync will ignore them.

The memp_fsyncDfunction returns the value of errno on failure, 0 on success,Cand DB_INCOMPLETE if there were pages which were modified but whichmemp_fsync was unable to write.



Errors

SIf a fatal error occurs in Berkeley DB, the memp_fsync function may fail and returnFDB_RUNRECOVERY, at which point all subsequent database calls will alsoreturn DB_RUNRECOVERY.

The memp_fsync)function may fail and return errnoKfor any of the errors specified for the following Berkeley DB and C library functions:DBmemp->pgin(3),DBmemp->pgout(3), abort(3), close(3),dbenv->db_paniccall(3), fcntl(3), fflush(3), fprintf(3),free(3), fsync(3), getenv(3), getpid(3), getuid(3), isdigit(3),9log_compare,5log_flush, lseek(3), malloc(3), memcpy(3), memset(3),open(3), pread(3), pwrite(3), qsort(3),read(3), realloc(3),sigfillset(3),sigprocmask(3),stat(3), strerror(3), strlen(3), unlink(3), vfprintf(3), vsnprintf(3),and write(3).



See Also

8memp_close,=memp_fclose,9memp_fget,;memp_fopen,9memp_fput,9memp_fset, memp_fsync,6memp_open,Amemp_register,6memp_stat,6memp_stat,6memp_sync,;memp_trickleand:memp_unlink.
˙˙