NetBSD/usr.sbin/perfused/perfused.8

143 lines
3.8 KiB
Groff
Raw Normal View History

.\" $NetBSD: perfused.8,v 1.7 2011/12/16 12:51:43 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 August 12, 2010
.Dt PERFUSED 8
2011-05-10 16:16:18 +04:00
.Os
.Sh NAME
.Nm perfused
2010-08-27 22:12:51 +04:00
.Nd PUFFS Enabled Relay to FUSE Daemon
.Sh SYNOPSIS
.Nm
2010-08-27 22:12:51 +04:00
.Op Fl fs
.Op Fl d Ar types
.Op Fl i fd
.Sh DESCRIPTION
.Nm
2010-08-27 22:12:51 +04:00
is a userland daemon implementing the FUSE kernel level API.
It creates a
.Pa /dev/fuse
2010-08-27 22:12:51 +04:00
socket for FUSE file system daemons to connect to.
.Nm
2010-08-27 22:12:51 +04:00
takes care of mounting the file system using
.Xr puffs 3 .
.Pp
2010-08-27 22:12:51 +04:00
When the kernel sends a
.Xr puffs 3
2010-08-27 22:12:51 +04:00
operation for the mounted file system,
.Nm
2010-08-27 22:12:51 +04:00
will translate it into a FUSE request, and will send it to the file system
daemon through
.Pa /dev/fuse .
2010-08-27 22:12:51 +04:00
The FUSE reply will be converted back into a
.Xr puffs 3
reply and will be relayed to the kernel.
.Pp
2010-08-27 22:12:51 +04:00
FUSE file system daemons must be modified so that they request
.Nm
2010-08-27 22:12:51 +04:00
to perform the
.Xr mount 2
2010-08-27 22:12:51 +04:00
system call instead of doing it on their own.
This is done by replacing
.Xr mount 2
and the
2010-08-27 22:12:51 +04:00
.Xr open 2
calls for
.Pa /dev/fuse
2010-08-27 22:12:51 +04:00
with
.Fn perfuse_mount
2010-08-27 22:12:51 +04:00
and
.Fn perfuse_open ,
respectively, in their sources.
.Xr libperfuse 3
must be used at link time.
2010-08-27 22:12:51 +04:00
Most FUSE file system daemons use
.Nm libfuse
2010-08-27 22:12:51 +04:00
and will work unmodified, provided the modification is done in
.Nm libfuse
itself .
.Pp
2010-08-27 22:12:51 +04:00
The following options are available:
.Bl -tag -width XdXtypesXX
.It Fl d Ar types
2010-08-27 22:12:51 +04:00
Print additional debug information.
.Ar types
2010-08-27 22:12:51 +04:00
is a comma-separated list of information types to print:
.Bl -tag -width indent
.It Ar puffs
2010-08-27 22:12:51 +04:00
Display PUFFS requests and replies.
.It Ar fuse
2010-08-27 22:12:51 +04:00
Display FUSE requests and replies.
.It Ar dump
2010-08-27 22:12:51 +04:00
Dump content of FUSE frames.
.It Ar fh
2010-08-27 22:12:51 +04:00
Display file handle activity.
.It Ar reclaim
2010-08-27 22:12:51 +04:00
Display reclaim activity.
.It Ar readdir
2010-08-27 22:12:51 +04:00
Display readdir activity.
.It Ar requeue
2010-08-27 22:12:51 +04:00
Display requeue activity.
.It Ar sync
2010-08-27 22:12:51 +04:00
Display dirty flags and sync operations.
.El
2010-08-27 22:12:51 +04:00
.It Fl f
Do not fork, but stay in the foreground.
.It Fl i Ar fd
Do not open
.Pa /dev/fuse
2010-08-27 22:12:51 +04:00
but use the socket available from the file descriptor
.Ar fd .
2010-08-27 22:12:51 +04:00
This is used when
.Nm
is started from
.Xr libperfuse 3 .
2010-08-27 22:12:51 +04:00
.It Fl s
Enable debug output only when receiving
.Li SIGINFO .
.El
.Sh ERRORS
The program logs to the syslog daemon as facility
.Dq daemon .
For detailed debugging use the
2010-08-27 22:12:51 +04:00
.Fl d
(debug) option.
.Sh SEE ALSO
.Xr mount 2 ,
2010-08-27 22:12:51 +04:00
.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 filesystem will
sometime hang on
.Sq uvn_fp2 .