Lines Matching full:mp

72 unionfs_domount(struct mount *mp)
92 UNIONFSDEBUG("unionfs_mount(mp = %p)\n", mp);
104 if (mp->mnt_flag & MNT_ROOTFS) {
105 vfs_mount_error(mp, "Cannot union mount root filesystem");
112 if (mp->mnt_flag & MNT_UPDATE) {
113 vfs_mount_error(mp, "unionfs does not support mount update");
120 error = vfs_getopt(mp->mnt_optnew, "target", (void **)&target, &len);
122 error = vfs_getopt(mp->mnt_optnew, "from", (void **)&target,
125 vfs_mount_error(mp, "Invalid target");
128 if (vfs_getopt(mp->mnt_optnew, "below", NULL, NULL) == 0)
130 if (vfs_getopt(mp->mnt_optnew, "udir", (void **)&tmp, NULL) == 0) {
134 vfs_mount_error(mp, "Invalid udir");
139 if (vfs_getopt(mp->mnt_optnew, "ufile", (void **)&tmp, NULL) == 0) {
143 vfs_mount_error(mp, "Invalid ufile");
154 vn_lock(mp->mnt_vnodecovered, LK_SHARED | LK_RETRY);
155 error = VOP_GETATTR(mp->mnt_vnodecovered, &va, mp->mnt_cred);
164 VOP_UNLOCK(mp->mnt_vnodecovered);
168 if (mp->mnt_cred->cr_ruid == 0) { /* root only */
169 if (vfs_getopt(mp->mnt_optnew, "uid", (void **)&tmp,
174 vfs_mount_error(mp, "Invalid uid");
178 if (vfs_getopt(mp->mnt_optnew, "gid", (void **)&tmp,
183 vfs_mount_error(mp, "Invalid gid");
187 if (vfs_getopt(mp->mnt_optnew, "copymode", (void **)&tmp,
190 vfs_mount_error(mp, "Invalid copymode");
199 vfs_mount_error(mp, "Invalid copymode");
203 if (vfs_getopt(mp->mnt_optnew, "whiteout", (void **)&tmp,
206 vfs_mount_error(mp, "Invalid whiteout mode");
213 vfs_mount_error(mp, "Invalid whiteout mode");
220 uid = mp->mnt_cred->cr_ruid;
221 gid = mp->mnt_cred->cr_rgid;
238 lowerrootvp = mp->mnt_vnodecovered;
267 mp->mnt_data = ump;
272 mp->mnt_flag |= ump->um_uppervp->v_mount->mnt_flag & MNT_RDONLY;
282 error = unionfs_nodeget(mp, ump->um_uppervp, ump->um_lowervp,
287 mp->mnt_data = NULL;
305 ump->um_lowermp = vfs_register_upper_from_vp(ump->um_lowervp, mp,
307 ump->um_uppermp = vfs_register_upper_from_vp(ump->um_uppervp, mp,
317 vflush(mp, 1, FORCECLOSE, curthread);
319 mp->mnt_data = NULL;
339 vn_lock(mp->mnt_vnodecovered, LK_EXCLUSIVE | LK_RETRY | LK_CANRECURSE);
340 mp->mnt_vnodecovered->v_vflag |= VV_CROSSLOCK;
341 VOP_UNLOCK(mp->mnt_vnodecovered);
344 MNT_ILOCK(mp);
347 mp->mnt_flag |= MNT_LOCAL;
348 mp->mnt_kern_flag |= MNTK_NOMSYNC | MNTK_UNIONFS |
350 MNT_IUNLOCK(mp);
355 vfs_getnewfsid(mp);
357 snprintf(mp->mnt_stat.f_mntfromname, MNAMELEN, "<%s>:%s",
361 mp->mnt_stat.f_mntfromname, mp->mnt_stat.f_mntonname);
370 unionfs_unmount(struct mount *mp, int mntflags)
378 UNIONFSDEBUG("unionfs_unmount: mp = %p\n", mp);
380 ump = MOUNTTOUNIONFSMOUNT(mp);
387 for (freeing = 0; (error = vflush(mp, 1, flags, curthread)) != 0;) {
388 num = mp->mnt_nvnodelistsize;
397 vn_lock(mp->mnt_vnodecovered, LK_EXCLUSIVE | LK_RETRY | LK_CANRECURSE);
398 mp->mnt_vnodecovered->v_vflag &= ~VV_CROSSLOCK;
399 VOP_UNLOCK(mp->mnt_vnodecovered);
403 mp->mnt_data = NULL;
409 unionfs_root(struct mount *mp, int flags, struct vnode **vpp)
414 ump = MOUNTTOUNIONFSMOUNT(mp);
430 unionfs_quotactl(struct mount *mp, int cmd, uid_t uid, void *arg,
438 ump = MOUNTTOUNIONFSMOUNT(mp);
453 vfs_unbusy(mp);
469 unionfs_statfs(struct mount *mp, struct statfs *sbp)
476 ump = MOUNTTOUNIONFSMOUNT(mp);
478 UNIONFSDEBUG("unionfs_statfs(mp = %p, lvp = %p, uvp = %p)\n",
479 mp, ump->um_lowervp, ump->um_uppervp);
525 unionfs_sync(struct mount *mp, int waitfor)
532 unionfs_vget(struct mount *mp, ino_t ino, int flags, struct vnode **vpp)
538 unionfs_fhtovp(struct mount *mp, struct fid *fidp, int flags,
545 unionfs_checkexp(struct mount *mp, struct sockaddr *nam, uint64_t *extflagsp,
552 unionfs_extattrctl(struct mount *mp, int cmd, struct vnode *filename_vp,
558 ump = MOUNTTOUNIONFSMOUNT(mp);