aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorLines
2022-03-14Merge branch 'master' into fopen_noflushNikolaus Rath-7/+9
2022-02-11Removed duplicates code. (#642)David Galeano-2/+0
The cap for FUSE_CAP_WRITEBACK_CACHE was printed twice.
2022-02-09Fixed returning an error condition to ioctl(2) (#641)Jean-Pierre André-0/+4
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>
2022-01-23Fix ReST end-string nits (#638)Andrew Gaul-3/+3
This makes the file more readable with syntax highlighting.
2022-01-11Avoid ENOENT response when recently invalidated fuse_ino_t is received from ↵Ken Schalk-2/+2
the kernel (#636)
2022-01-05Add test for FOPEN_NOFLUSH flagAmir Goldstein-1/+65
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>
2022-01-03Add no_rofd_flush mount optionAmir Goldstein-0/+14
To disable flush for read-only fd. Signed-off-by: Amir Goldstein <amir73il@gmail.com>
2022-01-03Add support for FOPEN_NOFLUSH flagAmir Goldstein-1/+15
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>
2021-12-12Document possible NULL paths when directories are removed (#633)Maximilian Heinzler-0/+6
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.
2021-11-20test/test_syscalls.c: allow EBADF in fcheck_stat() (#631)Luis Henriques-1/+2
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>
2021-09-06Released 3.10.5Nikolaus Rath-1/+11
2021-09-06Fix: fd and memory leak in mount.fuse.c (#614)lixiaokeng-1/+6
The command isn't freed and the fuse_fd isn't closed if execl failed. Fix it. Signed-off-by: Lixiaokeng <lixiaokeng@huawei.com>
2021-08-25use same hashbang as in rest of repositorya1346054-1/+1
2021-08-25fix spellinga1346054-1/+1
2021-08-25remove executable file mode bit from source filesa1346054-0/+0
2021-08-04meson.build: fix wrong .symver detectionGiulio Benetti-9/+7
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>
2021-06-24Travis-CI: Make sure lsan supppressions file can be read by root.Nikolaus Rath-5/+8
2021-06-23Do not run unlinked files test on passthrough_hp with old kernelsAmir Goldstein-3/+19
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>
2021-06-16Fix: a potential crash on failure to setlocalelixiaokeng-4/+2
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>
2021-06-14passthrough_hp: excercise reusing inode numbersAmir Goldstein-7/+50
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>
2021-06-14test/test_syscalls.c: check unlinked testfiles at the end of the testAmir Goldstein-16/+129
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>
2021-06-14test/test_syscalls.c: refactor fcheck_* helpersAmir Goldstein-68/+45
Avoid multiple fstat() calls and consolidate all fcheck_* helpers into fcheck_stat(). Signed-off-by: Amir Goldstein <amir73il@gmail.com>
2021-06-14test/test_syscalls.c: use unique filename per testAmir Goldstein-13/+37
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>
2021-06-09Released 3.10.4Nikolaus Rath-4/+14
2021-06-09Add an option to disable building tests (#533)asafkahlon-1/+8
Signed-off-by: Asaf Kahlon <asafka7@gmail.com>
2021-06-09Cuse example: Fix memory leak (#607)Christian Menges-8/+12
* cuse example: fix memory leak * Travis CI: re-enable leak checking
2021-06-09fix typo in man (#609)Sergey Fedoseev-1/+1
2021-06-02test/test_syscalls.c: fix test failure on xfs src dir (#611)Amir Goldstein-1/+1
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>
2021-05-19Define FUSE_USE_VERSION in Doxygen. (#608)Junichi Uekawa-6/+6
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.
2021-05-09Fix memory leaks in examples (#604)Christian Menges-1/+17
2021-05-09Bump cxxopts from 2.2.0 to 2.2.1 (#602)Christian Menges-41/+78
2021-05-08doc: Add "fuse (4)" to SEE ALSO sections in man pages (#601)rfjakob-0/+2
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.
2021-05-07Fix doxygen warnings. (#600)Junichi Uekawa-17/+20
Some parameters were undocumented, and @file does not mean to expand current file name.
2021-05-05fusermount3.1: refer to mount.fuse3 (#599)Junichi Uekawa-1/+1
mount.fuse was renamed to mount.fuse3.
2021-04-23Add missing exceptions to fuse_reply_err() documentation. (#597)Manuel Jacob-1/+1
Co-authored-by: Manuel Jacob <test>
2021-04-13Fix a few meson warnings (#596)Heiko Becker-5/+8
* 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>
2021-04-12Added ChangeLog template for next release.Nikolaus Rath-0/+5
2021-04-12Released 3.10.3Nikolaus Rath-2/+7
2021-04-12Remove unused fuse_worker bufsize (#590)Hookey-1/+0
Not used since https://github.com/libfuse/libfuse/commit/561d7054d856eea6c2d634093546d6af773dada9
2021-03-30Fix typo in fuse_lowlevel.h (#593)Tobias Nießen-1/+1
2021-03-25Fix typos (#592)Andrew Gaul-5/+5
2021-03-18Fix returning d_ino and d_type by readdir(3) in non-plus modeJean-Pierre André-9/+48
When not using the readdir_plus mode, the d_type was not returned, and the use_ino flag was not used for returning d_ino. This patch fixes the returned values for d_ino and d_type by readdir(3) The test for the returned value of d_ino has been adjusted to also take the d_type into consideration and to check the returned values in both basic readdir and readdir_plus modes. This is done by executing the passthrough test twice. Co-authored-by: Jean-Pierre André <jpandre@users.sourceforge.net>
2021-02-05Released 3.10.2Nikolaus Rath-6/+16
2021-02-03Fix returning inode numbers from readdir() in offset==0 mode. (#584)Martin Pärtel-3/+69
- Test added for all passthrough examples. - passthrough.c uses offset==0 mode. The others don't. - passthrough.c changed to set FUSE_FILL_DIR_PLUS to make the test pass. - This fixes #583.
2021-01-28Ignore "-o nonempty" (#582)Stephen Kitt-1/+9
Commit 0bef21e8543d removed "-o nonempty" since mounting over non-empty directories is always allowed. But this broke tools which specify "-o nonempty". Since the expected behaviour is the same anyway, ignoring the "nonempty" option seems safe, and allows programs specifying "-o nonempty" to continue working with fusermount3. This would fix https://bugs.debian.org/939767 Signed-off-by: Stephen Kitt <steve@sk2.org>
2021-01-17Fix FTBFS on kfreebsd (#581)Laurent Bigonville-1/+1
kfreebsd is a FreeBSD kernel and a GNU libc The only macro defined in that case is __FreeBSD_kernel__ Fix #580
2021-01-12Fix a few typos in README.md. (#579)John Baber-Lucero-4/+4
* Fix a few typos in README.md. * Change recommendation to mandate for meson and ninja Co-authored-by: John Baber-Lucero <git@frundle.com>
2021-01-10Fix typo (#578)Feverfew-1/+1
2021-01-08fusermount: Check for argv[0] being present (#577)richardweinberger-1/+1
It is perfectly legal to execute a program with argc == 0 and therefore no argv. fusermount needs to check for this case, otherwise it will pass a NULL poiunter to strdup() and cause undefined behavior. Especially since fusermount is setuid root, we need to extra be careful. Signed-off-by: Richard Weinberger <richard@nod.at>
2021-01-01Fix FUSE_COPY_FILE_RANGE in the passthrough example (#575)Alan Somers-2/+4
Only close the file descriptors if they were just opened. Otherwise, the second FUSE_COPY_FILE_RANGE operation on any given file will fail with EBADF.