| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
Just a further sync with the in-kernel flags.
|
|
|
|
|
| |
It is better to tell the kernel that libfuse knows
about the 64 bit flag extension.
|
|
|
|
|
|
| |
Make passthrough_ll to display all its cmdline options
instead of keeping them hidden.
(I am not sure if these are intentionally kept hidden)
|
|
|
|
|
|
|
|
|
|
|
| |
In fuse kernel, 'commit 53db28933e95 ("fuse: extend init flags")'
made the changes to handle flags going beyond 32 bits but i think
changes were not done in libfuse to handle the same.
This patch prepares the ground in libfuse for incoming FUSE kernel
patches (Atomic open + lookup) where flags went beyond 32 bits.
It makes struct same as in fuse kernel resulting in name change of
few fields.
|
|
|
|
|
| |
passthrough_hp was not updated when splice got enabled by default in libfuse3.
I.e. the --nosplice option and condition on it was a noop.
|
|
|
|
|
|
| |
sfs_unlink may call do_lookup(), which increases the inode ref count,
but since that function does not return attributes that lookup ref
count won't get automatically decreased.
|
|\
| |
| | |
Fix fd leak with clone_fd
|
|/
|
|
|
|
|
| |
do_interrupt would destroy_req on the request without decrementing the
channel's refcount. With clone_fd this could leak file descriptors if
the worker thread holding the cloned fd was destroyed. (Only
max_idle_threads are kept).
|
|\
| |
| | |
Add support for FOPEN_NOFLUSH flag
|
| |\
| |/
|/| |
|
| |
| |
| | |
The cap for FUSE_CAP_WRITEBACK_CACHE was printed twice.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When returning a negative error code by ->ioctl() to the high level
interface, no error is propagated to the low level, and the reply
message to the kernel is shown as successful.
A negative result is however returned to kernel, so the kernel can
detect the bad condition, but this appears to not be the case since
kernel 5.15.
The proposed fix is more in line with the usual processing of errors
in fuse, taking into account that ioctl(2) always returns a non-negative
value in the absence of errors.
Co-authored-by: Jean-Pierre André <jpandre@users.sourceforge.net>
|
| |
| |
| | |
This makes the file more readable with syntax highlighting.
|
| |
| |
| |
| | |
the kernel (#636)
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Simulate write() delay and verify that close(rofd) does not
block waiting on pending writes.
The support for the flag was added in kernel v5.16-rc1.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
|
| |
| |
| |
| |
| |
| | |
To disable flush for read-only fd.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
|
|/
|
|
|
|
|
|
|
|
|
| |
Allow requesting from kernel to avoid flush on close at file open
time. If kernel does not support FOPEN_NOFLUSH flag, the request
will be ignored.
For passthrough_hp example, request to avoid flush on close when
writeback cache is disabled and file is opened O_RDONLY.
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test test/test_examples.py::test_passthrough_hp[False] fails because, on
kernels >= 5.14, fstat() will return -EBADF:
3 [check_unlinked_testfile] fcheck_stat() - fstat: Bad file descriptor
4 [check_unlinked_testfile] fcheck_stat() - fstat: Bad file descriptor
5 [check_unlinked_testfile] fcheck_stat() - fstat: Bad file descriptor
9 [check_unlinked_testfile] fcheck_stat() - fstat: Bad file descriptor
...
This patch simply whitelists the EBADF errno code.
Signed-off-by: Luís Henriques <lhenriques@suse.de>
Co-authored-by: Luís Henriques <lhenriques@suse.de>
|
| |
|
|
|
|
|
|
| |
The command isn't freed and the fuse_fd isn't
closed if execl failed. Fix it.
Signed-off-by: Lixiaokeng <lixiaokeng@huawei.com>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As pointed here [1] __has_attribute() is broken for many attributes and
if it doesn't support the specific attribute it returns true, so we
can't really rely on that for this check. This lead to Buildroot
libfuse3 build failure [2] where that shows up with:
```
error: symver is only supported on ELF platforms
```
Indeed Microblaze doesn't support ELF since it doesn't include elfos.h,
but __has_attribute(symver) returns true.
So let's substitute the #ifdef __has_attribute() with a stronger test on
a function foo() with __attribute__((symver ("test@TEST"))).
[1]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101766
[2]: http://autobuild.buildroot.net/results/d6c/d6cfaf2aafaeda3c12d127f6a2d2e175b25e654f/build-end.log
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
test_syscalls unlinked testfiles check fails on passthourhg_hp without
the kernel commit "fuse: fix illegal access to inode with reused nodeid"
queued for kernel 5.14 [1].
Make this check opt-in and do not run it with kernel version before 5.14.
[1] https://lore.kernel.org/linux-fsdevel/CAJfpegtGKjeK8E5QsHKF0=re1J9wVHuGRVgg9NDJ_OOwQdCUNg@mail.gmail.com/
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
|
|
|
|
|
|
|
| |
setlocale() can fail, returning NULL, which will lead
to a crash in iconv_new(). Fix it like in iconv_help().
Signed-off-by: Lixiaokeng <lixiaokeng@huawei.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before last unlink() release the reference on inode.fd to allow reuse
of underlying fs inode number, mark the server inode "deleted" and bump
it's generation counter.
When same inode number is found on lookup(), the server inode object will
be reused as well.
Skip this when inode has an open file and when writeback cache is enabled.
This will be used to verify inode reuse bug fix in the kernel.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On some tests on regular files, open an O_PATH fd of the testfile and
record it along side the size and mode and inode.
At the end of all tests, use recorded testfiles info to re-check the size
mode and inode of the unlinked testfiles.
With O_PATH fd, the server does not have to keep the inode alive so FUSE
inode may be stale or bad. Therefore, ESTALE and EIO are valid results
for fstat() on the old testfile fd's, but returning the wrong size or
mode is an invalid result.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
|
|
|
|
|
|
|
| |
Avoid multiple fstat() calls and consolidate all fcheck_* helpers
into fcheck_stat().
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Generate unique filename per test (only for regular file for now).
Make sure to unlink the unique filename after each test.
realpath variable was renamed to basepath_r to fix build warning
on conflicting symbols with realpath() function.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
|
| |
|
|
|
| |
Signed-off-by: Asaf Kahlon <asafka7@gmail.com>
|
|
|
|
|
| |
* cuse example: fix memory leak
* Travis CI: re-enable leak checking
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
rename dir loop test fails when test tmp dir is xfs with an error
test_rename_dir_loop() - rename : File exists
That is because xfs returns EEXIST for the case of renaming over
a non-empty directory.
According to rename(2) man page, EEXIST and ENOTEMPTY are both valid
error code in this case.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
|
|
|
|
|
|
|
| |
We currently do not pass anything in PREDEFINED and that means
FUSE_USE_VERSION is undefined.
Add that definition so that Doxygen built-in C pre-processor can use
FUSE_USE_VERSION value to find the correct comment to parse.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
fuse (4) is an excellent introduction to the FUSE protocol,
and it lists fusermount (1) and mount.fuse (8) in its
SEE ALSO section.
I (the author of gocryptfs) was not aware of this man
page till March 2021, which suggest that it should be
made more discoverable.
So link back to fuse (4) in our SEE ALSO sections.
|
|
|
| |
Some parameters were undocumented, and @file does not mean to expand current file name.
|
|
|
| |
mount.fuse was renamed to mount.fuse3.
|
|
|
| |
Co-authored-by: Manuel Jacob <test>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Use meson's warning_level instead of passing -Wflags
"-Wall" is included by default and level 2 adds "-Wextra". Avoids a
warning from meson.
Signed-off-by: Heiko Becker <heirecka@exherbo.org>
* Set the C++ language standard through a meson option
Avoids a warning from meson.
Signed-off-by: Heiko Becker <heirecka@exherbo.org>
|
| |
|
| |
|
|
|
| |
Not used since https://github.com/libfuse/libfuse/commit/561d7054d856eea6c2d634093546d6af773dada9
|