Table of Contents
gfs_sync - force data to be written to disk.
#include <gfs.h>
int gfs_sync_fork(int fork_id);
int gfs_sync_subfile(int file_id, intsubfile);
int gfs_sync_disk();
The gfs_sync calls ensure that modified data is actually
written to disk rather than being hidden in a server's
buffer cache. gfs_sync_fork syncs the data for a single
fork, gfs_sync_subfile syncs the data for all the forks in a
subfile, and gfs_sync_disk syncs all the data in all the
servers. This last call is not suitable for a production
system, but can be useful in an experimental environment.
The gfs_sync calls return 0 on success, or -1 on an error.
GFS_EINVAL
file_id is not a valid file_id, fork_id is not a
valid fork_id, or subfile is not a valid subfile.
GFS_EIO Something went wrong at one of the servers. This
should not happen. If it does, remain calm and do
not think of the Sta-Puft Marshmallow Man.
Table of Contents