Age | Commit message (Collapse) | Author | Lines |
|
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.16 to 3.28.17.
- [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/28deaeda66b76a05916b6923827895f2b14ab387...60168efe1c415ce0f5521ea06d5c2062adbeed1b)
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-version: 3.28.17
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
|
|
This adds the libfuse changes needed to support request timeouts.
A timeout may be set by the server in its init call. If a request is not
completed by the timeout, the connection will be aborted by the kernel.
Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
|
|
Sync include/fuse_kernel.h with the most up to date fuse
uapi headers in the kernel.
Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
|
|
Signed-off-by: izxl007 <zeng.zheng@zte.com.cn>
|
|
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.15 to 3.28.16.
- [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/45775bd8235c68ba998cffa5171334d58593da47...28deaeda66b76a05916b6923827895f2b14ab387)
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-version: 3.28.16
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
|
|
Refactor handler logic to make it more readable.
No functional changes.
Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
|
|
Also update the comment description of fuse_uring.c
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
So far it was disabled as the series was not complete
yet.
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
We want to especially test with and without io-uring being
enabled. Ideally without modifying all tests - that is
what the env variable can be used for.
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
This might be useful to optimize code paths. For example, with
io-uring the request buffer is valid until the request is replied
to, while without io-uring the request buffer is only valid
in current thread context.
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
Ensure it is correctly stored in an unsigned 32 bit int.
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
Not function yet, just preparation.
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
It will never be modified, should be const.
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
The actual function to write to /dev/fuse is offloaded
into _fuse_send_msg()
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
Avoid splattering the code with ifdef
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
Needed by follow up commits. container_of is actually
just moved/consolidated to util.h.
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
Header/payload separation is part of the fuse-io-uring protocol
and might be later on for /dev/fuse legacy communication as well.
This is a preparation commit, for now fuse_ll_ops2 is unused.
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
|
|
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>
|