Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/fuse/fuse_node.c
Show First 20 Lines • Show All 148 Lines • ▼ Show 20 Lines | sysctl_fuse_cache_mode(SYSCTL_HANDLER_ARGS) | ||||
default: | default: | ||||
return (EDOM); | return (EDOM); | ||||
} | } | ||||
return (0); | return (0); | ||||
} | } | ||||
static void | static void | ||||
fuse_vnode_init(struct vnode *vp, struct fuse_vnode_data *fvdat, | fuse_vnode_init(struct vnode *vp, struct fuse_vnode_data *fvdat, | ||||
uint64_t nodeid, enum vtype vtyp) | uint64_t nodeid, __enum_uint8(vtype) vtyp) | ||||
{ | { | ||||
fvdat->nid = nodeid; | fvdat->nid = nodeid; | ||||
LIST_INIT(&fvdat->handles); | LIST_INIT(&fvdat->handles); | ||||
vattr_null(&fvdat->cached_attrs); | vattr_null(&fvdat->cached_attrs); | ||||
if (nodeid == FUSE_ROOT_ID) { | if (nodeid == FUSE_ROOT_ID) { | ||||
vp->v_vflag |= VV_ROOT; | vp->v_vflag |= VV_ROOT; | ||||
} | } | ||||
vp->v_type = vtyp; | vp->v_type = vtyp; | ||||
Show All 18 Lines | |||||
} | } | ||||
int | int | ||||
fuse_vnode_cmp(struct vnode *vp, void *nidp) | fuse_vnode_cmp(struct vnode *vp, void *nidp) | ||||
{ | { | ||||
return (VTOI(vp) != *((uint64_t *)nidp)); | return (VTOI(vp) != *((uint64_t *)nidp)); | ||||
} | } | ||||
SDT_PROBE_DEFINE3(fusefs, , node, stale_vnode, "struct vnode*", "enum vtype", | SDT_PROBE_DEFINE3(fusefs, , node, stale_vnode, "struct vnode*", "uint8_t", | ||||
"uint64_t"); | "uint64_t"); | ||||
static int | static int | ||||
fuse_vnode_alloc(struct mount *mp, | fuse_vnode_alloc(struct mount *mp, | ||||
struct thread *td, | struct thread *td, | ||||
uint64_t nodeid, | uint64_t nodeid, | ||||
enum vtype vtyp, | __enum_uint8(vtype) vtyp, | ||||
struct vnode **vpp) | struct vnode **vpp) | ||||
{ | { | ||||
struct fuse_data *data; | struct fuse_data *data; | ||||
struct fuse_vnode_data *fvdat; | struct fuse_vnode_data *fvdat; | ||||
struct vnode *vp2; | struct vnode *vp2; | ||||
int err = 0; | int err = 0; | ||||
data = fuse_get_mpdata(mp); | data = fuse_get_mpdata(mp); | ||||
▲ Show 20 Lines • Show All 77 Lines • ▼ Show 20 Lines | |||||
int | int | ||||
fuse_vnode_get(struct mount *mp, | fuse_vnode_get(struct mount *mp, | ||||
struct fuse_entry_out *feo, | struct fuse_entry_out *feo, | ||||
uint64_t nodeid, | uint64_t nodeid, | ||||
struct vnode *dvp, | struct vnode *dvp, | ||||
struct vnode **vpp, | struct vnode **vpp, | ||||
struct componentname *cnp, | struct componentname *cnp, | ||||
enum vtype vtyp) | __enum_uint8(vtype) vtyp) | ||||
{ | { | ||||
struct thread *td = curthread; | struct thread *td = curthread; | ||||
/* | /* | ||||
* feo should only be NULL for the root directory, which (when libfuse | * feo should only be NULL for the root directory, which (when libfuse | ||||
* is used) always has generation 0 | * is used) always has generation 0 | ||||
*/ | */ | ||||
uint64_t generation = feo ? feo->generation : 0; | uint64_t generation = feo ? feo->generation : 0; | ||||
int err = 0; | int err = 0; | ||||
▲ Show 20 Lines • Show All 236 Lines • Show Last 20 Lines |