.\" $NetBSD: perfused.8,v 1.11 2012/01/29 11:32:23 wiz Exp $ .\" .\" Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd January 29, 2012 .Dt PERFUSED 8 .Os .Sh NAME .Nm perfused .Nd PUFFS Enabled Relay to FUSE Daemon .Sh SYNOPSIS .Nm .Op Fl fs .Op Fl d Ar types .Op Fl i fd .Sh DESCRIPTION .Nm is a userland daemon implementing the FUSE kernel level API. It creates a .Pa /dev/fuse socket for FUSE file system daemons to connect to. .Nm takes care of mounting the file system using .Xr puffs 3 . .Pp When the kernel sends a .Xr puffs 3 operation for the mounted file system, .Nm will translate it into a FUSE request, and will send it to the file system daemon through .Pa /dev/fuse . The FUSE reply will be converted back into a .Xr puffs 3 reply and will be relayed to the kernel. .Pp FUSE file system daemons must be modified so that they request .Nm to perform the .Xr mount 2 system call instead of doing it on their own. This is done by replacing .Xr mount 2 and the .Xr open 2 calls for .Pa /dev/fuse with .Fn perfuse_mount and .Fn perfuse_open , respectively, in their sources. .Xr libperfuse 3 must be used at link time. Most FUSE file system daemons use .Nm libfuse and will work unmodified, provided the modification is done in .Nm libfuse itself . .Pp The following options are available: .Bl -tag -width XdXtypesXX .It Fl d Ar types Print additional debug information. .Ar types is a comma-separated list of information types to print: .Bl -tag -width indent .It Ar puffs Display PUFFS requests and replies. .It Ar fuse Display FUSE requests and replies. .It Ar dump Dump content of FUSE frames. .It Ar fh Display file handle activity. .It Ar reclaim Display reclaim activity. .It Ar readdir Display readdir activity. .It Ar requeue Display requeue activity. .It Ar sync Display dirty flags and sync operations. .El .It Fl f Do not fork, but stay in the foreground. .It Fl i Ar fd Do not open .Pa /dev/fuse but use the socket available from the file descriptor .Ar fd . This is used when .Nm is started from .Xr libperfuse 3 . .It Fl s Enable debug output only when receiving .Li SIGINFO . .El .Sh SIGNALS .Bl -tag -width indent .It Dv SIGINFO If the .Fl s flag was used, toggle debug output. Do nothing otherwise. .It Dv SIGUSR1 Toggle FUSE operation dump on and off. When toggling off, the trace is is stored in .Pa /var/run/perfuse-xxx.trace (xxx is the filesystem mount point). .El .Sh ERRORS The program logs to the syslog daemon as facility .Dq daemon . For detailed debugging use the .Fl d (debug) option. .Sh SEE ALSO .Xr mount 2 , .Xr perfuse_mount 3 , .Xr puffs 4 .Sh AUTHORS The program was written by .An Emmanuel Dreyfus .Aq manu@NetBSD.org . .Sh BUGS When .Nm runs in the foreground (using the .Fl f flag), some processes using the FUSE file system will sometime hang on .Sq uvn_fp2 .