Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/fuse/fuse_internal.c
Show First 20 Lines • Show All 787 Lines • ▼ Show 20 Lines | fuse_internal_newentry_makerequest(struct mount *mp, | ||||
memcpy((char *)fdip->indata + bufsize, cnp->cn_nameptr, cnp->cn_namelen); | memcpy((char *)fdip->indata + bufsize, cnp->cn_nameptr, cnp->cn_namelen); | ||||
((char *)fdip->indata)[bufsize + cnp->cn_namelen] = '\0'; | ((char *)fdip->indata)[bufsize + cnp->cn_namelen] = '\0'; | ||||
} | } | ||||
int | int | ||||
fuse_internal_newentry_core(struct vnode *dvp, | fuse_internal_newentry_core(struct vnode *dvp, | ||||
struct vnode **vpp, | struct vnode **vpp, | ||||
struct componentname *cnp, | struct componentname *cnp, | ||||
enum vtype vtyp, | __enum_uint8(vtype) vtyp, | ||||
struct fuse_dispatcher *fdip) | struct fuse_dispatcher *fdip) | ||||
{ | { | ||||
int err = 0; | int err = 0; | ||||
struct fuse_entry_out *feo; | struct fuse_entry_out *feo; | ||||
struct mount *mp = vnode_mount(dvp); | struct mount *mp = vnode_mount(dvp); | ||||
if ((err = fdisp_wait_answ(fdip))) { | if ((err = fdisp_wait_answ(fdip))) { | ||||
return err; | return err; | ||||
Show All 24 Lines | |||||
int | int | ||||
fuse_internal_newentry(struct vnode *dvp, | fuse_internal_newentry(struct vnode *dvp, | ||||
struct vnode **vpp, | struct vnode **vpp, | ||||
struct componentname *cnp, | struct componentname *cnp, | ||||
enum fuse_opcode op, | enum fuse_opcode op, | ||||
void *buf, | void *buf, | ||||
size_t bufsize, | size_t bufsize, | ||||
enum vtype vtype) | __enum_uint8(vtype) vtype) | ||||
{ | { | ||||
int err; | int err; | ||||
struct fuse_dispatcher fdi; | struct fuse_dispatcher fdi; | ||||
struct mount *mp = vnode_mount(dvp); | struct mount *mp = vnode_mount(dvp); | ||||
fdisp_init(&fdi, 0); | fdisp_init(&fdi, 0); | ||||
fuse_internal_newentry_makerequest(mp, VTOI(dvp), cnp, op, buf, | fuse_internal_newentry_makerequest(mp, VTOI(dvp), cnp, op, buf, | ||||
bufsize, &fdi); | bufsize, &fdi); | ||||
▲ Show 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | fuse_internal_do_getattr(struct vnode *vp, struct vattr *vap, | ||||
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; | ||||
struct fuse_attr_out *fao; | struct fuse_attr_out *fao; | ||||
off_t old_filesize = fvdat->cached_attrs.va_size; | off_t old_filesize = fvdat->cached_attrs.va_size; | ||||
struct timespec old_atime = fvdat->cached_attrs.va_atime; | struct timespec old_atime = fvdat->cached_attrs.va_atime; | ||||
struct timespec old_ctime = fvdat->cached_attrs.va_ctime; | struct timespec old_ctime = fvdat->cached_attrs.va_ctime; | ||||
struct timespec old_mtime = fvdat->cached_attrs.va_mtime; | struct timespec old_mtime = fvdat->cached_attrs.va_mtime; | ||||
enum vtype vtyp; | __enum_uint8(vtype) vtyp; | ||||
int err; | int err; | ||||
ASSERT_VOP_LOCKED(vp, __func__); | ASSERT_VOP_LOCKED(vp, __func__); | ||||
fdisp_init(&fdi, sizeof(*fgai)); | fdisp_init(&fdi, sizeof(*fgai)); | ||||
fdisp_make_vp(&fdi, FUSE_GETATTR, vp, td, cred); | fdisp_make_vp(&fdi, FUSE_GETATTR, vp, td, cred); | ||||
fgai = fdi.indata; | fgai = fdi.indata; | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 225 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
struct fuse_vnode_data *fvdat; | struct fuse_vnode_data *fvdat; | ||||
struct fuse_dispatcher fdi; | struct fuse_dispatcher fdi; | ||||
struct fuse_setattr_in *fsai; | struct fuse_setattr_in *fsai; | ||||
struct mount *mp; | struct mount *mp; | ||||
pid_t pid = td->td_proc->p_pid; | pid_t pid = td->td_proc->p_pid; | ||||
struct fuse_data *data; | struct fuse_data *data; | ||||
int err = 0; | int err = 0; | ||||
enum vtype vtyp; | __enum_uint8(vtype) vtyp; | ||||
ASSERT_VOP_ELOCKED(vp, __func__); | ASSERT_VOP_ELOCKED(vp, __func__); | ||||
mp = vnode_mount(vp); | mp = vnode_mount(vp); | ||||
fvdat = VTOFUD(vp); | fvdat = VTOFUD(vp); | ||||
data = fuse_get_mpdata(mp); | data = fuse_get_mpdata(mp); | ||||
fdisp_init(&fdi, sizeof(*fsai)); | fdisp_init(&fdi, sizeof(*fsai)); | ||||
▲ Show 20 Lines • Show All 170 Lines • Show Last 20 Lines |