summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2024-09-01Add missing inclusion of assert.hlibfuse/masterSamuel Thibault
2024-09-01Add missing const qualifiersSamuel Thibault
2013-03-30Switch from __thread to pthread_key_t for fuse_contextlibfuse/pinotree/fuse-improvements/masterPino Toscano
This allows to properly cleanup the per-thread context. * src/fuse_i.h (libfuse_ctx): Remove declaration. * src/main.c (libfuse_ctx): Remove variable. (libfuse_ctx_key): New variable. (fuse_destroy_context): New function. (fuse_create_key): Likewise. (fuse_new): Use fuse_get_context instead of libfuse_ctx. (fuse_get_context): Create fuse_create_key only once. Allocate a new struct fuse_context if needed, and return it. * src/netfs.c (update_context_struct): Use fuse_get_context instead of libfuse_ctx.
2013-03-24Fix context and user data handling at init timePino Toscano
Make sure, using an helper function, to have an existing context before calling the init fuse operation. Also, the USER_DATA arg of fuse_new must be set as new PRIVATE_DATA in the fuse context before calling the init fuse operation. * src/fuse_i.h (struct iouser): New forward declaration. (struct fuse): Remove field 'user_data'. (update_context_struct): New function. * src/main.c (fuse_new): Update LIBFUSE_CTX correctly before and after calling init. * src/netfs.c (refresh_context_struct): Call refresh_context_struct. (update_context_struct): New function, mostly derived from refresh_context_struct. Update CTX->FUSE and CTX->PRIVATE_DATA correctly.
2013-03-23Fix return values of some FUSE_OP_CALLPino Toscano
errno values returned by fuse operations are negative; thus turn them positive. * src/netfs.c (netfs_attempt_write, netfs_attempt_read, get_dirents_readdir): Negate FUSE_OP_CALL return values.
2013-03-23Trace FUSE_OP_CALL calls to debugPino Toscano
* src/fuse_i.h (FUSE_OP_CALL): Output function names to debug.
2013-03-23Fix readlinkPino Toscano
Instead of passing to the readlink operation a maximum size of INT_MAX, pass a better size based on the actual stat information. * src/netfs.c (netfs_attempt_readlink): Fix size arg of FUSE_OP_CALL(readlink).
2013-03-23Implement the dummy fuse_invalidatePino Toscano
Even if it is a dummy function which does nothing and always returns -EINVAL (as stated in its documentation), implement it for the benefit of bindings. * src/main.c (fuse_invalidate): New function.
2013-03-23netfs utimes: use the utimens operation if presentPino Toscano
Use the utimens fuse operation if present, otherwise fall back on utime. * src/netfs.c (netfs_attempt_utimes): Use the utimes op.
2013-03-23Bump to compatibility version 26 and compile with itPino Toscano
* fuse.pc.in (Version): Set to 2.6.5. * src/fuse_i.h [!defined FUSE_USE_VERSION] (FUSE_USE_VERSION): Set to 26. (struct fuse): In field 'op', change type of field 'ops25' and add field 'ops'. Add fields 'conn' and 'user_data'. (FUSE_OP_HAVE, FUSE_OP_CALL): Use ops instead of ops25. * src/main.c: Add FUSE_SYMVER for fuse_main_real_compat25, fuse_new_compat25, fuse_mount_compat25. (fuse_main_real): New arg USER_DATA. (fuse_main_real_compat25): New function. (fuse_new): Change arg FD to CH, and add arg USER_DATA. Fill more fields in NEW. (fuse_new_compat25): New function. (fuse_mount): Change return value to 'struct fuse_chan *'. (fuse_mount_compat25): New function.
2013-03-23Synchronize headers, examples and version script with FUSE 2.6.5Pino Toscano
Update the headers from FUSE 2.6.5, import the examples and update the version script. This temporarly breaks compilation. * configure.ac (AC_CONFIG_FILES): Add example-26/Makefile. * example-26/.gitignore: New file. * example-26/Makefile.am: Likewise. * example-26/fusexmp.c: Likewise. * example-26/fusexmp_fh.c: Likewise. * example-26/hello.c: Likewise. * example-26/hello_ll.c: Likewise. * example-26/null.c: Likewise. * include/Makefile.am (fuseinclude_HEADERS): Add fuse_common_compat.h. * include/fuse.h: Update from FUSE 2.6.5. * include/fuse_common.h: Likewise. * include/fuse_compat.h: Likewise. * include/fuse_opt.h: Likewise. * include/fuse_common_compat.h: Import from FUSE 2.6.5. * Update from FUSE 2.6.5.
2013-03-22Add a FUSE_SYMVER macroPino Toscano
Introduce a FUSE_SYMVER macro which, much like its equivalent implementation in FUSE, will be used to easily add and track .symver aliases. * src/fuse_i.h (FUSE_SYMVER): New macro.
2013-03-22Increase the SO VERSION to 1.0.0Pino Toscano
The fuse_* functions for compatibility < 25 were removed; plus, the version script hid all the symbols except the public FUSE symbols plus netfs_* symbols. * src/Makefile.am (libfuse_la_LDFLAGS): Change version-number to 1:0:0.
2013-03-22version script: export the netfs symbolsPino Toscano
Change the linked version script to export the netfs_* symbols, needed by libnetfs. A "libfuse" tag was needed because of recent binutils not supporting anonymous tags [1]; on the other hand, this gives no issues. [1] http://sourceware.org/bugzilla/show_bug.cgi?id=12548 * src/fuse_versionscript (libfuse: global): New version set. Add netfs_* symbols here.
2013-03-22Import the ld version script from FUSE 2.5.xPino Toscano
Copy and use the version script for the linker from FUSE 2.5.x; with this, it is possible to properly provide the compat functions in an ABI-compatible way. Note this temporarly breaks translators since the netfs_* symbols implemented in libfuse are now hidden. * src/Makefile.am (libfuse_la_LDFLAGS): Use fuse_versionscript. * src/fuse_versionscript: New file.
2013-03-22Create and use a fuse structPino Toscano
Introduce a fuse struct and use it to hold a copy of the fuse_operation and their version, and the private data returned by init. * src/fuse_i.h (struct fuse): New. (fuse_ops25): Remove. (libfuse_fuse): New. (FUSE_OP_HAVE, FUSE_OP_CALL): Use libfuse_fuse. (fsys_privdata): Remove. * src/main.c (fuse_ops25): Remove. (libfuse_fuse): New. (fsys_privdata): Remove. (fuse_new): Create and fill a fuse struct. (fuse_loop): Reject null F instead of anything but FUSE_MAGIC. Set LIBFUSE_FUSE as F. (fuse_loop_mt_proc): Likewise. (fuse_demuxer): Use libfuse_fuse. (fuse_process_cmd): Reject null F instead of anything but FUSE_MAGIC. * src/netfs.c (refresh_context_struct): Use libfuse_fuse.
2013-03-22Remove support for FUSE compatibility < 25Pino Toscano
While the default FUSE_USE_VERSION is 21, compatibility versions below 25 are rarely (if at all) used; keeping support for them is not worth, especially than they require a number of special casings all around (different fuse_operations and fuse_file_info). * src/fuse_i.h (fuse_ops_compat22, fuse_ops_compat2): Remove. (FUSE_OP_HAVE, FUSE_OP_CALL): Use only fuse_ops25. (FUSE_OP_HAVE22, FUSE_OP_CALL22): Remove. (NN_INFO, NN_INFO_APPLY): Use only info25. (struct netnode): Remove field 'compat22' in field union 'info'. * src/main.c (fuse_ops_compat22, fuse_ops_compat2, fuse_main_compat2) (fuse_main_compat2, fuse_main_real_compat22, fuse_new_compat2) (fuse_new_compat22, fuse_mount_compat22): Remove. * src/netfs.c (netfs_attempt_statfs, netfs_attempt_sync, netfs_attempt_write) (netfs_attempt_read, fuse_get_inode, get_dirents_getdir, get_dirents_readdir) (netfs_get_dirents): Use only FUSE_OP_CALL and FUSE_OP_HAVE. (get_dirents_getdir_helper_compat): Remove. * src/netnode.c (fuse_sync_filesystem): Use only FUSE_OP_CALL and NN_INFO.
2013-03-21Initialize correctly new netnode instancesPino Toscano
A couple of variables were left uninitialized, leading to unlink (wrongly) nodes. Switch to calloc to make sure everything is properly reset. * src/netnode.c (fuse_make_netnode): Use calloc instead of malloc.
2013-03-19Convert .cvsignore files to .gitignorePino Toscano
* .gitignore: New file, mostly copied from .cvsignore. * example-22/.gitignore: New file. * example-23/.gitignore: Likewise. * example-24/.gitignore: Likewise. * example-25/.gitignore: Likewise. * .cvsignore: Remove file. * example-22/.cvsignore: Likewise. * example-23/.cvsignore: Likewise. * example-24/.cvsignore: Likewise. * example-25/.cvsignore: Likewise. * example/.cvsignore: Likewise. * include/.cvsignore: Likewise. * include/old/.cvsignore: Likewise. * src/.cvsignore: Likewise.
2013-02-11Fix build against libpthreadSamuel Thibault
* configure.ac: Link against libpthread instead of libthreads. * fuse.pc.in: Likewise. * src/fuse_i.h (libfuse_ctx): Declare TLS variable. (netnode): Turn lock field from struct mutex to pthread_mutex_t. * src/main.c (libfuse_ctx): Define TLS variable. (fuse_get_context): Use libfuse_ctx instead of cthreads TSD. * src/netfs.c: Likewise. Use pthread functions instead of cthreads functions. Use fixed stat structure. * src/netnode.c: Likewise. * src/node.c: Likewise.
2012-04-15Provide a fuse_main functionSamuel Thibault
To fix fuse detection in various configure.ac application scripts. * src/main.c (fuse_main): New function
2006-08-07ignore fsname fuse optionStefan Siegl
2006-08-05netfs_attempt_syncfs is called with cred==NULL on filesystem shutdown, ↵Stefan Siegl
changed it to not call test_allow_root_or_other in that case
2006-08-05changed hashing algo to use some prime magic, fixed routines to use unsigned ↵Stefan Siegl
integers
2006-08-04added support for libfuse 2.5 apiStefan Siegl
2006-08-04added -f switch, to force foreground operation, unless started using settransStefan Siegl
2006-08-04added support for fuse contexts, including fuse_get_context functionStefan Siegl
2006-08-03added fuse_exit and fuse_exited stubs, actually we don't support them, ↵Stefan Siegl
therefore EIEIO out in case they're called
2006-08-03call open and release callbacks on read/write even in fuse_ops_compat2 modeStefan Siegl
2006-08-01If started without using settrans but with the mountpoint as first argument,Stefan Siegl
try to install ourselves using file_set_translator. fuse_parse_argv: Error out if more than one extra command line argument has been specified. Leave the extra argument in argv for further use by the caller.
2006-04-13pulled in headers from fuse 2.5.3 and added examples. fuse_ops variable ↵Stefan Siegl
renamed to fuse_ops_compat22 (to make room for 2.5 api functions).
2006-04-13split fuse_loop_mt into fuse_loop_mt_proc and fuse_process_cmd, to make the ↵Stefan Siegl
latter available to users (mainly needed for the python bindings)
2006-01-30moved headers into new include/ directory, sources moved into new src/ ↵Stefan Siegl
directory.
2006-01-30*** empty log message ***Stefan Siegl