aboutsummaryrefslogtreecommitdiffstats
path: root/lib/fuse.c
AgeCommit message (Collapse)AuthorLines
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
2011-03-30Fix a potential resource leakLaszlo Papp-1/+3
2011-03-30Use the return value for error checkLaszlo Papp-3/+2
2011-02-17Add -onoforget to help outputMiklos Szeredi-0/+1
2011-01-31Fix warning in hash calculationMiklos Szeredi-1/+1
Fix the following warning: fuse.c:436: warning: this decimal constant is unsigned only in ISO C90
2010-12-20Highlevel lib: add slab allocation for node cacheMiklos Szeredi-9/+180
This will allow the memory used by the filesystem to grow and shrink depending on how many inodes are currently cached.
2010-12-20inline short namesMiklos Szeredi-13/+16
In the high level library store names shorter than 32 characters inside "struct node". Longer names are allocated as previously.
2010-12-20Highlevel lib: allow hash tables to shrinkMiklos Szeredi-1/+77
Allow hash tables to shrink as well as grow.
2010-12-13Highlevel lib: use dynamically resized hash tableMiklos Szeredi-43/+153
Use dynamically resized hash table for looking up by name and node ID. The chosen implementation is linear hashing, which features gradual rehashing when while the size of the table increases.
2010-11-10add read_buf method to high level APIMiklos Szeredi-23/+73
Add a new read_buf() method to the highlevel API. This allows returning a generic buffer from the read method, which in turn allows zero copy reads.
2010-11-10add write_buf method to high level APIMiklos Szeredi-10/+55
Add new write_buf() method to the highlevel API. Similarly to the lowlevel write_buf() method, this allows implementing zero copy writes.
2010-11-08Fix st_nlink for unlinked but still open filesMiklos Szeredi-5/+9
Fix st_nlink value in high level lib if file is unlinked but still open
2010-08-27Add NetBSD supportMiklos Szeredi-6/+6
The bulk of it is just about adding ifdef __NetBSD__ where there is already an ifdef __FreeBSD__ Add a arch=netbsd to deal with NetBSD specifics. I suggests that arch=bsd could be renamed to arch=freebsd NetBSD specific linking with -lperfuse NetBSD patches to lib/mount.c. It turned to be less itrusive to patch mount;c than mount_bsd.c. I suggest mount_bsd.c could be renamed to mount_freebsd.c Patch from Emmanuel Dreyfus
2010-06-15* Add a nopath option and flag, indicating that path argumentMiklos Szeredi-26/+70
need not be calculated for the following operations: read, write, flush, release, fsync, readdir, releasedir, fsyncdir, ftruncate, fgetattr, lock, ioctl and poll.
2009-08-25Fix missing versioned symbol fuse_get_context@FUSE_2.2Miklos Szeredi-0/+12
2009-07-02* The context is extended with a 'umask' field. The umask is sentMiklos Szeredi-5/+10
for mknod, mkdir and create requests by linux kernel version 2.6.31 or later, otherwise the umask is set to zero. Also introduce a new feature flag: FUSE_CAP_DONT_MASK. If the kernel supports this feature, then this flag will be set in conn->capable in the ->init() method. If the filesystem sets this flag in in conn->want, then the create modes will not be masked. * Add low level interfaces for lookup cache and attribute invalidation. This feature is available in linux kernels 2.6.31 or later. Patch by John Muir * Kernel interface version is now 7.12
2009-06-19Add fuse_getgroups (high level lib) and fuse_req_getgroups (lowMiklos Szeredi-0/+6
level lib) functions to query the supplementary group IDs for the current request. Currently this is implemented on Linux by reading from the /proc filesystem.
2009-06-18CUSE patches from Tejun Heo (add new files)Miklos Szeredi-3/+51
2009-06-18CUSE patches from Tejun HeoMiklos Szeredi-17/+11
2009-05-27Don't call forget_node() if the lookup was negative and write()Miklos Szeredi-2/+5
for the reply returned ENOENT. Reported by John Haxby
2009-05-08Fix missing newlines in some printfsMiklos Szeredi-5/+5
2008-12-08* Implement poll support. Patch by Tejun HeoMiklos Szeredi-0/+51
2008-12-05* Implement ioctl support. On high level interface onlyMiklos Szeredi-0/+67
"restricted" ioctls are supported (which are defined with the _IO(), _IOR(), _IOW() or _IOWR() macros). Unrestricted ioctls will only be allwed to CUSE (Character Device in Userspace) servers. Patch by Tejun Heo
2008-10-14Pass current file flags to read and write operationsMiklos Szeredi-4/+8
2008-07-24Clean up debug output in highlevel libMiklos Szeredi-136/+332