version 1.87, 2010/02/17 14:32:08 |
version 1.87.2.2, 2010/05/30 05:17:56 |
Line 111 puffs_vfsop_mount(struct mount *mp, cons |
|
Line 111 puffs_vfsop_mount(struct mount *mp, cons |
|
|
|
args = (struct puffs_kargs *)data; |
args = (struct puffs_kargs *)data; |
|
|
/* devel phase */ |
if (args->pa_vers != PUFFSVERSION) { |
if (args->pa_vers != (PUFFSVERSION | PUFFSDEVELVERS)) { |
|
printf("puffs_mount: development version mismatch: " |
printf("puffs_mount: development version mismatch: " |
"kernel %d, lib %d\n", |
"kernel %d, lib %d\n", PUFFSVERSION, args->pa_vers); |
PUFFSVERSION, args->pa_vers & ~PUFFSDEVELVERS); |
|
error = EINVAL; |
error = EINVAL; |
goto out; |
goto out; |
} |
} |
Line 515 pageflush(struct mount *mp, kauth_cred_t |
|
Line 513 pageflush(struct mount *mp, kauth_cred_t |
|
if (vp->v_mount != mp || vismarker(vp)) |
if (vp->v_mount != mp || vismarker(vp)) |
continue; |
continue; |
|
|
mutex_enter(&vp->v_interlock); |
mutex_enter(vp->v_interlock); |
pn = VPTOPP(vp); |
pn = VPTOPP(vp); |
if (vp->v_type != VREG || UVM_OBJ_IS_CLEAN(&vp->v_uobj)) { |
if (vp->v_type != VREG || UVM_OBJ_IS_CLEAN(&vp->v_uobj)) { |
mutex_exit(&vp->v_interlock); |
mutex_exit(vp->v_interlock); |
continue; |
continue; |
} |
} |
|
|
Line 551 pageflush(struct mount *mp, kauth_cred_t |
|
Line 549 pageflush(struct mount *mp, kauth_cred_t |
|
|
|
/* hmm.. is the FAF thing entirely sensible? */ |
/* hmm.. is the FAF thing entirely sensible? */ |
if (waitfor == MNT_LAZY) { |
if (waitfor == MNT_LAZY) { |
mutex_enter(&vp->v_interlock); |
mutex_enter(vp->v_interlock); |
pn->pn_stat |= PNODE_FAF; |
pn->pn_stat |= PNODE_FAF; |
mutex_exit(&vp->v_interlock); |
mutex_exit(vp->v_interlock); |
} |
} |
rv = VOP_FSYNC(vp, cred, waitfor, 0, 0); |
rv = VOP_FSYNC(vp, cred, waitfor, 0, 0); |
if (waitfor == MNT_LAZY) { |
if (waitfor == MNT_LAZY) { |
mutex_enter(&vp->v_interlock); |
mutex_enter(vp->v_interlock); |
pn->pn_stat &= ~PNODE_FAF; |
pn->pn_stat &= ~PNODE_FAF; |
mutex_exit(&vp->v_interlock); |
mutex_exit(vp->v_interlock); |
} |
} |
if (rv) |
if (rv) |
error = rv; |
error = rv; |
Line 758 puffs_vfsop_snapshot(struct mount *mp, s |
|
Line 756 puffs_vfsop_snapshot(struct mount *mp, s |
|
return EOPNOTSUPP; |
return EOPNOTSUPP; |
} |
} |
|
|
|
int |
|
puffs_vfsop_extattrctl(struct mount *mp, int cmd, struct vnode *vp, |
|
int attrnamespace, const char *attrname) |
|
{ |
|
PUFFS_MSG_VARS(vfs, extattrctl); |
|
struct puffs_mount *pmp = MPTOPUFFSMP(mp); |
|
struct puffs_node *pnp; |
|
puffs_cookie_t pnc; |
|
int error, flags; |
|
|
|
if (vp) { |
|
/* doesn't make sense for puffs servers */ |
|
if (vp->v_mount != mp) |
|
return EXDEV; |
|
pnp = vp->v_data; |
|
pnc = pnp->pn_cookie; |
|
flags = PUFFS_EXTATTRCTL_HASNODE; |
|
} else { |
|
pnp = pnc = NULL; |
|
flags = 0; |
|
} |
|
|
|
PUFFS_MSG_ALLOC(vfs, extattrctl); |
|
extattrctl_msg->pvfsr_cmd = cmd; |
|
extattrctl_msg->pvfsr_attrnamespace = attrnamespace; |
|
extattrctl_msg->pvfsr_flags = flags; |
|
if (attrname) { |
|
strlcpy(extattrctl_msg->pvfsr_attrname, attrname, |
|
sizeof(extattrctl_msg->pvfsr_attrname)); |
|
extattrctl_msg->pvfsr_flags |= PUFFS_EXTATTRCTL_HASATTRNAME; |
|
} |
|
puffs_msg_setinfo(park_extattrctl, |
|
PUFFSOP_VFS, PUFFS_VFS_EXTATTRCTL, pnc); |
|
|
|
puffs_msg_enqueue(pmp, park_extattrctl); |
|
if (vp) { |
|
mutex_enter(&pnp->pn_mtx); |
|
puffs_referencenode(pnp); |
|
mutex_exit(&pnp->pn_mtx); |
|
VOP_UNLOCK(vp, 0); |
|
} |
|
error = puffs_msg_wait2(pmp, park_extattrctl, pnp, NULL); |
|
PUFFS_MSG_RELEASE(extattrctl); |
|
if (vp) { |
|
puffs_releasenode(pnp); |
|
} |
|
|
|
return checkerr(pmp, error, __func__); |
|
} |
|
|
const struct vnodeopv_desc * const puffs_vnodeopv_descs[] = { |
const struct vnodeopv_desc * const puffs_vnodeopv_descs[] = { |
&puffs_vnodeop_opv_desc, |
&puffs_vnodeop_opv_desc, |
&puffs_specop_opv_desc, |
&puffs_specop_opv_desc, |
Line 784 struct vfsops puffs_vfsops = { |
|
Line 832 struct vfsops puffs_vfsops = { |
|
puffs_vfsop_done, /* done */ |
puffs_vfsop_done, /* done */ |
NULL, /* mountroot */ |
NULL, /* mountroot */ |
puffs_vfsop_snapshot, /* snapshot */ |
puffs_vfsop_snapshot, /* snapshot */ |
vfs_stdextattrctl, /* extattrctl */ |
puffs_vfsop_extattrctl, /* extattrctl */ |
(void *)eopnotsupp, /* suspendctl */ |
(void *)eopnotsupp, /* suspendctl */ |
genfs_renamelock_enter, |
genfs_renamelock_enter, |
genfs_renamelock_exit, |
genfs_renamelock_exit, |