Age | Commit message (Collapse) | Author |
|
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
* src/fuse_i.h (FUSE_OP_CALL): Output function names to debug.
|
|
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).
|
|
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.
|
|
Use the utimens fuse operation if present, otherwise fall back on utime.
* src/netfs.c (netfs_attempt_utimes): Use the utimes op.
|
|
* 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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
* .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.
|
|
* 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.
|
|
To fix fuse detection in various configure.ac application scripts.
* src/main.c (fuse_main): New function
|
|
|
|
changed it to not call test_allow_root_or_other in that case
|
|
integers
|
|
|
|
|
|
|
|
therefore EIEIO out in case they're called
|
|
|
|
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.
|
|
renamed to fuse_ops_compat22 (to make room for 2.5 api functions).
|
|
latter available to users (mainly needed for the python bindings)
|
|
directory.
|
|
|