Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/fuse/fuse_internal.c
Show First 20 Lines • Show All 864 Lines • ▼ Show 20 Lines | fuse_internal_forget_send(struct mount *mp, | ||||
ffi = fdi.indata; | ffi = fdi.indata; | ||||
ffi->nlookup = nlookup; | ffi->nlookup = nlookup; | ||||
fuse_insert_message(fdi.tick, false); | fuse_insert_message(fdi.tick, false); | ||||
fdisp_destroy(&fdi); | fdisp_destroy(&fdi); | ||||
} | } | ||||
SDT_PROBE_DEFINE2(fusefs, , internal, getattr_cache_incoherent, | |||||
"struct vnode*", "struct fuse_attr_out*"); | |||||
/* Fetch the vnode's attributes from the daemon*/ | /* Fetch the vnode's attributes from the daemon*/ | ||||
int | int | ||||
fuse_internal_do_getattr(struct vnode *vp, struct vattr *vap, | fuse_internal_do_getattr(struct vnode *vp, struct vattr *vap, | ||||
struct ucred *cred, struct thread *td) | struct ucred *cred, struct thread *td) | ||||
{ | { | ||||
struct fuse_dispatcher fdi; | struct fuse_dispatcher fdi; | ||||
struct fuse_vnode_data *fvdat = VTOFUD(vp); | struct fuse_vnode_data *fvdat = VTOFUD(vp); | ||||
struct fuse_getattr_in *fgai; | struct fuse_getattr_in *fgai; | ||||
Show All 28 Lines | if (fvdat->flag & FN_CTIMECHANGE) { | ||||
fao->attr.ctimensec = old_ctime.tv_nsec; | fao->attr.ctimensec = old_ctime.tv_nsec; | ||||
} | } | ||||
if (fvdat->flag & FN_MTIMECHANGE) { | if (fvdat->flag & FN_MTIMECHANGE) { | ||||
fao->attr.mtime = old_mtime.tv_sec; | fao->attr.mtime = old_mtime.tv_sec; | ||||
fao->attr.mtimensec = old_mtime.tv_nsec; | fao->attr.mtimensec = old_mtime.tv_nsec; | ||||
} | } | ||||
if (vnode_isreg(vp) && | if (vnode_isreg(vp) && | ||||
fvdat->cached_attrs.va_size != VNOVAL && | fvdat->cached_attrs.va_size != VNOVAL && | ||||
fao->attr.size != fvdat->cached_attrs.va_size) { | fao->attr.size != fvdat->cached_attrs.va_size) { | ||||
/* | /* | ||||
emaste: This change seems to be un-style(9)ing | |||||
Done Inline ActionsOk, I'll revert this line. asomers: Ok, I'll revert this line. | |||||
* The server changed the file's size even though we had it | * The server changed the file's size even though we had it | ||||
* cached! That's a server bug. | * cached! That's a server bug. | ||||
*/ | */ | ||||
SDT_PROBE2(fusefs, , internal, getattr_cache_incoherent, vp, | struct mount *mp = vnode_mount(vp); | ||||
fao); | struct fuse_data *data = fuse_get_mpdata(mp); | ||||
printf("%s: cache incoherent on %s! " | |||||
"Buggy FUSE server detected. To prevent data corruption, " | fuse_warn(data, FSESS_WARN_CACHE_INCOHERENT, | ||||
"disable the data cache by mounting with -o direct_io, or " | "cache incoherent! " | ||||
"as directed otherwise by your FUSE server's " | "To prevent data corruption, disable the data cache " | ||||
"documentation\n", __func__, | "by mounting with -o direct_io, or as directed " | ||||
vnode_mount(vp)->mnt_stat.f_mntonname); | "otherwise by your FUSE server's documentation."); | ||||
int iosize = fuse_iosize(vp); | int iosize = fuse_iosize(vp); | ||||
v_inval_buf_range(vp, 0, INT64_MAX, iosize); | v_inval_buf_range(vp, 0, INT64_MAX, iosize); | ||||
} | } | ||||
fuse_internal_cache_attrs(vp, &fao->attr, fao->attr_valid, | fuse_internal_cache_attrs(vp, &fao->attr, fao->attr_valid, | ||||
fao->attr_valid_nsec, vap); | fao->attr_valid_nsec, vap); | ||||
if (vtyp != vnode_vtype(vp)) { | if (vtyp != vnode_vtype(vp)) { | ||||
fuse_internal_vnode_disappear(vp); | fuse_internal_vnode_disappear(vp); | ||||
err = ENOENT; | err = ENOENT; | ||||
▲ Show 20 Lines • Show All 368 Lines • Show Last 20 Lines |
This change seems to be un-style(9)ing