2016-10-19 01:26:13 +03:00
|
|
|
.\" $NetBSD: libperfuse.3,v 1.5 2016/10/18 22:26:13 wiz Exp $
|
2010-08-25 11:16:00 +04:00
|
|
|
.\"
|
|
|
|
.\" 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 LIBPERFUSE 2
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm perfuse_mount ,
|
|
|
|
.Nm perfuse_open
|
|
|
|
.Nd Request a
|
2010-09-01 17:04:11 +04:00
|
|
|
.Xr puffs 3
|
|
|
|
mount from
|
|
|
|
.Xr perfused 8
|
2010-08-25 11:16:00 +04:00
|
|
|
.Sh LIBRARY
|
|
|
|
.Lb libperfuse
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.In perfuse.h
|
|
|
|
.Ft int
|
|
|
|
.Fn perfuse_mount "const char *source" "const char *dir" "const char *filesystemtype" "long int mountflags" "void *data"
|
|
|
|
.Ft int
|
|
|
|
.Fn perfuse_open "const char *path" "int flags"
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Fn perfuse_mount
|
2010-09-01 17:04:11 +04:00
|
|
|
sends a mount request to
|
2010-08-25 11:16:00 +04:00
|
|
|
.Xr perfused 8 .
|
|
|
|
It is intended as a drop-in replacement for
|
|
|
|
.Xr mount 2
|
2010-09-01 17:04:11 +04:00
|
|
|
for FUSE file systems daemons and libraries, so that they can work with
|
2010-08-25 11:16:00 +04:00
|
|
|
.Xr perfused 8 .
|
|
|
|
.Pp
|
|
|
|
The function prototype mimics Linux's
|
|
|
|
.Xr mount 2 ,
|
|
|
|
with the following arguments:
|
|
|
|
.Bl -tag -width indent
|
|
|
|
.It Ar source
|
2010-09-01 17:04:11 +04:00
|
|
|
The source file system that will appear in
|
|
|
|
.Xr df 1
|
2010-08-25 11:16:00 +04:00
|
|
|
and
|
|
|
|
.Xr mount 8
|
2010-09-01 17:04:11 +04:00
|
|
|
listings.
|
|
|
|
Defaults to
|
2010-08-25 11:16:00 +04:00
|
|
|
.Pa /dev/fuse
|
2010-09-01 17:04:11 +04:00
|
|
|
if
|
|
|
|
.Dv NULL .
|
2010-08-25 11:16:00 +04:00
|
|
|
.It Ar dir
|
2010-09-01 17:04:11 +04:00
|
|
|
The file system mount point.
|
2010-08-25 11:16:00 +04:00
|
|
|
.It Ar filesystemtype
|
2010-09-01 17:04:11 +04:00
|
|
|
The file system type, as displayed by
|
|
|
|
.Xr df 1
|
2010-08-25 11:16:00 +04:00
|
|
|
and
|
|
|
|
.Xr mount 8 .
|
2010-09-01 17:04:11 +04:00
|
|
|
Defaults to
|
|
|
|
.Dq fuse
|
|
|
|
if
|
|
|
|
.Dv NULL .
|
2010-08-25 11:16:00 +04:00
|
|
|
.It Ar mountflags
|
2010-09-01 17:04:11 +04:00
|
|
|
This contains the same value as a
|
2010-08-25 11:16:00 +04:00
|
|
|
.Xr mount 2
|
|
|
|
.Ar flags
|
|
|
|
argument.
|
|
|
|
.It Ar data
|
2010-09-01 17:04:11 +04:00
|
|
|
This contains the same value as a
|
2010-08-25 11:16:00 +04:00
|
|
|
.Xr mount 2
|
|
|
|
.Ar data
|
|
|
|
argument.
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
.Fn perfuse_open
|
2010-09-01 17:04:11 +04:00
|
|
|
is a drop-in replacement for the
|
2010-08-25 11:16:00 +04:00
|
|
|
.Xr open 2
|
|
|
|
system call where
|
|
|
|
.Pa /dev/fuse
|
2010-09-01 17:04:11 +04:00
|
|
|
is used.
|
|
|
|
If
|
2010-08-25 11:16:00 +04:00
|
|
|
.Ar path
|
|
|
|
is different than
|
|
|
|
.Pa /dev/fuse ,
|
2010-09-01 17:04:11 +04:00
|
|
|
.Fn perfuse_open
|
2010-08-25 11:16:00 +04:00
|
|
|
handles control to the regular
|
|
|
|
.Xr open 2 .
|
2016-10-19 01:26:13 +03:00
|
|
|
.Sh RETURN VALUES
|
|
|
|
.Fn perfuse_mount
|
|
|
|
returns a file descriptor to the
|
|
|
|
.Pa /dev/fuse
|
|
|
|
socket on success, and causes exit on failure.
|
2016-10-18 18:06:17 +03:00
|
|
|
.Sh ENVIRONMENT
|
|
|
|
.Bl -tag -width Er
|
|
|
|
.It Ev PERFUSE_OPTIONS
|
2016-10-19 01:26:13 +03:00
|
|
|
Comma-separated values controlling the usage of some FUSE methods.
|
|
|
|
Allowed values are
|
2016-10-18 18:06:17 +03:00
|
|
|
.Li enable_access ,
|
|
|
|
.Li disable_access ,
|
|
|
|
.Li enable_creat ,
|
|
|
|
.Li disable_creat .
|
|
|
|
.It Ev PERFUSE_BUFSIZE
|
|
|
|
Set the socket buffer sizes used for communication with the filesystem.
|
2016-10-19 01:26:13 +03:00
|
|
|
This should be raised as operation throughput requires it.
|
|
|
|
Default is
|
2016-10-18 18:06:17 +03:00
|
|
|
.Li 2162688
|
|
|
|
bytes, which is enough to queue 16 FUSE packets of maximum 132 kB length.
|
|
|
|
.El
|
2010-09-01 17:04:11 +04:00
|
|
|
.\".Sh ERRORS
|
|
|
|
.\".Fn perfuse_mount
|
|
|
|
.\"will fail when one of the following occurs:
|
|
|
|
.\".Bl -tag -width Er
|
|
|
|
.\".El
|
2010-08-25 11:16:00 +04:00
|
|
|
.Sh SEE ALSO
|
2011-05-10 16:14:37 +04:00
|
|
|
.Xr df 1 ,
|
2010-08-25 11:16:00 +04:00
|
|
|
.Xr mount 2 ,
|
|
|
|
.Xr open 2 ,
|
|
|
|
.Xr mount 8 ,
|
|
|
|
.Xr perfused 8
|
|
|
|
.Sh AUTHORS
|
|
|
|
The program was written by
|
2010-09-01 17:04:11 +04:00
|
|
|
.An Emmanuel Dreyfus
|
2010-08-25 11:16:00 +04:00
|
|
|
.Aq manu@NetBSD.org .
|