puffs_suspend(3) - NetBSD Manual Pages

Command: Section: Arch: Collection:  
PUFFS_SUSPEND(3)        NetBSD Library Functions Manual       PUFFS_SUSPEND(3)


NAME
puffs_suspend -- puffs file system suspension and snapshotting
LIBRARY
puffs Convenience Library (libpuffs, -lpuffs)
SYNOPSIS
#include <puffs.h> int puffs_fs_suspend(struct puffs_usermount *pu);
DESCRIPTION
The function puffs_fs_suspend() requests the kernel to suspend operations to the file system indicated by pu. There are several possible outcomes: nothing, an error or success. These will be indicated through the call- back of the same name. The file system must set this callback if it wants to be notified of file system suspension. The interface call itself returns 0 on success or -1 on error and sets errno. In case an error is returned, the callback will never be called. However, the con- verse does not hold and the callback may never be called even if the library call is successful. In case the kernel is successful to start suspending the file system, the callback is called with status PUFFS_SUSPEND START. The file system implementation may use this as a hint on how to handle following opera- tions. Once the file system has successfully been suspended, the status PUFFS_SUSPEND_SUSPENDED will be delivered. In case there was an error while suspending, PUFFS_SUSPEND_ERROR is given. This effectively nulli- fies any PUFFS_SUSPEND_START given earlier. Operation will automatically resume after suspension and the status PUFFS_SUSPEND_RESUME is delivered to the callback. Error or success is always provided in case start is given. The file system is supposed to do a file system specific snapshotting routine when it receives PUFFS_SUSPEND_SUSPENDED.
SEE ALSO
puffs(3), puffs_cc(3)
BUGS
Currently the implementation works only for single-threaded file systems which do not use puffs_cc. File system data and metadata are not always totally correctly synchro- nized at suspend. NetBSD 5.1 January 27, 2007 NetBSD 5.1
Powered by man-cgi (2024-03-20). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.