aboutsummaryrefslogtreecommitdiffstats
path: root/lib/fuse.c
AgeCommit message (Collapse)AuthorLines
2016-10-04Clarified purpose of helper.c, moved *version() to fuse.cNikolaus Rath-0/+10
2016-10-03Merge master fuse_chan into fuse_session.Nikolaus Rath-4/+3
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-02Merged fuse_mt.c into fuse.cNikolaus Rath-0/+14
There is no point in having a separate file for a 10 line function.
2016-10-02Extended per-file comments.Nikolaus Rath-0/+3
This should make more clear what file contains code for what purpose.
2016-10-02Don't handle --help and --version in fuse_session_new().Nikolaus Rath-40/+34
Help and version messages can be generated using the new fuse_lowlevel_help(), fuse_lowlevel_version(), fuse_mount_help(), and fuse_mount_version() functions. The fuse_parse_cmdline() function has been made more powerful to do this automatically, and is now explicitly intended only for low-level API users. This is a code simplication patch. We don't have to parse for --help and --version in quite as many places, and we no longer have a low-level initialization function be responsible for the (super-high level) task of printing a program usage message. In the high-level API, we can now handle the command line parsing earlier and avoid running other initialization code if we're just going to abort later on.
2016-10-02Add section headings for --help outputNikolaus Rath-2/+3
Also, do not include "General options" in usage message.
2016-10-02Turn struct fuse_chan into an implementation detailNikolaus Rath-9/+8
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-02Renamed fuse_lowlevel_new() to fuse_session_new().Nikolaus Rath-1/+1
2016-10-02Introduce separate mount/umount functions for low-level API.Nikolaus Rath-0/+10
2016-10-02Turned fuse_session_{process,receive}_buf into wrapper functions.Nikolaus Rath-2/+2
2016-10-01Improve documentation of argument parsing.Nikolaus Rath-0/+5
2016-03-29Whitespace cleanup.Nikolaus Rath-4/+3
Applied (whitespace-cleanup) to each file. Having whitespace changes in the VCS is ugly, but it ensures that in the future committers can run this function to *avoid* commiting any whitespace.
2016-03-29Inlined fuse_chan_fdNikolaus Rath-1/+1
2015-02-26libfuse: fix handling of '.' and '..' in highlevel readdirplusMiklos Szeredi-4/+12
2014-07-21libfuse: highlevel API: fix directory file handle passed to ioctl() methodMiklos Szeredi-2/+8
Reported by Eric Biggers
2014-07-15libfuse: add flags to ->rename()Miklos Szeredi-10/+53
See renameat2() system call in linux-3.15 and later kernels.
2014-03-26Initilaize stat buffer passed to ->getattr() and ->fgetattr()Miklos Szeredi-0/+2
to zero in all cases. Reported by Daniel Iwan.
2014-03-05libfuse: implement readdirplus for high-level APIEric Wong-51/+255
Reuse the old "readdir" callback, but add a flags argument, that has FUSE_READDIR_PLUS in case this is a "plus" version. Filesystems can safely ignore this flag, but if they want they can add optimizations based on it: i.e. only retrieve the full attributes in PLUS mode. The filler function is also given a flags argument and the filesystem can set FUSE_FILL_DIR_PLUS if all the attributes in "stat" are valid.
2014-02-04fuse: use dlsym() instead of relying on ld.so constructor functionsFabrice Bauzac-43/+79
2013-08-26Merge remote-tracking branch 'origin/fuse_2_9_bugfix'Miklos Szeredi-0/+1
2013-08-26Add missing includesDaniel Thau-0/+1
This allows compiling fuse with musl.
2013-08-26Change generation and nlookup from 'unsigned long' to 'uint64_t'Miklos Szeredi-2/+1
2013-07-26Print help on stdout instead of stderrMiklos Szeredi-3/+3
2013-07-18libfuse: clean up struct fuse_file_infoMiklos Szeredi-1/+0
Remove 'fh_old' which was an ABI compatibility field for a long time. Make 'writepage' a bitfield.
2013-06-21libfuse: remove fuse_chan_bufsize()Miklos Szeredi-12/+4
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-3/+2
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: replace fuse_session_next_chanMiklos Szeredi-1/+1
Replace fuse_session_next_chan() with fuse_session_chan(), as multiple channels per session were never actually supported and probably never will.
2013-03-19Merge branch 'fuse_2_9_bugfix'Miklos Szeredi-0/+1
2013-02-21fix fi->fh format stringsMiklos Szeredi-2/+2
2013-02-21Fix nodeid format stringsMiklos Szeredi-6/+9
2013-02-18Add "nopath" to help.Miklos Szeredi-0/+1
2013-02-08libfuse: remove deprecated fuse_operations.utime_omit_okMiklos Szeredi-5/+1
2013-02-08libfuse: remove deprecated fuse_operations.utime()Miklos Szeredi-10/+0
2013-02-08libfuse: remove deprecated fuse_operations.getdir()Miklos Szeredi-30/+0
2013-02-08libfuse: remove deprecated fuse_exited()Miklos Szeredi-5/+0
2013-02-08libfuse: remove deprecated fuse_read_cmd(), fuse_process_cmd()Miklos Szeredi-47/+0
2013-02-08libfuse: remove deprecated fuse_set_getcontext_func()Miklos Szeredi-6/+0
2013-02-08libfuse: remove deprecated fuse_invalidate()Miklos Szeredi-7/+0
2013-02-08libfuse: remove deprecated fuse_is_lib_option()Miklos Szeredi-6/+0
2013-02-07libfuse-fix-fs-cleanupMiklos Szeredi-4/+3
This fixes a segmentation fault if command-line option parsing fails during initialization. Reported by Eric Wong
2013-02-07libfuse: add poll_events to fuse_file_infoEnke Chen-2/+3
Make requested poll events available to the filesystem. If the requested eventsare not available, then this field is zero.
2013-02-05libfuse: fix fuse_get_context() in non fuse threadsMiklos Szeredi-18/+30
fuse_interrupted(), fuse_get_context(), etc... crashed in non-fuse threads. Instead return false, NULL or error depending on the function. Reported by Michael Berlin
2013-02-04Merge branch 'fuse_2_9_bugfix'Miklos Szeredi-118/+174
2013-02-04libfuse: fix the 'remember' optionMadan Valluri-0/+4
The lru list was not initialized for the "/" path. This resulted in remove_node_lru() crashing on LOOKUP-DOTDOT. Patch by Madan Valluri. -- ChangeLog | 4 ++++ lib/fuse.c | 4 ++++ 2 files changed, 8 insertions(+)
2013-02-04libfuse: fix crash in unlock_path()Ratna_Bolla@dell.com-0/+2
Patch by Ratna Manoj. queue_element_unlock() should set ->first_locked and ->second_locked to false. Discovered with 'fs_racer'. The assert(wnode->treelock == TREELOCK_WRITE) in unlock_path() was hit within minutes. Miklos: simplified patch
2012-10-01Fix deadlock in libfuseMiklos Szeredi-118/+167
Running "svn update" on a fuse filesystem could deadlock because of a bug in the way the paths are locked. Reported by Kazuaki Anami
2012-08-24Fix missing config.h in buffer.cMiklos Szeredi-0/+1
Due to an oversight, splice will never actually be used for i/o. Someone forgot to #include "config.h" in lib/buffer.c (in fact almost no files include that header). As a result, even though configure detects splice support and puts HAVE_SPLICE in config.h, buffer.c is always compiled as if there is no splice support. Also add #include "config.h" to fuse.c and fuse_lowlevel.c. These currently include it indirectly through fuse_misc.h, but we don't want to depend on that. Reported by Matthew Gabeler-Lee
2012-08-14Merge branch 'fuse_2_9_bugfix'Miklos Szeredi-13/+15
2012-08-14Zero out node when allocating from a slab.Miklos Szeredi-10/+4
Fix compile warning when not using node slab.
2012-08-14Fix "fuse internal error: node NNN not found"Miklos Szeredi-4/+12
Commit 4dc7e675bb (Don't unhash name in FORGET) broke the forget logic in a subtle way, resulting in "fuse internal error: node NNN not found" and causing the filesystem daemon to abort. Fix by incrementing the node refcount if nlookup goes from zero to one. Reported by Kyle Lippincott