aboutsummaryrefslogtreecommitdiffstats
path: root/lib/fuse.c
AgeCommit message (Collapse)AuthorLines
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
2012-07-20Remove compatibility path handlingMiklos Szeredi-18/+3
This means that now NULL is a valid path for operations that take a file descriptor if the file was unlinked and hard_remove option is specified.
2012-07-19Remove compat functionsMiklos Szeredi-231/+8
2012-07-19Remove old symbol versionsMiklos Szeredi-10/+0
2012-07-19Fix crash caused by freeing a stack addressMiklos Szeredi-1/+1
The failure path of try_get_path2() erronously tried to free the "path1" value (an address on the stack) instead of the allocated string pointed to by "path1". This caused the library to crash. Reported by Itay Perl
2012-06-18Add FALLOCATE operationAnatol Pomozov-0/+36
fallocate filesystem operation preallocates media space for the given file. If fallocate returns success then any subsequent write to the given range never fails with 'not enough space' error.
2012-04-10Add 'flag_utime_omit_ok' flag to fuse_operationsMiklos Szeredi-0/+27
If the filesystem sets this flag then ->utimens() will receive UTIME_OMIT and UTIME_NOW values as specified in utimensat(2).
2011-12-09Don't unhash name in FORGETMiklos Szeredi-2/+1
This resulted in ENOENT being returned for unlinked but still open files if the kernel sent a FORGET request for the parent directory. Discovered with fs_racer in LTP.
2011-12-09Fix hang in wait_on_path()Miklos Szeredi-3/+31
Ville Silventoinen reported that fs_racer in LTP triggered a hang in wait_on_path(). This bug was caused by try_get_path() not resetting "ticket" on permanent failure.
2011-12-08FUSE_NODE_SLAB buildfixEmmanuel Dreyfus-11/+11
When FUSE_NODE_SLAB is not defined, the build fails because of undefined functions. Attached patch fixes the problem.
2011-08-24add lru for remember optiontherealneworld@gmail.com-41/+89
Use LRU list for cleaning up the cache if the "remember=T" option was given.
2011-07-06Add ->flock() operation to low and high level interfacesMiklos Szeredi-0/+44
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-8/+177
This works similar to "noforget" except that eventually the node will be allowed to expire from the cache.
2011-05-19Add ->forget_multi() operationMiklos Szeredi-4/+22
Add ->forget_multi() operation to the lowlevel API. The filesystem may implement this to process multiple forget requests in one call
2011-03-30Initialize an allocated, but uninitialized memoryLaszlo Papp-1/+1
2011-03-30Remove unnecessary variable assignmentMiklos Szeredi-1/+0
2011-03-30Fix use after free if fuse_reply...() returned ENOENTMiklos Szeredi-6/+0