gfsadd Kernel Service

Purpose

Adds a file system type to the gfs table.

Syntax

#include <sys/types.h> #include <sys/errno.h> int gfsadd ( gfsno, gfsp) int gfsno; struct gfs *gfsp;

Parameters

Item Description
gfsno Specifies the file system number. This small integer value is either defined in the /usr/include/sys/vmount.h file or a user-defined number of the same order.
gfsp Points to the file system description structure.

Description

The gfsadd kernel service is used during configuration of a file system. The configuration routine for a file system invokes the gfsadd kernel service with a gfs structure. This structure describes the file system type.

The gfs structure type is defined in the /usr/include/sys/gfs.h file. The gfs structure must have the following fields filled in:

Field Description
gfs_type Specifies the integer type value. The predefined types are listed in the /usr/include/sys/vmount.h file.
gfs_name Specifies the character string name of the file system. The maximum length of this field is 16 bytes. Shorter names must be null-padded.
gfs_flags Specifies the flags that define the capabilities of the file system. The following flag values are defined:
GFS_AHAFS_INFO
GFS supports AHAFS FS monitoring.
GFS_AIX_FLOCK
Uses common_reclock() to manage advisory locks.
GFS_DIROP
Call parent vnop instead of obj.
GFS_FASTPATH
GFS supports AIO fast path.
GFS_FUMNT
File system supports forced unmount.
GFS_INIT
GFS has been initialized
GFS_MEMCNTL
New memcntl vnode operation
GFS_MLS
GFS supports MLS.
GFS_NAMED_OPEN
File system supports named open.
GFS_NO_ACCT
Do not do file system account on this file system.
GFS_NOEXPORT
GFS cannot be exported by NFS.
GFS_NOUMASK
File system does not apply umask when creating new objects.
GFS_OFLAGS64
GFS supports 64 bit open flags.
GFS_REMNT
File system supports remount of a mounted file system.
 
GFS_REMOTE
File system is remote (ie. NFS).
GFS_STATFSVP
File system supports vfs_statfsvp VFS interface. (new vfs operation: vfs_statfsvp)
GFS_SYS5DIR
File system that uses the System V-type directory structure.
GFS_SYNCVFS
The syncvfs vnode operation.
GFS_VERSION4
File system supports AIX® Version 4 V-node interface.
GFS_VERSION42
File system supports AIX 4.2 V-node interface. (new vnode operation: vnop_seek)
GFS_VERSION421
File system supports AIX 4.2.1 V-node interface.(new vnode operations: vnop_sync_range, vnop_create_attr, vnop_finfo, vnop_map_lloff, vnop_readdir_eofp, vnop_rdwr_attr)
GFS_VERSION43
File system supports AIX 4.3 V-node interface. (new file flag for vnop_sync_range:FMSYNC)
GFS_VERSION53
File system supports AIX 5.3 V-node interface (new vnode operations: vnop_getxacl, vnop_setxacl) and AIX 5.3 VFS interface. (new vfs operation: vfs_aclxcntl)
GFS_VREGSEL
GFS wants to select vnode operation called for VREG files.
gfs_ops Specifies the array of pointers to vfs operation implementations.
gn_ops Specifies the array of pointers to v-node operation implementations.

The file system description structure can also specify:

Item Description
gfs_init Points to an initialization routine to be called by the gfsadd kernel service. This field must be null if no initialization routine is to be called.
gfs_data Points to file system private data.

Execution Environment

The gfsadd kernel service can be called from the process environment only.

Return Values

Item Description
0 Indicates successful completion.
EBUSY Indicates that the file system type has already been installed.
EINVAL Indicates that the gfsno value is larger than the system-defined maximum. The system-defined maximum is indicated in the /usr/include/sys/vmount.h file.