| 95e94531 | 03-Mar-2022 |
Jessica Clarke <[email protected]> |
fuse: Fix build on 32-bit architectures
MFC 3d721de049be ("Fix NFS exports of FUSE file systems for big directories") missed a case of a uint64_t from HEAD that should be a u_long in 13 due to KPI d
fuse: Fix build on 32-bit architectures
MFC 3d721de049be ("Fix NFS exports of FUSE file systems for big directories") missed a case of a uint64_t from HEAD that should be a u_long in 13 due to KPI differences. Specifically, HEAD has b214fcceacad ("Change VOP_READDIR's cookies argument to a **uint64_t"), but stable/13 does not.
This is a direct commit to stable/13.
show more ...
|
| bfffd351 | 02-Dec-2021 |
Alan Somers <[email protected]> |
fusefs: in the tests, always assume debug.try_reclaim_vnode is available
In an earlier version of the revision that created that sysctl (D20519) the sysctl was gated by INVARIANTS, so the test had t
fusefs: in the tests, always assume debug.try_reclaim_vnode is available
In an earlier version of the revision that created that sysctl (D20519) the sysctl was gated by INVARIANTS, so the test had to check for it. But in the committed version it is always available.
(cherry picked from commit 19ab361045343bb777176bb08468f7706d7649c4)
fusefs: move common code from forget.cc to utils.cc
(cherry picked from commit 8d99a6b91b788b7ddf88f975f288f7c6479f4be3)
fusefs: fix .. lookups when the parent has been reclaimed.
By default, FUSE file systems are assumed not to support lookups for "." and "..". They must opt-in to that. To cope with this limitation, the fusefs kernel module caches every fuse vnode's parent's inode number, and uses that during VOP_LOOKUP for "..". But if the parent's vnode has been reclaimed that won't be possible. Previously we paniced in this situation. Now, we'll return ESTALE instead. Or, if the file system has opted into ".." lookups, we'll just do that instead.
This commit also fixes VOP_LOOKUP to respect the cache timeout for ".." lookups, if the FUSE file system specified a finite timeout.
PR: 259974 Reviewed by: pfg Differential Revision: https://reviews.freebsd.org/D33239
(cherry picked from commit 1613087a8127122b03a3730046d051adf4edd14f)
show more ...
|
| 449d02a1 | 29-Nov-2021 |
Alan Somers <[email protected]> |
fusefs: copy_file_range must update file timestamps
If FUSE_COPY_FILE_RANGE returns successfully, update the atime of the source and the mtime and ctime of the destination.
Reviewers: pfg Different
fusefs: copy_file_range must update file timestamps
If FUSE_COPY_FILE_RANGE returns successfully, update the atime of the source and the mtime and ctime of the destination.
Reviewers: pfg Differential Revision: https://reviews.freebsd.org/D33159
(cherry picked from commit 5169832c96451e0c939338d8ef34cd0875a24b83)
show more ...
|
| d056bc6f | 05-Dec-2021 |
Alan Somers <[email protected]> |
fusefs: inline fuse_io_dispatch
This function was always confusing, because it created an H-shaped callgraph: two functions called in and left via different paths based on which which called.
(cher
fusefs: inline fuse_io_dispatch
This function was always confusing, because it created an H-shaped callgraph: two functions called in and left via different paths based on which which called.
(cherry picked from commit dc433e1530af26b0430d66c06c342889e9609590)
show more ...
|
| 0bade346 | 29-Nov-2021 |
Alan Somers <[email protected]> |
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.
Reviewed by: pfg Differential Revision: https://reviews.freebsd.org/D33145
(cherry picked from commit 91972cfcddf950d7a9c33df5a9171ada1805a144)
fusefs: fix 32-bit build of the tests after 91972cfcddf
(cherry picked from commit d109559ddbf7afe311c1f1795ece137071406db8)
show more ...
|
| 000ce6de | 29-Nov-2021 |
Alan Somers <[email protected]> |
fusefs: fix copy_file_range when extending a file
When copy_file_range extends a file, it must update the cached file size.
Reviewed by: rmacklem, pfg Differential Revision: https://reviews.freebsd
fusefs: fix copy_file_range when extending a file
When copy_file_range extends a file, it must update the cached file size.
Reviewed by: rmacklem, pfg Differential Revision: https://reviews.freebsd.org/D33151
(cherry picked from commit 65d70b3bae0c70798b0a2b8ed129bc146fed1cce)
show more ...
|
| 7adb46c7 | 03-Oct-2021 |
Alan Somers <[email protected]> |
fusefs: Fix a bug during VOP_STRATEGY when the server changes file size
If the FUSE server tells the kernel that a file's size has changed, then the kernel must invalidate any portion of that file i
fusefs: Fix a bug during VOP_STRATEGY when the server changes file size
If the FUSE server tells the kernel that a file's size has changed, then the kernel must invalidate any portion of that file in cache. But the kernel can't do that during VOP_STRATEGY, because the file's buffers are already locked. Instead, proceed with the write.
PR: 256937 Reported by: Agata <[email protected]> Tested by: Agata <[email protected]> Reviewed by: pfg Differential Revision: https://reviews.freebsd.org/D32332
(cherry picked from commit 032a5bd55b3a003d3560435422a95f27f91685fe)
show more ...
|
| bdd7a3f2 | 02-Oct-2021 |
Alan Somers <[email protected]> |
fusefs: fix a recurse-on-non-recursive lockmgr panic
fuse_vnop_bmap needs to know the file's size in order to calculate the optimum amount of readahead. If the file's size is unknown, it must ask t
fusefs: fix a recurse-on-non-recursive lockmgr panic
fuse_vnop_bmap needs to know the file's size in order to calculate the optimum amount of readahead. If the file's size is unknown, it must ask the FUSE server. But if the file's data was previously cached and the server reports that its size has shrunk, fusefs must invalidate the cached data. That's not possible during VOP_BMAP because the buffer object is already locked.
Fix the panic by not querying the FUSE server for the file's size during VOP_BMAP if we don't need it. That's also a a slight performance optimization.
PR: 256937 Reported by: Agata <[email protected]> Tested by: Agata <[email protected]>
(cherry picked from commit 7430017b9978cae054ed99e5160f739e5ca021d5)
show more ...
|
| 94b01af1 | 03-Oct-2021 |
Alan Somers <[email protected]> |
fusefs: quiet some cache-related warnings
If the FUSE server does something that would make our cache incoherent, we should print a warning to the user. However, we previously warned in some situat
fusefs: quiet some cache-related warnings
If the FUSE server does something that would make our cache incoherent, we should print a warning to the user. However, we previously warned in some situations when we shouldn't, such as if the file's size changed on the server _after_ our own attribute cache had expired. This change suppresses the warning in cases like that. It also moves the warning logic to a single place within the code.
PR: 256936 Reported by: Agata <[email protected]> Tested by: Agata <[email protected]>, [email protected]
(cherry picked from commit 5d94aaacb5180798b2f698e33937f068386004eb)
show more ...
|
| dfb3365a | 25-Sep-2021 |
Alan Somers <[email protected]> |
fusefs: implement FUSE_NO_OPEN_SUPPORT and FUSE_NO_OPENDIR_SUPPORT
For file systems that allow it, fusefs will skip FUSE_OPEN, FUSE_RELEASE, FUSE_OPENDIR, and FUSE_RELEASEDIR operations, a minor opt
fusefs: implement FUSE_NO_OPEN_SUPPORT and FUSE_NO_OPENDIR_SUPPORT
For file systems that allow it, fusefs will skip FUSE_OPEN, FUSE_RELEASE, FUSE_OPENDIR, and FUSE_RELEASEDIR operations, a minor optimization.
Reviewed by: pfg Differential Revision: https://reviews.freebsd.org/D32141
(cherry picked from commit 7124d2bc3a3bd58f6d3803a0579f2e0fa853b56d)
show more ...
|
| 27d55441 | 18-Jun-2021 |
Alan Somers <[email protected]> |
fusefs: ensure that FUSE ops' headers' unique values are actually unique
Every FUSE operation has a unique value in its header. As the name implies, these values are supposed to be unique among all
fusefs: ensure that FUSE ops' headers' unique values are actually unique
Every FUSE operation has a unique value in its header. As the name implies, these values are supposed to be unique among all outstanding operations. And since FUSE_INTERRUPT is asynchronous and racy, it is desirable that the unique values be unique among all operations that are "close in time".
Ensure that they are actually unique by incrementing them whenever we reuse a fuse_dispatcher object, for example during fsync, write, and listextattr.
PR: 244686 Reviewed by: pfg Differential Revision: https://reviews.freebsd.org/D30810
(cherry picked from commit 5403f2c163f7e3d1adb9431d216f88d57cf9d74b)
show more ...
|