[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]
Technical Reference: Kernel and Subsystems, Volume 1
syncvfs Kernel Service
Purpose
Updates a filesystem.
Syntax
#include <fscntl.h>
int syncvfs (vfsName, command)
char *vfsName;
int command;
Description
The syncvfs kernel service behaves in 3 different
manners depending on the granularity specified. In each case the GFS_SYNCVFS flag is checked and VFS_SYNCVFS or VFS_SYNC is called on the GFS and/or VFS specified. In each
case the the command parameter is passed untouched.
The cases are:
- If a NULL pointer is passed through the vfsName parameter,
the FS_SYNCVFS_ALL level is assumed, and the call loops
through each GFS in a similar manner to the sync call.
- If FS_SYNCVFS_FSTYPE is passed, the GFS is scanned
and the names compared. The GFS with the correct name (if one exists) is called
with its own GFS pointer and a null VFS pointer.
- If FS_SYNCVFS_FS is passed, the mount point is looked
up and, if it exists, VFS_SYNCVFS is called with the
GFS pointer and the VFS pointer of the filesystem found.
Parameters
vfsName |
Depending on the value of the command parameter, this can either be NULL, the name of a filesystem type (for
example, "jfs", "j2") or the name of a filesystem, specified by mount point
(for example, "/testj2"). |
command |
Command is the mask of two options, a level and a granularity.
The granularity can be one of:
- FS_SYNCVFS_ALL
- sync every filesystem
- FS_SYNCVFS_FSTYPE
- sync every filesystem of VFS type corresponding to vfsName
- FS_SYNCVFS_FS
- sync specific filesystem at vfsName
The level can be one of:
- FS_SYNCVFS_TRY
- daemon heurstics
- FS_SYNCVFS_FORCE
- user requested sync
- FS_SYNCVFS_QUIESCE
- full filesystem quiesce
|
Return Values
Upon successful completion, the syncvfs kernel service
returns 0. If unsuccessful, -1 is returned and the errno global variable is set.
Related Information
[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]