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

REFUSE(3)						   BSD Library Functions Manual 						 REFUSE(3)

NAME
refuse -- Re-implementation of a file system in userspace system LIBRARY
File System in Userspace Convenience Library (librefuse, -lrefuse) SYNOPSIS
#include <fuse.h> int fuse_main(int argc, char **argv, const struct fuse_operations *); int fuse_opt_add_arg(struct fuse_args *args, const char *arg); int fuse_opt_parse(struct fuse_args *args, void *userdata, const struct fuse_opt *descriptions, fuse_opt_proc_t processingfunc); int fuse_teardown(struct fuse *fuse, char *mountpoint); struct fuse * fuse_setup(int argc, char **argv, const struct fuse_operations *ops, size_t opssize, char **mountpoint, int *multithreaded, int *fd); int puffs_fuse_node_getattr(const char *path, struct stat *attrs); int puffs_fuse_node_readlink(const char *path, char *output, size_t outlen); int puffs_fuse_node_mknod(const char *path, mode_t permissions, dev_t devicenumber); int puffs_fuse_node_mkdir(const char *path, mode_t permissions); int puffs_fuse_unlink(const char *path); int puffs_fuse_node_rmdir(const char *path); int puffs_fuse_node_symlink(const char *path, const char *target); int puffs_fuse_node_rename(const char *from, const char *to); int puffs_fuse_node_link(const char *from, const char *to); int puffs_fuse_node_chmod(const char *path, mode_t permissions); int puffs_fuse_node_own(const char *path, uid_t owner, gid_t group); int puffs_fuse_node_truncate(const char *path, off_t newsize); int puffs_fuse_node_utime(const char *path, struct utimbuf *newtimes); int puffs_fuse_node_open(const char *path, struct fuse_file_info *fileinfo); int puffs_fuse_node_read(const char *path, char *buffer, size_t bufferlen, off_t startoffset, struct fuse_file_info *fileinfo); int puffs_fuse_node_write(const char *path, char *buffer, size_t bufferlen, off_t startoffset, struct fuse_file_info *fileinfo); int puffs_fuse_fs_statfs(const char *path, struct statvfs *vfsinfo); int puffs_fuse_node_flush(const char *path, struct fuse_file_info *fileinfo); int puffs_fuse_node_fsync(const char *path, int flags, struct fuse_file_info *fileinfo); int puffs_fuse_node_setxattr(const char *path, const char *attrname, const char *attrvalue, size_t attrsize, int flags); int puffs_fuse_node_getxattr(const char *path, const char *attrname, const char *attrvalue, size_t attrvaluesize); int puffs_fuse_node_listxattr(const char *path, const char *attrname, size_t attrvaluesize); int puffs_fuse_node_removexattr(const char *path, const char *attrname); int puffs_fuse_node_opendir(const char *path, struct fuse_file_info *fileinfo); int puffs_fuse_node_readdir(const char *path, void *data, fuse_fill_dir_t fillinfo, off_t offset, struct fuse_file_info *fileinfo); int puffs_fuse_node_releasedir(const char *path, struct fuse_file_info *fileinfo); int puffs_fuse_node_fsyncdir(const char *path, int flags, struct fuse_file_info *fileinfo); void * puffs_fuse_fs_init(struct fuse_conn_info *connectioninfo); void puffs_fuse_node_destroy(void *connection); int puffs_fuse_node_access(const char *path, int accesstype); int puffs_fuse_node_create(const char *path, mode_t permissions, struct fuse_file_info *fileinfo); int puffs_fuse_node_ftruncate(const char *path, off_t offset, struct fuse_file_info *fileinfo); int puffs_fuse_node_fgetattr(const char *path, struct stat *attrs, struct fuse_file_info *fileinfo); int puffs_fuse_node_lock(const char *path, struct fuse_file_info *fileinfo, int locktype, struct flock *lockinfo); int puffs_fuse_node_utimens(const char *path, const struct timespec *newtimes); int puffs_fuse_node_bmap(const char *path, size_t mapsize, uint64_t offset); DESCRIPTION
refuse is a reimplementation of the file system in user space subsystem. Operations are transported from the kernel virtual file system layer to the concrete implementation behind refuse, where they are processed and results are sent back to the kernel. It uses the framework provided by the puffs(3) subsystem, and, through that, the kernel interface provided by puffs(4). SEE ALSO
puffs(3), puffs(4) Antti Kantee and Alistair Crooks, "ReFUSE: Userspace FUSE Reimplementation Using puffs", EuroBSDCon 2007, September 2007. HISTORY
An unsupported experimental version of refuse first appeared in NetBSD 5.0. AUTHORS
Alistair Crooks <agc@NetBSD.org>, Antti Kantee <pooka@NetBSD.org> BUGS
Many, legion, but well-loved. BSD
April 30, 2007 BSD
Man Page