aboutsummaryrefslogtreecommitdiffstats
path: root/lib/fuse_i.h
AgeCommit message (Collapse)AuthorLines
2017-09-19Don't use external symbol names in internal filesNikolaus Rath-0/+3
The fuse_session_loop_mt() and fuse_loop_mt() symbols are only visible when linking against the shared object. The code in lib/, however, is compiled *into* the shared object and should thus use the internal names of these functions. Surprisingly enough, the code still worked before - but only when link time optimization was disabled. Unfortunately, we still can't compile with LTO because it seems that enabling LTO somehow makes the tagged symbols vanish. Without lto, we have: $ nm lib/libfuse3.so | grep fuse_new 0000000000011070 T fuse_new_30 0000000000010a00 t fuse_new_31 0000000000011070 T fuse_new@FUSE_3.0 0000000000010a00 T fuse_new@@FUSE_3.1 and with LTO: $ nm lib/libfuse3.so | grep fuse_new 0000000000019a70 T fuse_new_30 0000000000019270 t fuse_new_31 See also issue #198.
2017-08-14directly call fuse_new_31() instead of fuse_new() internallyuserwithuid-0/+3
this fixes building with lto, which failed since commit 503e32d01e4db00e90d7acfd81ab05386559069f
2016-11-22Make handling of -oallow_root easier to understandNikolaus Rath-1/+1
-oallow_root is handled in userspace, and requires passing -oallow_other to the kernel. This patch should make the code easier to understand and avoid the confusion that gave rise to issue #86.
2016-11-16Add support for more detailed error codes from main loopNikolaus Rath-0/+1
2016-10-27Add max_read to fuse_conn_infoNikolaus Rath-0/+1
Eventually, this setting should be negotiated in the filesystem's init() handler (like e.g. max_write). However, this requires corresponding changes in the FUSE kernel module. In preparation for this (and to allow a transition period) we already allow (and require) filesystems to set the value in the init() handler in addition to the mount option. The end-goal is tracked in issue #91.
2016-10-16Inlined fuse_mount_help() into fuse_lowlevel_help().Nikolaus Rath-2/+0
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).
2016-10-15Unify handling of fuse_conn_info optionsNikolaus Rath-23/+0
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.
2016-10-13Make -o clone_fd into a parameter of session_loop_mt().Nikolaus Rath-1/+0
This option really affects the behavior of the session loop, not the low-level interface. Therefore, it does not belong in the fuse_session object.
2016-10-13Move session options into sub-structNikolaus Rath-9/+12
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.
2016-10-10Removed 'async_read' field in fuse_conn_infoNikolaus Rath-0/+2
This is redundant with the capability flags in `wants` and `capable`.
2016-10-08Removed ``-o big_writes`` optionNikolaus Rath-1/+0
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.
2016-10-05Removed obsolete, unused *f member from struct fuse_session.Nikolaus Rath-1/+0
2016-10-04Merge fuse_ll into fuse_session (part 1)Nikolaus Rath-17/+13
Merged the structures, and replaced fuse_ll with fuse_session in all type definitions.
2016-10-03Merge master fuse_chan into fuse_session.Nikolaus Rath-55/+2
This is a code simplification patch. - It confines most of the implementation channel implementation into fuse_loop_mt (which is its only user). - It makes it more obvious in the code that channels are only ever used when using -o clone_fd and multi-threaded main loop. - It simplies the definition of both struct fuse_session and struct fuse_chan. - Theoretically it should result in (minuscule) performance improvements when not using -o clone_fd. - Overall, it removes a lot more lines of source code than it adds :-).
2016-10-03Store struct fuse_session* in struct fuse_reqNikolaus Rath-1/+1
2016-10-02Turn struct fuse_chan into an implementation detailNikolaus Rath-2/+57
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.
2016-10-02Turned fuse_session_{process,receive}_buf into wrapper functions.Nikolaus Rath-0/+5
2016-10-02Inlined fuse_session_new()Nikolaus Rath-7/+0
This function is only used in one place.
2015-05-18libfuse: add "clone_fd" optionMiklos Szeredi-0/+1
This creates a separate device file descriptor for each processing thread, which might improve performance.
2015-05-18libfuse: refcount fuse_chan objectsMiklos Szeredi-0/+2
New functions: fuse_chan_get(), fuse_chan_put(). Removed function: fuse_chan_destroy().
2014-02-04fuse: use dlsym() instead of relying on ld.so constructor functionsFabrice Bauzac-0/+15
2014-01-29libfuse: Add "async_dio" and "writeback_cache" optionsMiklos Szeredi-0/+4
Asynchronous direct I/O is supported by linux kernels 3.13 and later, writeback caching is supported by 3.14 and later.
2013-06-21libfuse: remove session and chan abstractionsMiklos Szeredi-36/+11
There's actually just one type of channel and session, so we don't need the generic callback functions.
2013-06-21libfuse: remove fuse_chan_bufsize()Miklos Szeredi-3/+2
Remove fuse_chan_bufsize() from the lowlevel API. fuse_session_receive_buf() is now responsible for allocating memory for the buffer.
2013-06-21libfuse: remove fuse_chan_(send|receive)Miklos Szeredi-51/+1
Move the fuse_chan_ops.send and .receive implementations to fuse_lowlevel.c. The abstraction wasn't actually useful and made the the splice implementation more difficult. Remove fuse_chan_ops.send and fuse_chan_ops.receive.
2013-06-21libfuse: clean up fuse_chanMiklos Szeredi-0/+82
Clean up fuse_chan related interfaces. Remove the following from the lowlevel library API: struct fuse_chan_ops; fuse_chan_new(); fuse_chan_session(); fuse_chan_recv(); fuse_chan_send();
2013-06-21libfuse: clean up fuse_sessionMiklos Szeredi-2/+19
Clean up fuse_session related interfaces. Remove the following from the lowlevel library API: struct fuse_session_ops; fuse_session_new(); fuse_session_process(); fuse_session_data();
2013-06-20libfuse: fix multiple close of device fdMiklos Szeredi-0/+2
- fuse_kern_unmount closes handle (e.g. 19) - a thread in my process opens a file - the OS assigns newly freed handle (i.e. 19) - fuse_kern_chan_destroy closes the same handle (i.e. 19) - a thread in my process opens another file - the OS assigns newly freed handle (i.e. 19) - * MAYHEM * Reported by Dan Greenfield
2013-02-08libfuse: remove struct fuse_cmdMiklos Szeredi-6/+0
2013-02-07libfuse: allow disabling adaptive readdirplusEric Wong-0/+1
This switches the -o no_readdirplus option to a tristate string: -o readdirplus=(yes|no|auto) Telling the kernel to always use readdirplus is beneficial to filesystems (e.g. GlusterFS) where the cost to perform readdir and readdirplus are identical. The default remains "auto" (if supported).
2013-02-07libfuse: add readdirplus support in fuse_lowlevel_opsFeng Shuo-0/+1
This patch implements readdirplus support in FUSE usersapce. It adds a new fuse lowlevel operations fuse_lowleve_ops::readdir_plus, corespoding mount options and helper functions to maintain buffer. [From: Eric Wong <normalperson@yhbt.net>] This makes our terminology consistent with NFS and our kernel module, as well as reducing user/developer confusion in the command-line. Note: I'm keeping "fuse_add_direntry_plus" since that is less standardized in its use than "readdirplus" for now. Signed-off-by: Feng Shuo <steve.shuo.feng@gmail.com>
2013-02-06libfuse: Add '[no_]auto_inval_data' mount optionFeng Shuo-0/+2
Several caching logic changes have been made on the kernel side to better support network-based fuse filesystems. These include kernel side mtime checking and read path cache revalidation. The new caching logic is enabled through the FUSE_AUTO_INVAL_DATA init flag. Export this to the user via the '[no_]auto_inval_data' mount option. Signed-off-by: Feng Shuo <steve.shuo.feng@gmail.com>
2012-07-19Remove compat functionsMiklos Szeredi-21/+0
2011-07-06Add ->flock() operation to low and high level interfacesMiklos Szeredi-1/+2
This fixes problems with emulating flock() with POSIX locking. Reported by Sebastian Pipping. As with lock/setlk/getlk most filesystems don't need to implement this, as the kernel takes care of file locking. The only reason to implement locking operations is for network filesystems which want file locking to work between clients.
2011-06-02add "remember" optiontherealneworld@gmail.com-0/+2
This works similar to "noforget" except that eventually the node will be allowed to expire from the cache.
2011-05-19Fix ioctl ABIMiklos Szeredi-0/+1
Fix the ambiguity of ioctl ABI on the kernel/userspace boundary for 32bit vs. 64bit userspace
2011-05-19Disable splice by defaultMiklos Szeredi-0/+3
Disable splice by default, add "splice_read", "splice_write" and "splice_move" options. Keep the "no_splice_*" variants, which can disable splice even if the filesystem explicitly enables it.
2010-11-08libfuse: add retrieve requestMiklos Szeredi-0/+10
Retrieve data stored in the kernel buffers for a given inode.
2010-11-08libfuse: support zero copy writes in lowlevel interfaceMiklos Szeredi-0/+7
Add new ->write_buf() method to low level interface. This allows passig a generic buffer, either containing a memory buffer or a file descriptor. This allows implementing zero copy writes. Add fuse_session_receive_buf() and fuse_session_process_buf() which may be used in event loop implementations to replace fuse_chan_recv() and fuse_session_process() respectively.
2010-07-12libfuse: add buffer interfaceMiklos Szeredi-0/+1
Add a generic buffer interface for use with I/O. Buffer vectors are supplied and each buffer in the vector may be a memory pointer or a file descriptor. The fuse_reply_fd() interface is converted to using buffers.
2010-06-17Add fuse_reply_fd() reply function to the low level interfaceMiklos Szeredi-0/+3
2009-08-18* Add missing fuse_session_data to versionscriptMiklos Szeredi-4/+4
* Make sure all global symbols are prefixed with "fuse_" or "cuse_" * Released 2.8.0
2009-06-18CUSE patches from Tejun Heo (add new files)Miklos Szeredi-0/+1
2009-06-18CUSE patches from Tejun HeoMiklos Szeredi-3/+66
2007-12-12change indentingMiklos Szeredi-11/+11
2007-10-16Clarify licence version to be "LGPLv2" for the libraryMiklos Szeredi-1/+1
2007-04-25update copyright datesMiklos Szeredi-1/+1
2006-09-07interrupt supportMiklos Szeredi-0/+1
2006-03-17fixMiklos Szeredi-4/+8
2006-02-15fixMiklos Szeredi-0/+5