| 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 ...
|
| 139764c4 | 06-Dec-2021 |
Alan Somers <[email protected]> |
fusefs: correctly handle an inode that changes file types
Correctly handle the situation where a FUSE server unlinks a file, then creates a new file of a different type but with the same inode numbe
fusefs: correctly handle an inode that changes file types
Correctly handle the situation where a FUSE server unlinks a file, then creates a new file of a different type but with the same inode number. Previously fuse_vnop_lookup in this situation would return EAGAIN. But since it didn't call vgone(), the vnode couldn't be reused right away. Fix this by immediately calling vgone() and reallocating a new vnode.
This problem can occur in three code paths, during VOP_LOOKUP, VOP_SETATTR, or following FUSE_GETATTR, which usually happens during VOP_GETATTR but can occur during other vops, too. Note that the correct response actually doesn't depend on whether the entry cache has expired. In fact, during VOP_LOOKUP, we can't even tell. Either it has expired already, or else the vnode got reclaimed by vnlru.
Also, correct the error code during the VOP_SETATTR path.
PR: 258022 Reported by: [email protected] Reviewed by: pfg Differential Revision: https://reviews.freebsd.org/D33283
(cherry picked from commit 25927e068fcbcac0a5111a881de723bd984b04b3)
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 ...
|
| 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 ...
|