aboutsummaryrefslogtreecommitdiff
path: root/ChangeLog.rst
diff options
context:
space:
mode:
authorGravatar Nikolaus Rath <Nikolaus@rath.org>2016-10-02 11:30:43 -0700
committerGravatar Nikolaus Rath <Nikolaus@rath.org>2016-10-02 13:56:40 -0700
commit5698ee09cf7a8495da70659ffae1eaec9f57db27 (patch)
tree798a58a4f49d7f82e3f948463daad4405173483e /ChangeLog.rst
parentf164e9b8ca319dd1279384ff495b5fa91e778d9e (diff)
Turn struct fuse_chan into an implementation detail
The only struct fuse_chan that's accessible to the user application is the "master" channel that is returned by fuse_mount and stored in struct fuse_session. When using the multi-threaded main loop with the "clone_fd" option, each worker thread gets its own struct fuse_chan. However, none of these are available to the user application, nor do they hold references to struct fuse_session (the pointer is always null). Therefore, any presence of struct fuse_chan can be removed without loss of functionality by relying on struct fuse_session instead. This reduces the number of API functions and removes a potential source of confusion (since the new API no longer looks as if it might be possible to add multiple channels to one session, or to share one channel between multiple sessions). Fixes issue #17.
Diffstat (limited to 'ChangeLog.rst')
-rw-r--r--ChangeLog.rst67
1 files changed, 64 insertions, 3 deletions
diff --git a/ChangeLog.rst b/ChangeLog.rst
index 23c606e..a15b55a 100644
--- a/ChangeLog.rst
+++ b/ChangeLog.rst
@@ -12,9 +12,70 @@ Unreleased Changes
* The ``fuse_lowlevel_notify_*`` functions now all take a `struct
fuse_session` parameter instead of a `struct fuse_chan`.
-* The channel interface (``fuse_chan_*`` functions) has been
- made private. The `struct fuse_chan_ops` data structure is now
- opaque.
+* The channel interface (``fuse_chan_*`` functions) has been made
+ private. As a result, the typical initialization sequence of a
+ low-level file system has changed from ::
+
+ ch = fuse_mount(mountpoint, &args);
+ se = fuse_lowlevel_new(&args, &lo_oper, sizeof(lo_oper), &lo);
+ fuse_set_signal_handlers(se);
+ fuse_session_add_chan(se, ch);
+ fuse_daemonize(fg);
+ if (mt)
+ fuse_session_loop_mt(se);
+ else
+ fuse_session_loop(se);
+ fuse_remove_signal_handlers(se);
+ fuse_session_remove_chan(ch);
+ fuse_session_destroy(se);
+ fuse_unmount(mountpoint, ch);
+
+ to ::
+
+ se = fuse_session_new(&args, &ll_ops, sizeof(ll_ops), NULL);
+ fuse_set_signal_handlers(se);
+ fuse_session_mount(se, mountpoint);
+ fuse_daemonize(fg);
+ if (mt)
+ fuse_session_loop_mt(se);
+ else
+ fuse_session_loop(se);
+ fuse_remove_signal_handlers(se);
+ fuse_session_unmount(se);
+ fuse_lowlevel_destroy(se);
+
+ The typical high-level setup has changed from ::
+
+ ch = fuse_mount(*mountpoint, &args);
+ fuse = fuse_new(ch, &args, op, op_size, user_data);
+ se = fuse_get_session(fuse);
+ fuse_set_signal_handlers(se);
+ fuse_daemonize(fg);
+ if (mt)
+ fuse_loop_mt(fuse);
+ else
+ fuse_loop(fuse);
+ fuse_remove_signal_handlers(se);
+ fuse_unmount(mountpoint, ch);
+ fuse_destroy(fuse);
+
+ to ::
+
+ fuse = fuse_new(&args, op, op_size, user_data);
+ se = fuse_get_session(fuse);
+ fuse_set_signal_handlers(se);
+ fuse_mount(se, mountpoint);
+ fuse_daemonize(fg);
+ if (mt)
+ fuse_loop_mt(fuse);
+ else
+ fuse_loop(fuse);
+ fuse_remove_signal_handlers(se);
+ fuse_unmount(se);
+ fuse_destroy(fuse);
+
+ File systems that use `fuse_main` are not affected by this change.
+
* Added *clone_fd* option. This creates a separate device file
descriptor for each processing thread, which might improve