Age | Commit message (Collapse) | Author | Lines |
|
Also add FUSE_CAP_OVER_IO_URING
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
Unfortunately while cross-compiling with build tools like Buildroot it
happens to have repeated flags or anything that could lead to a warning.
This way the check fails because of a warning not related to the special
function. So let's use cc.links() and increase minimum meson_version to
0.60 since cc.links() has been added during that version.
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
|
|
Several meson tests were incorrectly failing
Checking for function "static_assert" : NO (cached)
Checking for function "pthread_setname_np" : NO (cached)
Check usable header "#include <linux/close_range.h>" : NO (cached)
These functions get now tested with compilation tests
and get found on my system.
Checking if "static_assert check" compiles: YES
Checking if "pthread_setname_np check" compiles: YES
Checking if "close_range check" compiles: YES
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
The test had multiple issues
- default passthrough_ll timeout was used - the created
file was then not listed if timeout was not passed
yet
- mnt_name was actually point to src_dir, file comparison
of stat, etc succeeded, because the same file was compared.
Switching to the right dir made stat to always fail,
because st_dev is different for source and mount.
I.e. the test must not compare all stat values.
Not sure how this test ever passed, but in a very slow
debug VM with lots of kernel debug options enabled,
the default passthrough_ll timeout it systematically
failed.
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
Issue with previous code was that fuse_session_exit()
didn't wake up the semaphore in fuse_loop_mt.c.
Lock, semaphore and all uses of checking for "exited"
are now moved to struct fuse_session to have it
available for the signal handler.
This also removes internal fuse_session_reset() calls,
as that makes testing hard. From git history I also
don't see why it was added.
Closes: https://github.com/libfuse/libfuse/issues/997
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
Commit dae1184 ("Add syslog and fatal signal handler feature")
added fuse_set_fail_signal_handlers() which can store
"se". But as fuse_set_signal_handlers() also stores the object
storing it was made conditionally if not set already.
As per https://github.com/libfuse/libfuse/issues/1182 this
breaks some applications like osspd, that have multiple
sessions and rely on the right order and that the last
call of fuse_set_signal_handlers() wins.
Special thanks to Sébastien Noel to debug this issue.
Closes: https://github.com/libfuse/libfuse/issues/1182
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
|
|
Signed-off-by: swj <1186093704@qq.com>
|
|
Since pthread_setname_np() is the only pthread function that requires NPTL
and it basically only set thread name, let's check if pthread_setname_np()
does exist, otherwise let's not call pthread_setname_np() to shrink
dependencies.
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
|
|
The high-level interface triggers flag conversion twice: once in the
high-level init and once in the low-level init. This caused false
"both 'want' and 'want_ext' are set" errors when using
fuse_set_feature_flag() or fuse_unset_feature_flag().
The existing check for duplicate conversion only worked when 32-bit
flags were set directly. When using the preferred flag manipulation
functions, conn->want and the lower 32 bits of conn->want_ext
would differ, triggering the error.
Fix this by synchronizing conn->want with the lower 32 bits of
conn->want_ext after conversion, ensuring consistent state for
subsequent calls.
Closes: https://github.com/libfuse/libfuse/issues/1171
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
For kernel development it might be necessary to load a module with
renamed symbols and renamed /dev/<devicenode>. Reason is that for
example ubuntu kernels have fuse compiled in and it is not possible
to replace it at run time. And fuse might also be used for other file
systems - a different device node is then needed. Also consolidate
device path handling and remove unnecessary string duplication in
mount_fuse() in fusermount.c.
Signed-off-by: Meng Lu Wang <mwang@ddn.com>
|
|
Newer gccs now use -Werror=redundant-decls which means that anyone
including fuse.h is getting an error of:
/usr/include/fuse3/fuse.h:959:5: error: redundant redeclaration of ‘fuse_main_real_versioned’ [-Werror=redundant-decls]
959 | int fuse_main_real_versioned(int argc, char *argv[],
| ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/fuse3/fuse.h:885:5: note: previous declaration of ‘fuse_main_real_versioned’ with type ‘int(int, char **, const struct fuse_operations *, size_t, struct libfuse_version *, void *)’ {aka ‘int(int, char **, const struct fuse_operations *, long unsigned int, struct libfuse_version *, void *)’}
885 | int fuse_main_real_versioned(int argc, char *argv[],
| ^~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
|
|
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.13 to 3.28.15.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/1b549b9259bda1cb5ddde3b41741a82a2d15a841...45775bd8235c68ba998cffa5171334d58593da47)
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-version: 3.28.15
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
|
|
These are several buf size fixes
1) Set bufsize when HAVE_SPLICE is not defined. Addresses
https://github.com/libfuse/libfuse/issues/1184
2) Check in the read retry condition for bufsize, i.e. the value
passed to read and not for the buf->mem_size. Using buf->mem_size
can be startup racy. Additionally we now also set bufsize on
allocation to avoid these races.
3) Allocation and value assigned needs to follow the pattern
bufsize = se->bufsize;
buf_alloc(bufsize, internal)
buf->mem_size = bufsize;
I.e. bufsize has to be retrieved first, as se->bufsize might
change at anytime - the value used for allocation and
must not differ from the value actually used.
This also tries to set large sizes in passthrough_hp, to catch
issues in xfstests - though requires to set
/proc/sys/fs/fuse/max_pages_limit
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
Default is having usdt disabled.
Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
|
|
At the moment build fails due to lack of static_assert:
https://gitlab.com/jolivain/buildroot/-/jobs/9606292537
this means that the check per date is not enough, so let's use meson to
check if static_assert() is present or not and simplify
fuse_static_assert() definition by only checking HAVE_STATIC_ASSERT.
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
|
|
linux/close_range.h is only available since kernel 5.9 and
https://github.com/torvalds/linux/commit/60997c3d45d9a67daf01c56d805ae4fec37e0bd8
resulting in the following build failure:
../util/fusermount.c:40:10: fatal error: linux/close_range.h: No such file or directory
So let's check for header presence and emit HAVE_LINUX_CLOSE_RANGE_H
accordingly and check for it when including <linux/close_range.h> and
calling close_range() instead of checking for close_range() function in
meson and check against HAVE_CLOSE_RANGE.
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
|
|
Add example bpftrace file for monitoring tracepoints.
Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
|
|
Add user statically-defined tracepoints for request lifecycle.
Verified by:
[machine]$ readelf -n /home/libfuse/build/lib/libfuse3.so | grep -A 1000 '.note.stapsdt'
Displaying notes found in: .note.stapsdt
Owner Data size Description
stapsdt 0x00000035 NT_STAPSDT (SystemTap probe descriptors)
Provider: libfuse
Name: request_receive
Location: 0x0000000000016360, Base: 0x00000000000002fc, Semaphore: 0x0000000000000000
Arguments: -4@%edi
stapsdt 0x00000055 NT_STAPSDT (SystemTap probe descriptors)
Provider: libfuse
Name: request_reply
Location: 0x0000000000017c0f, Base: 0x00000000000002fc, Semaphore: 0x0000000000000000
Arguments: 8@8(%r12) 4@(%r12) -4@4(%r12) -4@%r13d
stapsdt 0x0000003e NT_STAPSDT (SystemTap probe descriptors)
Provider: libfuse
Name: request_process
Location: 0x000000000001acf7, Base: 0x00000000000002fc, Semaphore: 0x0000000000000000
Arguments: 4@%r8d 4@%edx
Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
|
|
Copy over usdt.h from [1] as part of the prepatory work for adding
tracepoints for requests.
[1] https://github.com/libbpf/usdt
Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
|
|
When building FUSE3 with Meson on CentOS 8, the fuse3.pc file gets
installed in /usr/local/lib64/pkgconfig. Since pkg-config doesn't search
this path by default, GCC compilation fails due to missing FUSE3 flags.
This patch adds an instruction for setting PKG_CONFIG_PATH variable in
README.compile to fix GCC compilation issues.
Signed-off-by: izxl007 <zeng.zheng@zte.com.cn>
|
|
When building and installing FUSE3 using Meson on CentOS8, the fuse3.pc
file is installed in the /usr/local/lib64/pkgconfig directory. However,
pkg-config does not search for fuse3.pc in this directory, leading to GCC
compilation failures.
This patch improves the compilation comments, helping users successfully
execute the GCC command.
Signed-off-by: izxl007 <zeng.zheng@zte.com.cn>
|
|
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.11 to 3.28.13.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/6bb031afdd8eb862ea3fc1848194185e076637e5...1b549b9259bda1cb5ddde3b41741a82a2d15a841)
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
|
|
Thes commits have the habit to persistently fail, mostly
with long lines. We don't have control over these commits,
so let's ignore them.
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
|
|
32-bit conn->want flags been left to be ABI compatible to 3.10,
even though the so version was changed.
The more recent way is to use fuse_set_feature_flag(),
which will use conn->want_ext.
Given that we now have two flags (want and want_ext), we need
to convert and that brought several issues
- If the application sets conn->want, that needs to be set into
the lower 32 bit of conn->want_ext. As the application might
actually unset values, it really has to be a copy and not
just 'or' - fixed now.
- convert_to_conn_want_ext() actually needs to check for
_modified_ conn->want and conn->want_ext
- convert_to_conn_want_ext() must consider being called from
high and lowlevel interfact, with different want_ext_default
and want_default values. It is only a failure, if the application
changed both, conn->want and conn->want_ext. This function
was failing in issue #1171, because high level fuse_fs_init()
was changing values and then lowlevel do_init() was incorrectly
failing on that.
This also adds a new test (test_want_conversion) and sets
values into example/{hello.c,hello_ll.c}
Also some more internal users of conn->want are converted to
fuse_{set,unset}_feature_flag().
Closes: https://github.com/libfuse/libfuse/issues/1171
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
|
|
The file is going to be updated - should be more conform
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
|
|
This is to avoid checkpatch reports and might potentially
avoid future issues if these macros would be part of
conditions.
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
|
|
Closes: https://github.com/libfuse/libfuse/issues/1168
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
|
|
We have a non ideal configuration for different editors.
The project uses linux style - emacs config should also
correspond to that.
Taken from
https://www.kernel.org/doc/html/v6.13/process/coding-style.html#you-ve-made-a-mess-of-it
with the attempt to update for c++.
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
|
|
Redirect stdin/stdout/stderr to /dev/null to prevent newly opened
file descriptors from reusing these low numbers (0,1,2) and
potential issues with that.
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
se->buf_reallocable is true when reading /dev/fuse is handled
from internal functions - we can set the variable in
fuse_session_receive_buf_internal(). With that we also
don't need to have it an _Atomic variable anymore.
In _fuse_session_receive_buf() we can use "bool internal"
to check if the buffer can be re-allocated.
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
This fixes dynamic buffer allocation in commit
0e0f43b79b9b ("Reallocate fuse_session buffer...")
I noticed that when I increased the default fuse buf size as
possible in recent kernels.
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
Some applications use that for detection of features between
distributions/libfuse version.
Closes: https://github.com/libfuse/libfuse/issues/1163
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
Added PanFSto whitelist. This should allow us to mount gocryptfs onto the parallel filesystem.
Signed-off-by: Jacob Riley <jnr0006@uah.edu>
|
|
The main goal of this new file is to warn about the deadlocking risks when
using the out-of-band notify operations while replying to other requests.
Signed-off-by: Luis Henriques <luis@igalia.com>
|
|
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.9 to 3.28.11.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0...6bb031afdd8eb862ea3fc1848194185e076637e5)
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
|
|
Accept up to 100 chars per line to silence more github action
updates.
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
|
|
ENOSYS is right for fuse, automatic github action updates
persistently run into sign-off-mismatch and commit-id
quoting persistently conflicts with long line warnings.
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
|
|
fuse_log_level is guaranteed to be the same as libc as syslog is
a network protocol and levels are numerical constants enforced in
RFCs. Syslog is originally BSD-only and was imported by glibc and
standardised in SUS and POSIX.
Use vsyslog rather than formatting a new intermediate string.
Signed-off-by: Vassili Tchersky <vt+git@vbc.su>
|
|
Don't spawn a setuid children with FD 1&2 closed.
Check status and not errno after posix_spawn(p).
Add comments to fix later error checking, as
posix_spawn(p) returns non-zero status only if
clone/vfork/rfork fails. If only setup (open, dup2)
or execve fails, the forked process exit with 127
but posix_spawn returns zero.
Signed-off-by: Vassili Tchersky <vt+git@vbc.su>
|
|
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
|
|
It should only run for pull requests. Indentation for the branch
to run on was also not right.
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
The branch is actually called fuse-3.17.x
Also disable checkpatch for branches except master, as
it is to do basic checks, while stable branches do not
need that check, assuming cherry-pick happens from master.
Issue with it is that persistently complains about dependabot
changes.
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
|
|
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
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>
|
|
Removed:
- <sys/user.h>: used to be for kinfo_proc, long gone from the code
- <paths.h>: used to be for _PATH_DEV and _PATH_DEVNULL, long gone
- <limits.h>: used to be for _POSIX2_LINE_MAX, long gone
- <sys/stat.h>: used to be for fstat/stat, long gone
Signed-off-by: Vassili Tchersky <vt+git@vbcy.org>
|
|
Log on unmount() and close() failure
Signed-off-by: Vassili Tchersky <vt+git@vbcy.org>
|
|
Use _exit() instead of exit() inside children
Signed-off-by: Vassili Tchersky <vt+git@vbcy.org>
|
|
These options never had any effect.
See https://svnweb.freebsd.org/base?view=revision&revision=347544
Signed-off-by: Vassili Tchersky <vt+git@vbcy.org>
|
|
The check on fd < 0 was recently removed. However, this check is important
as the content of FUSE_DEV_FD is passed as-is to mount_fusefs, and a string
beginning by '-' is treated as an option.
Additionally, add a proper include and type.
Signed-off-by: Vassili Tchersky <vt+git@vbcy.org>
|