diff options
author | Emil Tsalapatis <emil@etsalapatis.com> | 2024-02-08 01:13:43 +0000 |
---|---|---|
committer | Alan Somers <asomers@FreeBSD.org> | 2024-06-13 19:46:01 +0000 |
commit | bd11dd6fb9a0e4daa04f0fa66ed38d44f716e919 (patch) | |
tree | 69ca926b6d349d7857e8825718ca3c33f1c72451 /sys/fs | |
parent | f5f1f1115f5b8497b34a5394a0ed47d96a03a1b2 (diff) |
fusefs: only test for incoherency if FN_SIZECHANGE is set
FUSE emits spurious incoherency warnings in writethrough mode. The
warnings are triggered by setattr calls generated by vnode truncation
turning the cached va_size vattr stale, causing comparisons with the
fresh version provided by the server to fail. Only validate the vnode's
va_size vattr if the FN_SIZECHANGE flag is set.
This is a part of the research work at RCSLab, University of Waterloo.
Reviewed by: asomers
Pull Request: https://github.com/freebsd/freebsd-src/pull/1110
(cherry picked from commit 8758bf0aaec1d4b2ebcb429e8cabc691c2c95461)
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/fuse/fuse_internal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/fs/fuse/fuse_internal.c b/sys/fs/fuse/fuse_internal.c index c851cb2e34f4..adf84d30e801 100644 --- a/sys/fs/fuse/fuse_internal.c +++ b/sys/fs/fuse/fuse_internal.c @@ -270,10 +270,10 @@ fuse_internal_cache_attrs(struct vnode *vp, struct fuse_attr *attr, if (vnode_isreg(vp) && fvdat->cached_attrs.va_size != VNOVAL && + fvdat->flag & FN_SIZECHANGE && attr->size != fvdat->cached_attrs.va_size) { - if ( data->cache_mode == FUSE_CACHE_WB && - fvdat->flag & FN_SIZECHANGE) + if (data->cache_mode == FUSE_CACHE_WB) { const char *msg; |