#
9f31c474 |
| 10-Jan-2025 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: add a test for the max_read= mount option
When set, this limits the amount of data that the kernel will request of the server in any single read operation. The option has always been availa
fusefs: add a test for the max_read= mount option
When set, this limits the amount of data that the kernel will request of the server in any single read operation. The option has always been available in our fusefs implementation, but never covered by the test suite.
MFC after: 2 weeks Sponsored by: ConnectWise
show more ...
|
Revision tags: release/14.2.0, release/13.4.0, release/14.1.0 |
|
#
e9b411d2 |
| 06-May-2024 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tests/fusefs: fix all tests that depend on kern.maxphys
The tests try to read kern.maxphys sysctl into int value, while unsigned long is required. Not sure when this was broken, seems like since cd
tests/fusefs: fix all tests that depend on kern.maxphys
The tests try to read kern.maxphys sysctl into int value, while unsigned long is required. Not sure when this was broken, seems like since cd8537910406e.
Reviewed by: asomers Differential Revision: https://reviews.freebsd.org/D45053
show more ...
|
Revision tags: release/13.3.0, release/14.0.0 |
|
#
b3e76948 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
#
4d846d26 |
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0 |
|
#
2f636248 |
| 29-Apr-2022 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: use the fsname mount option if set
The daemon can specify fsname=XXX in its mount options. If so, the file system should report f_mntfromname as XXX during statfs. This will show up in the
fusefs: use the fsname mount option if set
The daemon can specify fsname=XXX in its mount options. If so, the file system should report f_mntfromname as XXX during statfs. This will show up in the output of commands like mount and df.
Submitted by: Ali Abdallah <ali.abdallah@suse.com> MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D35090
show more ...
|
#
616eaa66 |
| 29-Apr-2022 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: add a test for the subtype= option
At mount time server can set, for example, "subtype=xfs", so that mount(8) will later show the mountpoint's file system as "fusefs.xfs". fusefs has had thi
fusefs: add a test for the subtype= option
At mount time server can set, for example, "subtype=xfs", so that mount(8) will later show the mountpoint's file system as "fusefs.xfs". fusefs has had this feature ever since the original GSoC commit in 2012, but there's never been a test for it.
MFC after: 2 weeks
show more ...
|
#
398c88c7 |
| 01-Jan-2022 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: implement VOP_ALLOCATE
Now posix_fallocate will be correctly forwarded to fuse file system servers, for those that support it.
MFC after: 2 weeks Reviewed by: pfg Differential Revision: htt
fusefs: implement VOP_ALLOCATE
Now posix_fallocate will be correctly forwarded to fuse file system servers, for those that support it.
MFC after: 2 weeks Reviewed by: pfg Differential Revision: https://reviews.freebsd.org/D33389
show more ...
|
#
8d99a6b9 |
| 02-Dec-2021 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: move common code from forget.cc to utils.cc
MFC after: 2 weeks
|
#
41ae9f9e |
| 05-Dec-2021 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: invalidate the cache during copy_file_range
FUSE_COPY_FILE_RANGE instructs the server to write data to a file. fusefs must invalidate any cached data within the written range.
PR: 260242 M
fusefs: invalidate the cache during copy_file_range
FUSE_COPY_FILE_RANGE instructs the server to write data to a file. fusefs must invalidate any cached data within the written range.
PR: 260242 MFC after: 2 weeks Reviewed by: pfg Differential Revision: https://reviews.freebsd.org/D33280
show more ...
|
Revision tags: release/12.3.0 |
|
#
91972cfc |
| 29-Nov-2021 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: update atime on reads when using cached attributes
When using cached attributes, whether or not the data cache is enabled, fusefs must update a file's atime whenever it reads from it, so lon
fusefs: update atime on reads when using cached attributes
When using cached attributes, whether or not the data cache is enabled, fusefs must update a file's atime whenever it reads from it, so long as it wasn't mounted with -o noatime. Update it in-kernel, and flush it to the server on close or during the next setattr operation.
The downside is that close() will now frequently trigger a FUSE_SETATTR upcall. But if you care about performance, you should be using -o noatime anyway.
MFC after: 2 weeks Reviewed by: pfg Differential Revision: https://reviews.freebsd.org/D33145
show more ...
|
Revision tags: release/13.0.0 |
|
#
f928dbcb |
| 24-Dec-2020 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: fix the tests for a wider range of maxphys
maxphys is now a tunable, ever since r368124. The default value is also larger than it used to be. That broke several fusefs tests that made assu
fusefs: fix the tests for a wider range of maxphys
maxphys is now a tunable, ever since r368124. The default value is also larger than it used to be. That broke several fusefs tests that made assumptions about maxphys.
* WriteCluster.clustering used the MAXPHYS compile-time constant.
* WriteBackAsync.direct_io_partially_overlaps_cached_block implicitly depended on the default value of maxphys. Fix it by making the dependency explicit.
* Write.write_large implicitly assumed that maxphys would be no more than twice maxbcachebuf. Fix it by explicitly setting m_max_write.
* WriteCluster.clustering and several others failed because the MockFS module did not work for max_write > 128KB (which most tests would set when maxphys > 256KB). Limit max_write accordingly. This is the same as fusefs-libs's behavior.
* Bmap's tests were originally written for MAXPHYS=128KB. With larger values, the simulated file size was too small.
PR: 252096 Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D27769
show more ...
|
Revision tags: release/12.2.0, release/11.4.0 |
|
#
bfcb817b |
| 22-May-2020 |
Alan Somers <asomers@FreeBSD.org> |
Fix issues with FUSE_ACCESS when default_permissions is disabled
This patch fixes two issues relating to FUSE_ACCESS when the default_permissions mount option is disabled:
* VOP_ACCESS() calls with
Fix issues with FUSE_ACCESS when default_permissions is disabled
This patch fixes two issues relating to FUSE_ACCESS when the default_permissions mount option is disabled:
* VOP_ACCESS() calls with VADMIN set should never be sent to a fuse server in the form of FUSE_ACCESS operations. The FUSE protocol has no equivalent of VADMIN, so we must evaluate such things kernel-side, regardless of the default_permissions setting.
* The FUSE protocol only requires FUSE_ACCESS to be sent for two purposes: for the access(2) syscall and to check directory permissions for searchability during lookup. FreeBSD sends it much more frequently, due to differences between our VFS and Linux's, for which FUSE was designed. But this patch does eliminate several cases not required by the FUSE protocol:
* for any FUSE_*XATTR operation * when creating a new file * when deleting a file * when setting timestamps, such as by utimensat(2).
* Additionally, when default_permissions is disabled, this patch removes one FUSE_GETATTR operation when deleting a file.
PR: 245689 Reported by: MooseFS FreeBSD Team <freebsd@moosefs.pro> Reviewed by: cem MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24777
show more ...
|
#
b0ecfb42 |
| 11-Mar-2020 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: avoid cache corruption with buggy fuse servers
The FUSE protocol allows the client (kernel) to cache a file's size, if the server (userspace daemon) allows it. A well-behaved daemon obviousl
fusefs: avoid cache corruption with buggy fuse servers
The FUSE protocol allows the client (kernel) to cache a file's size, if the server (userspace daemon) allows it. A well-behaved daemon obviously should not change a file's size while a client has it cached. But a buggy daemon might. If the kernel ever detects that that has happened, then it should invalidate the entire cache for that file. Previously, we would not only cache stale data, but in the case of a file extension while we had the size cached, we accidentally extended the cache with zeros.
PR: 244178 Reported by: Ben RUBSON <ben.rubson@gmx.com> Reviewed by: cem MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24012
show more ...
|
Revision tags: release/12.1.0 |
|
#
f993ed2f |
| 09-Sep-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r351732 through r352104.
|
#
dd21a916 |
| 07-Sep-2019 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: suppress some Coverity resource leak CIDs in the tests
The fusefs tests deliberately leak file descriptors. To do otherwise would add extra complications to the tests' mock FUSE server. Th
fusefs: suppress some Coverity resource leak CIDs in the tests
The fusefs tests deliberately leak file descriptors. To do otherwise would add extra complications to the tests' mock FUSE server. This annotation should hopefully convince Coverity to shut up about the leaks.
Reviewed by: uqs MFC after: 4 days Sponsored by: The FreeBSD Foundation
show more ...
|
#
8e765737 |
| 06-Sep-2019 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: coverity cleanup in the tests
Address the following defects reported by Coverity:
* Structurally dead code (CID 1404366): set m_quit before FAIL, not after
* Unchecked return value of sysc
fusefs: coverity cleanup in the tests
Address the following defects reported by Coverity:
* Structurally dead code (CID 1404366): set m_quit before FAIL, not after
* Unchecked return value of sysctlbyname (CID 1404321)
* Unchecked return value of stat(2) (CID 1404471)
* Unchecked return value of open(2) (CID 1404402, 1404529)
* Unchecked return value of dup(2) (CID 1404478)
* Buffer overflows. These are all false positives caused by the fact that Coverity thinks I'm using a buffer to store strings, when in fact I'm really just using it to store a byte array that happens to be initialized with a string. I'm changing the type from char to uint8_t in the hopes that it will placate Coverity. (CID 1404338, 1404350, 1404367, 1404376, 1404379, 1404381, 1404388, 1404403, 1404425, 1404433, 1404434, 1404474, 1404480, 1404484, 1404503, 1404505)
* False positive file descriptor leak. I'm going to try to fix this with Coverity modeling, but I'll also change an EXPECT to ASSERT so we don't perform meaningless assertions after the failure. (CID 1404320, 1404324, 1404440, 1404445).
* Unannotated file descriptor leak. This will be followed up by a Coverity modeling change. (CID 1404326, 1404334, 1404336, 1404357, 1404361, 1404372, 1404391, 1404395, 1404409, 1404430, 1404448, 1404451, 1404455, 1404457, 1404458, 1404460)
* Uninitialized variables in C++ constructors (CID 1404327, 1404346). In the case of m_maxphys, this actually led to part of the FUSE_INIT's response being set to stack garbage during the WriteCluster::clustering test.
* Uninitialized sun_len field in struct sockaddr_un (CID 1404330, 1404371, 1404429).
Reported by: Coverity Reviewed by: emaste MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21457
show more ...
|
#
dbee856a |
| 13-Aug-2019 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: skip some tests when unsafe aio is disabled
MFC after: 15 days MFC-With: r350665 Sponsored by: The FreeBSD Foundation
|
#
1fa8ebfb |
| 13-Aug-2019 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: add SVN Keywords to the test files
Reported by: SVN pre-commit hooks MFC after: 15 days MFC-With: r350665 Sponsored by: The FreeBSD Foundation
|
#
c2265ae7 |
| 12-Aug-2019 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: skip some tests when unsafe aio is disabled
MFC after: 16 days MFC-With: r350665 Sponsored by: The FreeBSD Foundation
|
#
0b4275ac |
| 07-Aug-2019 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: merge from projects/fuse2
This commit imports the new fusefs driver. It raises the protocol level from 7.8 to 7.23, fixes many bugs, adds a test suite for the driver, and adds many new featu
fusefs: merge from projects/fuse2
This commit imports the new fusefs driver. It raises the protocol level from 7.8 to 7.23, fixes many bugs, adds a test suite for the driver, and adds many new features. New features include:
* Optional kernel-side permissions checks (-o default_permissions) * Implement VOP_MKNOD, VOP_BMAP, and VOP_ADVLOCK * Allow interrupting FUSE operations * Support named pipes and unix-domain sockets in fusefs file systems * Forward UTIME_NOW during utimensat(2) to the daemon * kqueue support for /dev/fuse * Allow updating mounts with "mount -u" * Allow exporting fusefs file systems over NFS * Server-initiated invalidation of the name cache or data cache * Respect RLIMIT_FSIZE * Try to support servers as old as protocol 7.4
Performance enhancements include:
* Implement FUSE's FOPEN_KEEP_CACHE and FUSE_ASYNC_READ flags * Cache file attributes * Cache lookup entries, both positive and negative * Server-selectable cache modes: writethrough, writeback, or uncached * Write clustering * Readahead * Use counter(9) for statistical reporting
PR: 199934 216391 233783 234581 235773 235774 235775 PR: 236226 236231 236236 236291 236329 236381 236405 PR: 236327 236466 236472 236473 236474 236530 236557 PR: 236560 236844 237052 237181 237588 238565 Reviewed by: bcr (man pages) Reviewed by: cem, ngie, rpokala, glebius, kib, bde, emaste (post-commit review on project branch) MFC after: 3 weeks Relnotes: yes Sponsored by: The FreeBSD Foundation Pull Request: https://reviews.freebsd.org/D21110
show more ...
|
#
ed74f781 |
| 18-Jul-2019 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: add a intr/nointr mount option
FUSE file systems can optionally support interrupting outstanding operations. However, the file system does not identify to the kernel at mount time whether i
fusefs: add a intr/nointr mount option
FUSE file systems can optionally support interrupting outstanding operations. However, the file system does not identify to the kernel at mount time whether it's capable of doing that. Instead it signals its noncapability by returning ENOSYS to the first FUSE_INTERRUPT operation it receives. That's a problem for reliable signal delivery, because the kernel must choose which thread should get a signal before it knows whether the FUSE server can handle interrupts. The problem is even worse because the FUSE protocol allows a file system to simply ignore all FUSE_INTERRUPT operations.
Fix the signal delivery logic by making interruptibility an opt-in mount option. This will require a corresponding change to libfuse, but not to most file systems that link to libfuse.
Bump __FreeBSD_version due to the new mount option.
Sponsored by: The FreeBSD Foundation
show more ...
|
Revision tags: release/11.3.0 |
|
#
7fc0921d |
| 26-Jun-2019 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: annotate deliberate file descriptor leaks in the tests
closing a file descriptor causes FUSE activity that is superfluous to the purpose of most tests, but would nonetheless require matching
fusefs: annotate deliberate file descriptor leaks in the tests
closing a file descriptor causes FUSE activity that is superfluous to the purpose of most tests, but would nonetheless require matching expectations. Rather than do that, most tests deliberately leak file descriptors instead. This commit moves the leakage from each test into two trivial functions: leak and leakdir. Hopefully Coverity will only complain about those functions and not all of their callers.
Sponsored by: The FreeBSD Foundation
show more ...
|
#
fef46454 |
| 26-Jun-2019 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: implement the "time_gran" feature.
If a server supports a timestamp granularity other than 1ns, it can tell the client this as of protocol 7.23. The client will use that granularity when up
fusefs: implement the "time_gran" feature.
If a server supports a timestamp granularity other than 1ns, it can tell the client this as of protocol 7.23. The client will use that granularity when updating its cached timestamps during write. This way the timestamps won't appear to change following flush.
Sponsored by: The FreeBSD Foundation
show more ...
|
#
f2704f05 |
| 25-Jun-2019 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: fix the tests for non-default values of MAXPHYS
Sponsored by: The FreeBSD Foundation
|
#
402b609c |
| 18-Jun-2019 |
Alan Somers <asomers@FreeBSD.org> |
fusefs: use cluster_read for more readahead
fusefs will now use cluster_read. This allows readahead of more than one cache block. However, it won't yet actually cluster the reads because that requ
fusefs: use cluster_read for more readahead
fusefs will now use cluster_read. This allows readahead of more than one cache block. However, it won't yet actually cluster the reads because that requires VOP_BMAP, which fusefs does not yet implement.
Sponsored by: The FreeBSD Foundation
show more ...
|