Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

puffs_flush(3) [netbsd man page]

PUFFS_FLUSH(3)						   BSD Library Functions Manual 					    PUFFS_FLUSH(3)

NAME
puffs_flush -- puffs kernel cache flushing and invalidation routines LIBRARY
puffs Convenience Library (libpuffs, -lpuffs) SYNOPSIS
#include <puffs.h> int puffs_inval_namecache_dir(struct puffs_usermount *pu, puffs_cookie_t cookie); int puffs_inval_namecache_all(struct puffs_usermount *pu); int puffs_inval_pagecache_node(struct puffs_usermount *pu, puffs_cookie_t cookie); int puffs_inval_pagecache_node_range(struct puffs_usermount *pu, puffs_cookie_t cookie, off_t start, off_t end); int puffs_flush_pagecache_node(struct puffs_usermount *pu, puffs_cookie_t cookie); int puffs_flush_pagecache_node_range(struct puffs_usermount *pu, puffs_cookie_t cookie, off_t start, off_t end); DESCRIPTION
These routines are used inform the kernel that any information it might have cached is no longer valid. puffs_inval_namecache_dir() invali- dates the name cache for a given directory. The argument cookie should describe an existing and valid directory cookie for the file system. Similarly, puffs_inval_namecache_all() invalidates the name cache for the entire file system (this routine might go away). The cached pages (file contents) for a regular file described by cookie are invalidated using puffs_inval_pagecache_node(). A specific range can be invalidated using puffs_inval_pagecache_node_range() for a platform specific page level granularity. The offset start will be truncated to a page boundary while end will be rounded up to the next page boundary. As a special case, specifying 0 as end will invalidate all contents from start to the end of the file. It is especially important to note that these routines will not only invalidate data in the "read cache", but also data in the "write back" cache (conceptually speaking; in reality they are the same cache), which has not yet been flushed to the file server. Therefore any unflushed data will be lost. The counterparts of the invalidation routines are the flushing routines puffs_flush_pagecache_node() and puffs_flush_pagecache_node_range(), which force unwritten data from the kernel page cache to be written. For the flush range version, the same range rules as with the invalida- tion routine apply. The data is flushed asynchronously, i.e. if the routine returns successfully, all the caller knows is that the data has been queued for writing. SEE ALSO
puffs(3) BSD
April 7, 2007 BSD

Check Out this Related Man Page

P2K(3)							   BSD Library Functions Manual 						    P2K(3)

NAME
p2k -- puffs to kernel vfs translation library LIBRARY
p2k Library (libp2k, -lp2k) SYNOPSIS
#include <rump/p2k.h> struct p2k_mount * p2k_init(uint32_t puffs_flags); void p2k_cancel(struct p2k_mount *p2m, int error); int p2k_setup_fs(struct p2k_mount *p2m, const char *vfsname, const char *devpath, const char *mountpath, int mntflags, void *arg, size_t alen); p2k_setup_diskfs(struct p2k_mount *p2m, const char *vfsname, const char *devpath, int partition, const char *mountpath, int mntflags, void *arg, size_t alen); int p2k_mainloop(struct p2k_mount *p2m); int p2k_run_fs(const char *vfsname, const char *devpath, const char *mountpath, int mntflags, void *arg, size_t alen, uint32_t puffs_flags); int p2k_run_diskfs(const char *vfsname, const char *devpath, int partition, const char *mountpath, int mntflags, void *arg, size_t alen, uint32_t puffs_flags); DESCRIPTION
The p2k library translates the puffs protocol to the kernel vfs(9) protocol and back again. It can therefore be used to mount and run kernel file system code as a userspace daemon. Calling the library interface function mounts the file system and, if succesful, starts handling requests. The parameters are handled by ukfs_mount() (see ukfs(3)), with the exception that mountpath and puffs_flags are handled by puffs(3). The "run_fs" variants of the inter- faces are provided as a convenience for the common case. They execute all of init, setup and mainloop in one call. ENVIRONMENT
The following environment variables affect the behaviour of p2k. They are useful mostly for debugging purposes. The flags are environment variables because typically the command line arguments to p2k utilities are parsed using versions not aware of p2k options; for example, the rump_cd9660(8) arguments are really parsed by mount_cd9660(8). P2K_DEBUG Do not detach from tty and print information about each puffs operation. In case the daemon receives SIGINFO (typically from ctrl-T), it dumps out the status of the mount point. Sending SIGUSR1 causes a dump of all the vnodes (verbose). P2K_NODETACH Do not detach from tty. P2K_NOCACHE_PAGE Do not use the puffs page cache. P2K_NOCACHE_NAME Do not use the puffs name cache. P2K_NOCACHE Do not use the puffs page or name cache. P2K_WIZARDUID If set, use the value of the variable to determine the UID of the caller of each operation instead of the actual caller supplied by puffs(3). This can be used for example to simplify modifying an OS installation's root image as a non-root user. SEE ALSO
puffs(3), rump(3), ukfs(3), rump_cd9660(8), rump_efs(8), rump_ext2fs(8), rump_ffs(8), rump_hfs(8), rump_lfs(8), rump_msdos(8), rump_nfs(8), rump_ntfs(8), rump_smbfs(8), rump_syspuffs(8), rump_sysvbfs(8), rump_tmpfs(8), rump_udf(8) BSD
January 7, 2011 BSD
Man Page