Skip to content

Commit 8758bf0

Browse files
etsalasomers
authored andcommitted
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 MFC after: 1 week Pull Request: freebsd#1110
1 parent 15cb9c0 commit 8758bf0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sys/fs/fuse/fuse_internal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,10 @@ fuse_internal_cache_attrs(struct vnode *vp, struct fuse_attr *attr,
269269

270270
if (vnode_isreg(vp) &&
271271
fvdat->cached_attrs.va_size != VNOVAL &&
272+
fvdat->flag & FN_SIZECHANGE &&
272273
attr->size != fvdat->cached_attrs.va_size)
273274
{
274-
if ( data->cache_mode == FUSE_CACHE_WB &&
275-
fvdat->flag & FN_SIZECHANGE)
275+
if (data->cache_mode == FUSE_CACHE_WB)
276276
{
277277
const char *msg;
278278

0 commit comments

Comments
 (0)