Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/fuse/fuse_vfsops.c
Show First 20 Lines • Show All 586 Lines • ▼ Show 20 Lines | fuse_vfsop_vget(struct mount *mp, ino_t ino, int flags, struct vnode **vpp) | ||||
* We can get here: | * We can get here: | ||||
* * following attribute cache expiration, or | * * following attribute cache expiration, or | ||||
* * due a bug in the daemon, or | * * due a bug in the daemon, or | ||||
*/ | */ | ||||
fvdat = VTOFUD(*vpp); | fvdat = VTOFUD(*vpp); | ||||
if (vnode_isreg(*vpp) && | if (vnode_isreg(*vpp) && | ||||
filesize != fvdat->cached_attrs.va_size && | filesize != fvdat->cached_attrs.va_size && | ||||
fvdat->flag & FN_SIZECHANGE) { | fvdat->flag & FN_SIZECHANGE) { | ||||
if (data->cache_mode == fuse_data_cache_mode) { | |||||
const char *msg; | |||||
if (fuse_libabi_geq(data, 7, 23)) { | |||||
msg = "writeback cache incoherent!." | |||||
"To prevent data corruption, disable " | |||||
"the writeback cache according to your " | |||||
"FUSE server's documentation."; | |||||
} else { | |||||
msg = "writeback cache incoherent!." | |||||
"To prevent data corruption, disable " | |||||
"the writeback cache by setting " | |||||
"vfs.fusefs.data_cache_mode to 0 or 1."; | |||||
} | |||||
fuse_warn(data, FSESS_WARN_WB_CACHE_INCOHERENT, msg); | |||||
} else { | |||||
/* If we get here, it's likely a fusefs kernel bug */ | |||||
printf("%s: WB cache incoherent on %s!\n", __func__, | printf("%s: WB cache incoherent on %s!\n", __func__, | ||||
vnode_mount(*vpp)->mnt_stat.f_mntonname); | vnode_mount(*vpp)->mnt_stat.f_mntonname); | ||||
} | |||||
fvdat->flag &= ~FN_SIZECHANGE; | fvdat->flag &= ~FN_SIZECHANGE; | ||||
} | } | ||||
fuse_internal_cache_attrs(*vpp, &feo->attr, feo->attr_valid, | fuse_internal_cache_attrs(*vpp, &feo->attr, feo->attr_valid, | ||||
feo->attr_valid_nsec, NULL); | feo->attr_valid_nsec, NULL); | ||||
fuse_validity_2_bintime(feo->entry_valid, feo->entry_valid_nsec, | fuse_validity_2_bintime(feo->entry_valid, feo->entry_valid_nsec, | ||||
&fvdat->entry_cache_timeout); | &fvdat->entry_cache_timeout); | ||||
out: | out: | ||||
▲ Show 20 Lines • Show All 94 Lines • Show Last 20 Lines |