[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 1

vfs_search Kernel Service

Purpose

Searches the vfs list.

Syntax

int vfs_search (vfs_srchfcn, srchargs)
(int (*vfs_srchfcn)(struct vfs *caddr_t);
caddr_t srchargs;

Parameters

vfs_srchfcn Points to a search function. The search function is identified by the vfs_srchfcn parameter. This function is used to examine or modify an entry in the vfs list. The search function is called once for each currently active VFS. If the search function returns a value of 0, iteration through the vfs list continues to the next entry. If the return value is nonzero, vfs_search kernel service returns to its caller, passing back the return value from the search function.
When the system invokes this function, the system passes it a pointer to a virtual file system (VFS) and the srchargs parameter.
srchargs Points to data to be used by the serach function. This pointer is not used by the vfs_search kernel service but is passed to the search function.

Description

The vfs_search kernel service searches the vfs list. This kernel service allows a process outside the file system to search the vfs list. The vfs_search kernel service locks out all activity in the vfs list during a search. Then, the kernel service iterates through the vfs list and calls the search function on each entry.

The search function must not request locks that could result in deadlock. In particular, any attempt to do lock operations on the vfs list or on other VFS structures could produce deadlock.

The performance of the vfs_search kernel service may not be acceptable for functions requiring quick response. Iterating through the vfs list and making an indirect function call for each structure is inherently slow.

Execution Environment

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

Return Values

This kernel service returns the value returned by the last call to the search function.

Implementation Specifics

This kernel service is part of Base Operating System (BOS) Runtime.

Related Information

List of Virtual File System Operations.


[ Previous | Next | Contents | Home | Search ]