[ 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:

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 ]