Lines Matching full:mp

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