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.
|
|
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).
|
|
Use the utimens fuse operation if present, otherwise fall back on utime.
* src/netfs.c (netfs_attempt_utimes): Use the utimes op.
|
|
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.
|
|
* 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.
|
|
changed it to not call test_allow_root_or_other in that case
|
|
|
|
|
|
|
|
renamed to fuse_ops_compat22 (to make room for 2.5 api functions).
|
|
directory.
|