aboutsummaryrefslogtreecommitdiffstats
path: root/lib/fuse.c
AgeCommit message (Collapse)AuthorLines
2016-10-24Added debug logging to chmodNikolaus Rath-1/+8
2016-10-24Fix segfault in debug logging codeNikolaus Rath-17/+32
fi may be NULL, so we need to protect against this.
2016-10-20Turn fuse_operations.nopath_flag into fuse_config.nullpath_okNikolaus Rath-5/+3
Modifying struct fuse_config in the init() handler is the canonical way to adjust file-system implementation specific settings. There is no need to have flags in struct fuse_operations.
2016-10-20fuse_new(): don't accept options that don't make sense for end-usersNikolaus Rath-6/+0
Several options (use_ino, etc) depend on the file system implementation. Allowing them to be set from the command line makes no sense.
2016-10-20Pass struct fuse_config to high-level init() handler.Nikolaus Rath-30/+4
2016-10-15Make --help output more suitable for end-userNikolaus Rath-10/+4
We now only list options that are potentially useful for an end-user (and unlikely to accidentally break a file system). The full list of FUSE options has been moved to the documentation of the fuse_new() and fuse_session_new() functions.
2016-10-15Removed -o nopath - it never did anythingNikolaus Rath-2/+0
We are overriding this setting with the flag in struct fuse_operations: $ example/hello -f -d ~/tmp/mnt FUSE library version: 3.0.0pre0 nopath: 0 unique: 1, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0 INIT: 7.25 flags=0x0007fffb max_readahead=0x00020000 INIT: 7.23 flags=0x00006031 max_readahead=0x00020000 max_write=0x00020000 max_background=0 congestion_threshold=0 time_gran=0 unique: 1, success, outsize: 80 $ example/hello -f -d ~/tmp/mnt -o nopath FUSE library version: 3.0.0pre0 nopath: 0 unique: 1, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0 INIT: 7.25 flags=0x0007fffb max_readahead=0x00020000 INIT: 7.23 flags=0x00006031 max_readahead=0x00020000 max_write=0x00020000 max_background=0 congestion_threshold=0 time_gran=0 unique: 1, success, outsize: 80
2016-10-15Pass fuse_file_info to getattr, chown, chmod, truncate, utimens handlersNikolaus Rath-83/+34
This obsoletes the ftruncate & fgetattr handlers. Fixes #58.
2016-10-15Unify handling of fuse_conn_info optionsNikolaus Rath-1/+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-2/+2
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-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