Nikolaus Rath [Thu, 20 Oct 2016 22:45:32 +0000 (15:45 -0700)]
Turn fuse_operations.nopath_flag into fuse_config.nullpath_ok
Modifying struct fuse_config in the init() handler is the canonical way
to adjust file-system implementation specific settings. There is no need
to have flags in struct fuse_operations.
These are not mount options for FUSE file systems, but capabilites that
are worked out between libfuse and the fuse kernel module. For that
reason, they are also not accepted by fuse_session_new().
Consus [Thu, 20 Oct 2016 13:08:49 +0000 (16:08 +0300)]
Do not close stdout on fuse_session_destroy()
If fuse_session_mount() fails (or was never called in the first place)
we end up with the default fd value which happens to be 0. It hurts
long-running processes, which lifetime extends beyond session's
lifetime.
Nikolaus Rath [Sun, 16 Oct 2016 21:28:47 +0000 (14:28 -0700)]
Inlined fuse_mount_help() into fuse_lowlevel_help().
Both the BSD and Linux implementation actually accept mostly the same
FUSE-specific mount options. Up to now, the BSD help function appended
the output of ``mount_fusefs --help``, but looking at
http://www.unix.com/man-page/freebsd/8/mount_fusefs/ this is likely more
confusing than helpful (since the user is not actually invoking
mount_fusefs directly, most of the options don't make sense).
Nikolaus Rath [Sun, 16 Oct 2016 21:12:39 +0000 (14:12 -0700)]
Updated man-pages.
* Removed -o nonempty
* Added -o noforget
* Split into high-level / low-level
* Added warning that most options should be chosen by file system
internally.
* Updated maintainer.
Nikolaus Rath [Sun, 16 Oct 2016 02:46:57 +0000 (19:46 -0700)]
Make --help output more suitable for end-user
We now only list options that are potentially useful for an
end-user (and unlikely to accidentally break a file system). The full
list of FUSE options has been moved to the documentation of the
fuse_new() and fuse_session_new() functions.
Nikolaus Rath [Sat, 15 Oct 2016 23:09:16 +0000 (16:09 -0700)]
Unify handling of fuse_conn_info options
Instead of using command line options to modify struct fuse_conn_info
before and after calling the init() handler, we now give the file system
explicit control over this.
Nikolaus Rath [Mon, 10 Oct 2016 22:52:15 +0000 (15:52 -0700)]
do_init(): treat command line options consistently
Previously, some command line options would change the FUSE defaults
but leave the final value to the file systems `init` handler while
others would override any changes made by `init`. Now, command line
options do both: they modify the default, *and* take precedence.
Nikolaus Rath [Tue, 11 Oct 2016 03:21:45 +0000 (20:21 -0700)]
Move session options into sub-struct
The session options are used only once to determine the proper
conn->want flags. It is nice to have them clearly separated from the
other struct fuse_session members that are used throughout the life of
the file system.
Nikolaus Rath [Mon, 10 Oct 2016 18:18:00 +0000 (11:18 -0700)]
Fix race condition in notify_* examples
The fix in commit cf4159156b was incomplete. While some false positives
are caused by sleep() in the file system taking longer than expected,
there was also a race condition where the file system would run before
the contents are initialized properly.
Nikolaus Rath [Mon, 10 Oct 2016 16:38:20 +0000 (09:38 -0700)]
fuse_main(): extend support for printing help
There's now a way to inhibit the "usage" line (which actually got lost
in commit 225c12aebf2d), which makes it easier for simply file-systems
to generate good-looking --help output.
Nikolaus Rath [Mon, 10 Oct 2016 04:05:54 +0000 (21:05 -0700)]
Renamed cuses example and added test program
An earlier version of the fioclient.c example was intended to be
used together with cusexmp.c. The former has since evolved into
ioctl_client.c and no longer has the function necessary to test
CUSE. Therefore, we've added a new cuse_client.c that is clearly
associated with the cuse.c example file system.
Nikolaus Rath [Sat, 8 Oct 2016 04:08:40 +0000 (21:08 -0700)]
Removed ``-o big_writes`` option
This option is obsolete and should always be enabled. File systems that
want to limit the size of write requests should use the
``-o max_write=<N>`` option instead.
Nikolaus Rath [Wed, 5 Oct 2016 04:04:18 +0000 (21:04 -0700)]
Merge struct fuse_ll into struct fuse_session.
This merge merges struct fuse_ll into struct fuse_session. Since
there is always a one-to-one correspondence between the two,
there is little reason to keep them separate. By merging them,
we save pointers and lines of code.
Nikolaus Rath [Tue, 4 Oct 2016 03:23:42 +0000 (20:23 -0700)]
fuse_lowlevel_notify_poll(): use master channel
In theory, a poll handle could hang around much longer than the worker
thread that creates it. Furthermore, the thread that created the
pollhandle is no more likely to call fuse_lowlevel_notify_poll() than
any other thread.
In theory, this would have kept the channel alive for much longer than
necessary. In practice, there seems to have been a bug that prevented
this - and instead allowed the channel to be destroyed while there
was still a pollhandle referring to it.
Instead of fixing this by calling fuse_chan_get() and fuse_chan_put() in
do_poll() and fuse_pollhandle_destroy(), we simply transmit poll
notifications over the master channel now.