| Summary: | [FUSEFS] File close() failures relating to attempted atime update | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Jamie Landeg-Jones <jamie> | ||||
| Component: | kern | Assignee: | Alan Somers <asomers> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Many People | CC: | asomers, grahamperrin, jamie | ||||
| Priority: | --- | Flags: | asomers:
mfc-stable14+
asomers: mfc-stable13+ asomers: mfc-stable12- |
||||
| Version: | 14.0-CURRENT | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| URL: | https://reviews.freebsd.org/D41925 | ||||||
| Attachments: |
|
||||||
|
Description
Jamie Landeg-Jones
2023-04-10 23:30:08 UTC
Note that this bug affects 13.1-RELEASE, 13.2-RELEASE, and the upcoming 14.0 . A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=fb619c94c679e939496fe0cf94b8d2cba95e6e63 commit fb619c94c679e939496fe0cf94b8d2cba95e6e63 Author: Alan Somers <asomers@FreeBSD.org> AuthorDate: 2023-09-20 21:37:31 +0000 Commit: Alan Somers <asomers@FreeBSD.org> CommitDate: 2023-09-21 14:02:31 +0000 fusefs: fix some bugs updating atime during close When using cached attributes, we must update a file's atime during close, if it has been read since the last attribute refresh. But, * Don't update atime if we lack write permissions to the file or if the file system is readonly. * If the daemon fails our atime update request for any reason, don't report this as a failure for VOP_CLOSE. PR: 270749 Reported by: Jamie Landeg-Jones <jamie@catflap.org> MFC after: 1 week Sponsored by: Axcient Reviewed by: pfg Differential Revision: https://reviews.freebsd.org/D41925 sys/fs/fuse/fuse_vnops.c | 27 ++++++++-- tests/sys/fs/fusefs/access.cc | 2 +- tests/sys/fs/fusefs/default_permissions.cc | 42 ++++++++++++++- tests/sys/fs/fusefs/read.cc | 85 ++++++++++++++++++++++++++++++ 4 files changed, 150 insertions(+), 6 deletions(-) A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=e5236d25f2c0709acf3547e6af45f4bb4eec4f02 commit e5236d25f2c0709acf3547e6af45f4bb4eec4f02 Author: Alan Somers <asomers@FreeBSD.org> AuthorDate: 2023-09-21 15:38:06 +0000 Commit: Alan Somers <asomers@FreeBSD.org> CommitDate: 2023-09-21 15:40:49 +0000 fusefs: fix unused variables from fb619c94c67 PR: 270749 Reported by: cy MFC after: 1 week MFC with: fb619c94c679e939496fe0cf94b8d2cba95e6e63 Sponsored by: Axcient tests/sys/fs/fusefs/default_permissions.cc | 1 - tests/sys/fs/fusefs/read.cc | 2 -- 2 files changed, 3 deletions(-) (In reply to Alan Somers from comment #1) Thanks Alan! A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=13f188ce0b51908c292cdbb85ef26962528af87b commit 13f188ce0b51908c292cdbb85ef26962528af87b Author: Alan Somers <asomers@FreeBSD.org> AuthorDate: 2023-09-20 21:37:31 +0000 Commit: Alan Somers <asomers@FreeBSD.org> CommitDate: 2023-10-03 01:10:13 +0000 fusefs: fix some bugs updating atime during close When using cached attributes, we must update a file's atime during close, if it has been read since the last attribute refresh. But, * Don't update atime if we lack write permissions to the file or if the file system is readonly. * If the daemon fails our atime update request for any reason, don't report this as a failure for VOP_CLOSE. PR: 270749 Reported by: Jamie Landeg-Jones <jamie@catflap.org> Sponsored by: Axcient Reviewed by: pfg Differential Revision: https://reviews.freebsd.org/D41925 (cherry picked from commit fb619c94c679e939496fe0cf94b8d2cba95e6e63) fusefs: fix unused variables from fb619c94c67 PR: 270749 Reported by: cy Sponsored by: Axcient (cherry picked from commit e5236d25f2c0709acf3547e6af45f4bb4eec4f02) sys/fs/fuse/fuse_vnops.c | 27 ++++++++-- tests/sys/fs/fusefs/access.cc | 2 +- tests/sys/fs/fusefs/default_permissions.cc | 41 ++++++++++++++- tests/sys/fs/fusefs/read.cc | 83 ++++++++++++++++++++++++++++++ 4 files changed, 147 insertions(+), 6 deletions(-) A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=13f188ce0b51908c292cdbb85ef26962528af87b commit 13f188ce0b51908c292cdbb85ef26962528af87b Author: Alan Somers <asomers@FreeBSD.org> AuthorDate: 2023-09-20 21:37:31 +0000 Commit: Alan Somers <asomers@FreeBSD.org> CommitDate: 2023-10-03 01:10:13 +0000 fusefs: fix some bugs updating atime during close When using cached attributes, we must update a file's atime during close, if it has been read since the last attribute refresh. But, * Don't update atime if we lack write permissions to the file or if the file system is readonly. * If the daemon fails our atime update request for any reason, don't report this as a failure for VOP_CLOSE. PR: 270749 Reported by: Jamie Landeg-Jones <jamie@catflap.org> Sponsored by: Axcient Reviewed by: pfg Differential Revision: https://reviews.freebsd.org/D41925 (cherry picked from commit fb619c94c679e939496fe0cf94b8d2cba95e6e63) fusefs: fix unused variables from fb619c94c67 PR: 270749 Reported by: cy Sponsored by: Axcient (cherry picked from commit e5236d25f2c0709acf3547e6af45f4bb4eec4f02) sys/fs/fuse/fuse_vnops.c | 27 ++++++++-- tests/sys/fs/fusefs/access.cc | 2 +- tests/sys/fs/fusefs/default_permissions.cc | 41 ++++++++++++++- tests/sys/fs/fusefs/read.cc | 83 ++++++++++++++++++++++++++++++ 4 files changed, 147 insertions(+), 6 deletions(-) A commit in branch releng/14.0 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=63c0b60063c7ce1022b07879e63fcef26fc0259a commit 63c0b60063c7ce1022b07879e63fcef26fc0259a Author: Alan Somers <asomers@FreeBSD.org> AuthorDate: 2023-09-20 21:37:31 +0000 Commit: Alan Somers <asomers@FreeBSD.org> CommitDate: 2023-10-03 21:45:28 +0000 fusefs: fix some bugs updating atime during close When using cached attributes, we must update a file's atime during close, if it has been read since the last attribute refresh. But, * Don't update atime if we lack write permissions to the file or if the file system is readonly. * If the daemon fails our atime update request for any reason, don't report this as a failure for VOP_CLOSE. PR: 270749 Reported by: Jamie Landeg-Jones <jamie@catflap.org> Sponsored by: Axcient Reviewed by: pfg Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D41925 (cherry picked from commit fb619c94c679e939496fe0cf94b8d2cba95e6e63) fusefs: fix unused variables from fb619c94c67 PR: 270749 Reported by: cy Sponsored by: Axcient Approved by: re (gjb) (cherry picked from commit e5236d25f2c0709acf3547e6af45f4bb4eec4f02) (cherry picked from commit 13f188ce0b51908c292cdbb85ef26962528af87b) sys/fs/fuse/fuse_vnops.c | 27 ++++++++-- tests/sys/fs/fusefs/access.cc | 2 +- tests/sys/fs/fusefs/default_permissions.cc | 41 ++++++++++++++- tests/sys/fs/fusefs/read.cc | 83 ++++++++++++++++++++++++++++++ 4 files changed, 147 insertions(+), 6 deletions(-) A commit in branch releng/14.0 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=63c0b60063c7ce1022b07879e63fcef26fc0259a commit 63c0b60063c7ce1022b07879e63fcef26fc0259a Author: Alan Somers <asomers@FreeBSD.org> AuthorDate: 2023-09-20 21:37:31 +0000 Commit: Alan Somers <asomers@FreeBSD.org> CommitDate: 2023-10-03 21:45:28 +0000 fusefs: fix some bugs updating atime during close When using cached attributes, we must update a file's atime during close, if it has been read since the last attribute refresh. But, * Don't update atime if we lack write permissions to the file or if the file system is readonly. * If the daemon fails our atime update request for any reason, don't report this as a failure for VOP_CLOSE. PR: 270749 Reported by: Jamie Landeg-Jones <jamie@catflap.org> Sponsored by: Axcient Reviewed by: pfg Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D41925 (cherry picked from commit fb619c94c679e939496fe0cf94b8d2cba95e6e63) fusefs: fix unused variables from fb619c94c67 PR: 270749 Reported by: cy Sponsored by: Axcient Approved by: re (gjb) (cherry picked from commit e5236d25f2c0709acf3547e6af45f4bb4eec4f02) (cherry picked from commit 13f188ce0b51908c292cdbb85ef26962528af87b) sys/fs/fuse/fuse_vnops.c | 27 ++++++++-- tests/sys/fs/fusefs/access.cc | 2 +- tests/sys/fs/fusefs/default_permissions.cc | 41 ++++++++++++++- tests/sys/fs/fusefs/read.cc | 83 ++++++++++++++++++++++++++++++ 4 files changed, 147 insertions(+), 6 deletions(-) A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=2d05cbe002726a28e11060a601d1877784f6d587 commit 2d05cbe002726a28e11060a601d1877784f6d587 Author: Alan Somers <asomers@FreeBSD.org> AuthorDate: 2023-09-20 21:37:31 +0000 Commit: Alan Somers <asomers@FreeBSD.org> CommitDate: 2023-10-05 16:16:11 +0000 fusefs: fix some bugs updating atime during close When using cached attributes, we must update a file's atime during close, if it has been read since the last attribute refresh. But, * Don't update atime if we lack write permissions to the file or if the file system is readonly. * If the daemon fails our atime update request for any reason, don't report this as a failure for VOP_CLOSE. PR: 270749 Reported by: Jamie Landeg-Jones <jamie@catflap.org> Sponsored by: Axcient Reviewed by: pfg Differential Revision: https://reviews.freebsd.org/D41925 (cherry picked from commit fb619c94c679e939496fe0cf94b8d2cba95e6e63) fusefs: fix unused variables from fb619c94c67 PR: 270749 Reported by: cy Sponsored by: Axcient (cherry picked from commit e5236d25f2c0709acf3547e6af45f4bb4eec4f02) sys/fs/fuse/fuse_vnops.c | 27 ++++++++-- tests/sys/fs/fusefs/access.cc | 2 +- tests/sys/fs/fusefs/default_permissions.cc | 41 ++++++++++++++- tests/sys/fs/fusefs/read.cc | 83 ++++++++++++++++++++++++++++++ 4 files changed, 147 insertions(+), 6 deletions(-) A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=2d05cbe002726a28e11060a601d1877784f6d587 commit 2d05cbe002726a28e11060a601d1877784f6d587 Author: Alan Somers <asomers@FreeBSD.org> AuthorDate: 2023-09-20 21:37:31 +0000 Commit: Alan Somers <asomers@FreeBSD.org> CommitDate: 2023-10-05 16:16:11 +0000 fusefs: fix some bugs updating atime during close When using cached attributes, we must update a file's atime during close, if it has been read since the last attribute refresh. But, * Don't update atime if we lack write permissions to the file or if the file system is readonly. * If the daemon fails our atime update request for any reason, don't report this as a failure for VOP_CLOSE. PR: 270749 Reported by: Jamie Landeg-Jones <jamie@catflap.org> Sponsored by: Axcient Reviewed by: pfg Differential Revision: https://reviews.freebsd.org/D41925 (cherry picked from commit fb619c94c679e939496fe0cf94b8d2cba95e6e63) fusefs: fix unused variables from fb619c94c67 PR: 270749 Reported by: cy Sponsored by: Axcient (cherry picked from commit e5236d25f2c0709acf3547e6af45f4bb4eec4f02) sys/fs/fuse/fuse_vnops.c | 27 ++++++++-- tests/sys/fs/fusefs/access.cc | 2 +- tests/sys/fs/fusefs/default_permissions.cc | 41 ++++++++++++++- tests/sys/fs/fusefs/read.cc | 83 ++++++++++++++++++++++++++++++ 4 files changed, 147 insertions(+), 6 deletions(-) |