Lines Matching defs:mp
78 nullfs_mount(struct mount *mp)
89 NULLFSDEBUG("nullfs_mount(mp = %p)\n", (void *)mp);
91 if (mp->mnt_flag & MNT_ROOTFS)
97 if (mp->mnt_flag & MNT_UPDATE) {
101 if (vfs_flagopt(mp->mnt_optnew, "export", NULL, 0))
110 error = vfs_getopt(mp->mnt_optnew, "from", (void **)&target, &len);
112 error = vfs_getopt(mp->mnt_optnew, "target", (void **)&target, &len);
119 if (mp->mnt_vnodecovered->v_op == &null_vnodeops &&
120 VOP_ISLOCKED(mp->mnt_vnodecovered) == LK_EXCLUSIVE) {
121 VOP_UNLOCK(mp->mnt_vnodecovered);
139 vn_lock(mp->mnt_vnodecovered, LK_EXCLUSIVE | LK_RETRY);
153 if (mp->mnt_vnodecovered->v_op == &null_vnodeops) {
154 nn = VTONULL(mp->mnt_vnodecovered);
167 lowerrootvp->v_type != mp->mnt_vnodecovered->v_type) {
180 xmp->nullm_vfs = vfs_register_upper_from_vp(lowerrootvp, mp,
189 mp->mnt_data = xmp;
194 error = null_nodeget(mp, lowerrootvp, &nullm_rootvp);
203 MNT_ILOCK(mp);
204 mp->mnt_flag |= MNT_LOCAL;
205 MNT_IUNLOCK(mp);
208 if (vfs_getopt(mp->mnt_optnew, "cache", NULL, NULL) == 0) {
210 } else if (vfs_getopt(mp->mnt_optnew, "nocache", NULL, NULL) == 0) {
218 vfs_register_for_notification(xmp->nullm_vfs, mp,
222 if (lowerrootvp == mp->mnt_vnodecovered) {
228 MNT_ILOCK(mp);
230 mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag &
234 mp->mnt_kern_flag |= MNTK_NOMSYNC | MNTK_UNLOCKED_INSMNTQUE;
235 mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag &
237 MNT_IUNLOCK(mp);
238 vfs_getnewfsid(mp);
239 vfs_mountedfrom(mp, target);
243 mp->mnt_stat.f_mntfromname, mp->mnt_stat.f_mntonname);
251 nullfs_unmount(struct mount *mp, int mntflags)
256 NULLFSDEBUG("nullfs_unmount: mp = %p\n", (void *)mp);
265 error = vflush(mp, 0, flags, curthread);
268 MNT_ILOCK(mp);
269 if (mp->mnt_nvnodelistsize == 0) {
270 MNT_IUNLOCK(mp);
273 MNT_IUNLOCK(mp);
281 mntdata = mp->mnt_data;
286 if (mntdata->nullm_lowerrootvp == mp->mnt_vnodecovered) {
287 vn_lock(mp->mnt_vnodecovered, LK_EXCLUSIVE | LK_RETRY | LK_CANRECURSE);
288 mp->mnt_vnodecovered->v_vflag &= ~VV_CROSSLOCK;
289 VOP_UNLOCK(mp->mnt_vnodecovered);
293 mp->mnt_data = NULL;
299 nullfs_root(struct mount *mp, int flags, struct vnode **vpp)
305 mntdata = MOUNTTONULLMOUNT(mp);
306 NULLFSDEBUG("nullfs_root(mp = %p, vp = %p)\n", mp,
311 error = null_nodeget(mp, mntdata->nullm_lowerrootvp, &vp);
320 nullfs_quotactl(struct mount *mp, int cmd, uid_t uid, void *arg, bool *mp_busy)
327 mntdata = MOUNTTONULLMOUNT(mp);
338 vfs_unbusy(mp);
351 nullfs_statfs(struct mount *mp, struct statfs *sbp)
356 NULLFSDEBUG("nullfs_statfs(mp = %p, vp = %p->%p)\n", (void *)mp,
357 (void *)MOUNTTONULLMOUNT(mp)->nullm_rootvp,
358 (void *)NULLVPTOLOWERVP(MOUNTTONULLMOUNT(mp)->nullm_rootvp));
362 error = VFS_STATFS(MOUNTTONULLMOUNT(mp)->nullm_vfs, mstat);
382 nullfs_sync(struct mount *mp, int waitfor)
391 nullfs_vget(struct mount *mp, ino_t ino, int flags, struct vnode **vpp)
398 error = VFS_VGET(MOUNTTONULLMOUNT(mp)->nullm_vfs, ino, flags, vpp);
401 return (null_nodeget(mp, *vpp, vpp));
405 nullfs_fhtovp(struct mount *mp, struct fid *fidp, int flags, struct vnode **vpp)
409 error = VFS_FHTOVP(MOUNTTONULLMOUNT(mp)->nullm_vfs, fidp, flags,
413 return (null_nodeget(mp, *vpp, vpp));
417 nullfs_extattrctl(struct mount *mp, int cmd, struct vnode *filename_vp,
421 return (VFS_EXTATTRCTL(MOUNTTONULLMOUNT(mp)->nullm_vfs, cmd,
426 nullfs_reclaim_lowervp(struct mount *mp, struct vnode *lowervp)
430 vp = null_hashget(mp, lowervp);
439 nullfs_unlink_lowervp(struct mount *mp, struct vnode *lowervp)
444 vp = null_hashget(mp, lowervp);