Age | Commit message (Collapse) | Author | Lines |
|
libfuse-3.17 introduced several functions that should only be called via
inlined helper functions, never directly. To enforce this, these functions
were declared within the inlined functions. However, this triggers the
compiler warning "-Werror=nested-externs".
While this warning is valid, the nested declarations were intentional to
prevent direct usage of these functions. Rather than suppressing the
warning with pragmas, move these function declarations outside the helper
functions while maintaining the intended access restrictions through other
means.
Closes: https://github.com/libfuse/libfuse/issues/1134
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
Another additon for https://github.com/libfuse/libfuse/issues/1092
Use _fuse_new_versioned() instead of _fuse_new_317 and actually
also remove symbol versioning for it - we don't need it.
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
|
|
Acidentally the wrong non-existing function was ccalled.
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
|
|
As suggested by Bill in Issue #1092 make fuse_main a macro again,
just in case some applications expect it to be a macro.
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
|
|
As suggested by Bill in Issue #1092, rename to _versioned
so that applications using dlopen/dlvsym better understand
the meaning of this function.
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
|
|
Addresses https://github.com/libfuse/libfuse/issues/1092
We actually don't need to make fuse_main_real() symboled, as it
is not part of the official API.
The inlined function now always calls into fuse_main_real_317
and the compat ABI function (which should also be available
for dlopen/dlsym) is now always compiled, independent if the
compiler/linker support versioned symbols.
Additionally, fuse_main_real() is also declared as inlined
function and a warning message is created when that function
is called.
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
|
|
_fuse_new() is not supposed to be called by external users
outside of internal functions or static inlined functions.
This also removes several functions from lib/fuse_versionscript
which where added and exported by
commit 58f85bfa9b7d ("Add in the libfuse version a program...)
as these are libfuse internal only.
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
|
|
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
|
|
Enforce 32-bit integers for struct fuse_config and
add future ABI fields to that struct.
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
|
|
This fixes commit
dad15aee26835 "Add no_rofd_flush mount option"
and restores the ABI by moving the no_rofd_flush field.
Given that there were already several releases with this commit
we will still need an so version bump.
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
|
|
This fixes commit
a5eb7f2 "Enable parallel direct writes on the same file"
and restores the ABI by moving the parallel_direct_writes
bit.
Given that there were already several releases with this commit
we will still need an so version bump.
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
|
|
These are not all ABI sensitive data structures yet.
Also some space vs tab indentation issues are corrected.
|
|
dmask: umask applied to directories
fmask: umask applied to non-directories
to get "typical" permission bits for regular files (0644) and directories (0755), a single
umask option is not sufficient (or well, it isn't the way fuse implements it)
there is precident for separate umask and dmask options in other
filesystems (see for example fat: https://github.com/torvalds/linux/tree/master/fs/fat)
this addition should not affect backward-compatibility; the original
umask option retains the same meaning, but non-zero fmask or
dmask will override it.
|
|
The API stays the same, the libfuse version comes from
inlined functions, which are defined fuse_lowlevel.h
and fuse.h. As these inlined functions are defined in the header
files they get added into the application, similar as if these
were preprocessor macros.
Macro vs inlined function is then just a style issue - I personally
prefer the latter.
fuse_session_new() -> static inlinei, in the application
_fuse_session_new -> inside of libfuse
fuse_new() -> static inline, in the application
_fuse_new() -> inside of libfuse
Note: Entirely untested is the fuse 30 api - we need a test
for it. And we do not have any ABI tests at all.
Signed-off-by: Bernd Schubert <bernd.schubert@fastmail.fm>
|
|
In order to use the fuse_fill_dir_t function in a C++ program, add the enum item:
FUSE_FILL_DIR_DEFAULTS
Without this change g++ compilation failed with
example/hello.c:94:35: error: invalid conversion from ‘int’ to ‘fuse_fill_dir_flags’ [-fpermissive]
94 | filler(buf, ".", NULL, 0, 0);
| ^
| |
| int
|
|
|
|
Before:
```
$ doxygen doc/Doxyfile
/Users/matthias/prog/fuser/libfuse/include/fuse.h:934: warning: argument 'private_data' of command @param is not found in the argument list of fuse_new_31(struct fuse_args *args, const struct fuse_operations *op, size_t op_size, void *user_data)
/Users/matthias/prog/fuser/libfuse/include/fuse.h:934: warning: The following parameter of fuse_new_31(struct fuse_args *args, const struct fuse_operations *op, size_t op_size, void *user_data) is not documented:
parameter 'user_data'
```
|
|
Right now fuse kernel serializes direct writes on the
same file. This serialization is good for such FUSE
implementations which rely on the inode lock to
avoid any data inconsistency issues but it hurts badly
such FUSE implementations which have their own mechanism
of dealing with cache/data integrity and can handle
parallel direct writes on the same file.
This patch allows parallel direct writes on the same file to be
enabled with the help of a flag FOPEN_PARALLEL_DIRECT_WRITES.
FUSE implementations which want to use this feature can
set this flag during fuse init. Default behaviour remains
same i.e no parallel direct writes on the same file.
Corresponding fuse kernel patch(Merged).
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v6.2&id=153524053bbb0d27bb2e0be36d1b46862e9ce74c
|
|
This addresses https://github.com/libfuse/libfuse/issues/729
commit db35a37def14b72181f3630efeea0e0433103c41 introduced a public
config.h (rename to fuse_config.h to avoid conflicts) that
was installed with the package and included by libfuse users
through fuse_common.h. Probablem is that this file does not have
unique defines so that they are unique to libfuse - on including
the file conflicts with libfuse users came up.
In principle all defines could be prefixed, but then most of them
are internal for libfuse compilation only. So this splits out
publically required defines to a new file 'libfuse_config.h'
and changes back to include of "fuse_config.h" only when
HAVE_LIBFUSE_PRIVATE_CONFIG_H is defined.
This also renames HAVE_LIBC_VERSIONED_SYMBOLS to
LIBFUSE_BUILT_WITH_VERSIONED_SYMBOLS, as it actually
better explains for libfuse users what that variable
is for.
|
|
fuse_loop_mt and fuse_new had not been defined when
HAVE_LIBC_VERSIONED_SYMBOLS had not been set and additionally,
fuse_new_31 was missing in the version script and was therefore
an unusable symbol.
This also adds a test for unset HAVE_LIBC_VERSIONED_SYMBOLS.
|
|
If an application does not want to bother with the session
and wants to keep defaults, it can now just pass a NULL
as config parameter.
|
|
struct fuse_loop_config was passed as a plain struct, without any
version identifer. This had two implications
1) Any addition of new parameters required a FUSE_SYMVER for
fuse_session_loop_mt() and fuse_loop_mt() as otherwise a read
beyond end-of previous struct size might have happened.
2) Filesystems also might have been recompiled and the developer
might not have noticed the struct extensions and unexpected for
the developer (or people recomliling the code) uninitialized
parameters would have been passed.
Code is updated to have struct fuse_loop_config as an opaque/private
data type for file systems that want version 312
(FUSE_MAKE_VERSION(3, 12)). The deprecated fuse_loop_config_v1
is visible, but should not be used outside of internal
conversion functions
File systems that want version >= 32 < 312 get the previous
struct (through ifdefs) and the #define of fuse_loop_mt
and fuse_session_loop_mt ensures that these recompiled file
systems call into the previous API, which then converts
the struct. This is similar to existing compiled applications
when just libfuse updated, but binaries it is solved with
the FUSE_SYMVER ABI compact declarations.
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
|
|
To disable flush for read-only fd.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
|
|
When directories with open handles are removed, the releasedir and
fsyncdir operations might be called with a NULL path. That is because
there is no hiding behavior like for regular files and the nodes get
removed immediately.
|
|
Some parameters were undocumented, and @file does not mean to expand current file name.
|
|
|
|
|
|
* Add fallocate to list of operations that may omit path.
* earlier versions is 10+ years old.
Document is not obvious how old it is. Add it.
* Update manpage link
|
|
copy_file_range was first implemented with copy-based emulation in
glibc 2.27, but the emulation was subsequently removed again because
correct emulation depends on why the application attempted to make a
copy. Therefore, file systems cannot rely on low-level userspace
performing emulation.
|
|
They are illegal in C89/90.
|
|
|
|
Define FUSE_USE_VERSION < 35 to get old ioctl prototype
with int commands; define FUSE_USE_VERSION >= 35 to get
new ioctl prototype with unsigned int commands.
Fixes #463.
|
|
|
|
See issue #389 for some related discussions.
|
|
Instead of the Posix ioctl(2) command, Linux uses its own variant of ioctl()
in which the commands are requested as "unsigned long" and truncated to
32 bits by the fuse kernel module. Transmitting the commands to user space
file systems as "unsigned int" is a workaround for processing ioctl()
commands which do not fit into a signed int.
|
|
Fixes: #373
|
|
Add support for the relatively new copy_file_range() syscall. Backend
filesystems can now implement an efficient way of cloning/duplicating
data ranges within files. See 'man 2 copy_file_range' for more details.
|
|
The unprivileged option allows to run the FUSE file system process
without privileges by dropping capabilities and preventing them from
being re-acquired via setuid / fscaps etc. To accomplish this,
mount.fuse sets up the `/dev/fuse` file descriptor and mount itself
and passes the file descriptor via the `/dev/fd/%u` mountpoint syntax
to the FUSE file system.
|
|
Return different error codes from fuse_main()
|
|
|
|
the filehandle from opendir is passed to releasedir - there is no
closedir function in fuse_operations
|
|
Callers do (and should) use ;.
|
|
Fix spelling errors
|
|
|
|
We re-introduce the functionality of invalidating the caches for an
inode specified by path by adding a new routine
fuse_invalidate_path. This is useful for network-based file systems
which use the high-level API, enabling them to notify the kernel about
external changes.
This is a revival of Miklos Szeredi's original code for the
fuse_invalidate routine.
|
|
|
|
|
|
This function shouldn't be called when using a newer fuse
version, so we should not define it in that case.
|
|
|