Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

p2k(3) [netbsd man page]

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

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

Check Out this Related Man Page

RUMP_EFS(8)						    BSD System Manager's Manual 					       RUMP_EFS(8)

rump_efs -- mount a efs image with a userspace server SYNOPSIS
file-system PUFFS pseudo-device putter rump_efs [options] image mountpoint DESCRIPTION
NOTE! This manual page describes features specific to the rump(3) file server. Please see mount_efs(8) for a full description of the avail- able command line options. The rump_efs utility can be used to mount efs file systems. It uses rump(3) and p2k(3) to facilitate running the file system as a server in userspace. As opposed to mount_efs(8), rump_efs does not use file system code within the kernel and therefore does not require kernel sup- port except puffs(4). Apart from a minor speed penalty there is no downside with respect to in-kernel code. rump_efs does not require using vnconfig(8) for mounts from regular files and the file path can be passed directly as the image parameter. In fact, the use of vnconfig(8) is discouraged, since it is unable to properly deal with images on sparse files. In case the image contains multiple partitions, the desired partition must be indicated by appending the token ``%DISKLABEL:p%'' to the image path. The letter ``p'' specifies the partition as obtained via disklabel(8). For example, to mount partition ``e'' from image /tmp/wd0.img, use ``/tmp/wd0.img%DISKLABEL:e%''. It is recommended that untrusted file system images be mounted with rump_efs instead of mount_efs(8). Corrupt file system images commonly cause the file system to crash the entire kernel, but with rump_efs only the userspace server process will dump core. To use rump_efs via mount(8), the flags -o rump and -t efs should be given. Similarly, rump_efs is used instead of mount_efs(8) if ``rump'' is added to the options field of fstab(5). SEE ALSO
p2k(3), puffs(3), rump(3), mount_efs(8) HISTORY
The rump_efs utility first appeared in NetBSD 5.0. BSD
November 21, 2010 BSD
Man Page