Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/tarfs/tarfs_vfsops.c
Show First 20 Lines • Show All 868 Lines • ▼ Show 20 Lines | tarfs_alloc_mount(struct mount *mp, struct vnode *vp, | ||||
ASSERT_VOP_LOCKED(vp, __func__); | ASSERT_VOP_LOCKED(vp, __func__); | ||||
tmp = NULL; | tmp = NULL; | ||||
TARFS_DPF(ALLOC, "%s: Allocating tarfs mount structure for vp %p\n", | TARFS_DPF(ALLOC, "%s: Allocating tarfs mount structure for vp %p\n", | ||||
__func__, vp); | __func__, vp); | ||||
/* Get source metadata */ | /* Get source metadata */ | ||||
error = VOP_GETATTR(vp, &va, td->td_ucred); | error = VOP_GETATTR(vp, 0, &va, td->td_ucred); | ||||
if (error != 0) { | if (error != 0) { | ||||
return (error); | return (error); | ||||
} | } | ||||
VOP_UNLOCK(vp); | VOP_UNLOCK(vp); | ||||
mtime = va.va_mtime.tv_sec; | mtime = va.va_mtime.tv_sec; | ||||
mp->mnt_iosize_max = vp->v_mount->mnt_iosize_max; | mp->mnt_iosize_max = vp->v_mount->mnt_iosize_max; | ||||
▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | tarfs_mount(struct mount *mp) | ||||
if (mp->mnt_flag & MNT_UPDATE) | if (mp->mnt_flag & MNT_UPDATE) | ||||
return (EOPNOTSUPP); | return (EOPNOTSUPP); | ||||
if (vfs_filteropt(mp->mnt_optnew, tarfs_opts)) | if (vfs_filteropt(mp->mnt_optnew, tarfs_opts)) | ||||
return (EINVAL); | return (EINVAL); | ||||
vn_lock(mp->mnt_vnodecovered, LK_SHARED | LK_RETRY); | vn_lock(mp->mnt_vnodecovered, LK_SHARED | LK_RETRY); | ||||
error = VOP_GETATTR(mp->mnt_vnodecovered, &va, mp->mnt_cred); | error = VOP_GETATTR(mp->mnt_vnodecovered, 0, &va, mp->mnt_cred); | ||||
VOP_UNLOCK(mp->mnt_vnodecovered); | VOP_UNLOCK(mp->mnt_vnodecovered); | ||||
if (error) | if (error) | ||||
return (error); | return (error); | ||||
if (mp->mnt_cred->cr_ruid != 0 || | if (mp->mnt_cred->cr_ruid != 0 || | ||||
vfs_scanopt(mp->mnt_optnew, "gid", "%d", &root_gid) != 1) | vfs_scanopt(mp->mnt_optnew, "gid", "%d", &root_gid) != 1) | ||||
root_gid = va.va_gid; | root_gid = va.va_gid; | ||||
if (mp->mnt_cred->cr_ruid != 0 || | if (mp->mnt_cred->cr_ruid != 0 || | ||||
▲ Show 20 Lines • Show All 285 Lines • Show Last 20 Lines |