[Bug 273094] getfsstat can return unexpectedly stale statfs data.
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 273094] getfsstat can return unexpectedly stale statfs data."
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 13 Aug 2023 09:31:58 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273094 --- Comment #1 from Peter Jeremy <peterj@FreeBSD.org> --- Actually, having more carefully read the sources, statfs(2) doesn't update the cached values, only calling getfsstat(2) with MNT_WAIT works. I think that's even more of a POLA violation because it means that data returned by getfstatfs() can be older than data returned by statfs(). IMO, the logic in kern/vfs_mount.c:__vfs_statfs() should be inverted so that it always calls mp->mnt_op->vfs_statfs(mp, &mp->mnt_stat) and then copies the result to sbp if required, though I'm not sure of the subtleties that may be involved. -- You are receiving this mail because: You are the assignee for the bug.