Lines Matching refs:zfsvfs
204 zfsvfs_t *zfsvfs = vp->v_vfsp->vfs_data; in zfsctl_root_inode_cb() local
211 return (zfsvfs->z_shares_dir); in zfsctl_root_inode_cb()
221 zfsctl_create(zfsvfs_t *zfsvfs) in zfsctl_create() argument
227 ASSERT(zfsvfs->z_ctldir == NULL); in zfsctl_create()
229 vp = gfs_root_create(sizeof (zfsctl_node_t), zfsvfs->z_vfs, in zfsctl_create()
235 VERIFY(VFS_ROOT(zfsvfs->z_vfs, &rvp) == 0); in zfsctl_create()
236 VERIFY(0 == sa_lookup(VTOZ(rvp)->z_sa_hdl, SA_ZPL_CRTIME(zfsvfs), in zfsctl_create()
248 zfsvfs->z_ctldir = vp; in zfsctl_create()
257 zfsctl_destroy(zfsvfs_t *zfsvfs) in zfsctl_destroy() argument
259 VN_RELE(zfsvfs->z_ctldir); in zfsctl_destroy()
260 zfsvfs->z_ctldir = NULL; in zfsctl_destroy()
351 zfsvfs_t *zfsvfs = vp->v_vfsp->vfs_data; in zfsctl_common_fid() local
357 ZFS_ENTER(zfsvfs); in zfsctl_common_fid()
361 ZFS_EXIT(zfsvfs); in zfsctl_common_fid()
376 ZFS_EXIT(zfsvfs); in zfsctl_common_fid()
385 zfsvfs_t *zfsvfs = vp->v_vfsp->vfs_data; in zfsctl_shares_fid() local
389 ZFS_ENTER(zfsvfs); in zfsctl_shares_fid()
391 if (zfsvfs->z_shares_dir == 0) { in zfsctl_shares_fid()
392 ZFS_EXIT(zfsvfs); in zfsctl_shares_fid()
396 if ((error = zfs_zget(zfsvfs, zfsvfs->z_shares_dir, &dzp)) == 0) { in zfsctl_shares_fid()
401 ZFS_EXIT(zfsvfs); in zfsctl_shares_fid()
426 zfsvfs_t *zfsvfs = vp->v_vfsp->vfs_data; in zfsctl_root_getattr() local
429 ZFS_ENTER(zfsvfs); in zfsctl_root_getattr()
435 ZFS_EXIT(zfsvfs); in zfsctl_root_getattr()
449 zfsvfs_t *zfsvfs = dvp->v_vfsp->vfs_data; in zfsctl_root_lookup() local
458 ZFS_ENTER(zfsvfs); in zfsctl_root_lookup()
467 ZFS_EXIT(zfsvfs); in zfsctl_root_lookup()
616 zfsvfs_t *zfsvfs; in zfsctl_snapdir_rename() local
622 zfsvfs = sdvp->v_vfsp->vfs_data; in zfsctl_snapdir_rename()
623 ZFS_ENTER(zfsvfs); in zfsctl_snapdir_rename()
625 if ((flags & FIGNORECASE) || zfsvfs->z_case == ZFS_CASE_INSENSITIVE) { in zfsctl_snapdir_rename()
626 err = dmu_snapshot_realname(zfsvfs->z_os, snm, real, in zfsctl_snapdir_rename()
631 ZFS_EXIT(zfsvfs); in zfsctl_snapdir_rename()
636 ZFS_EXIT(zfsvfs); in zfsctl_snapdir_rename()
638 dmu_objset_name(zfsvfs->z_os, fsname); in zfsctl_snapdir_rename()
682 zfsvfs_t *zfsvfs; in zfsctl_snapdir_remove() local
687 zfsvfs = dvp->v_vfsp->vfs_data; in zfsctl_snapdir_remove()
688 ZFS_ENTER(zfsvfs); in zfsctl_snapdir_remove()
690 if ((flags & FIGNORECASE) || zfsvfs->z_case == ZFS_CASE_INSENSITIVE) { in zfsctl_snapdir_remove()
692 err = dmu_snapshot_realname(zfsvfs->z_os, name, real, in zfsctl_snapdir_remove()
697 ZFS_EXIT(zfsvfs); in zfsctl_snapdir_remove()
702 ZFS_EXIT(zfsvfs); in zfsctl_snapdir_remove()
738 zfsvfs_t *zfsvfs = dvp->v_vfsp->vfs_data; in zfsctl_snapdir_mkdir() local
747 dmu_objset_name(zfsvfs->z_os, name); in zfsctl_snapdir_mkdir()
786 zfsvfs_t *zfsvfs = dvp->v_vfsp->vfs_data; in zfsctl_snapdir_lookup() local
806 ZFS_ENTER(zfsvfs); in zfsctl_snapdir_lookup()
808 if (gfs_lookup_dot(vpp, dvp, zfsvfs->z_ctldir, nm) == 0) { in zfsctl_snapdir_lookup()
809 ZFS_EXIT(zfsvfs); in zfsctl_snapdir_lookup()
816 err = dmu_snapshot_realname(zfsvfs->z_os, nm, real, in zfsctl_snapdir_lookup()
821 ZFS_EXIT(zfsvfs); in zfsctl_snapdir_lookup()
855 ZFS_EXIT(zfsvfs); in zfsctl_snapdir_lookup()
865 ZFS_EXIT(zfsvfs); in zfsctl_snapdir_lookup()
875 ZFS_EXIT(zfsvfs); in zfsctl_snapdir_lookup()
924 ASSERT(VTOZ(*vpp)->z_zfsvfs != zfsvfs); in zfsctl_snapdir_lookup()
925 VTOZ(*vpp)->z_zfsvfs->z_parent = zfsvfs; in zfsctl_snapdir_lookup()
926 (*vpp)->v_vfsp = zfsvfs->z_vfs; in zfsctl_snapdir_lookup()
930 ZFS_EXIT(zfsvfs); in zfsctl_snapdir_lookup()
949 zfsvfs_t *zfsvfs = dvp->v_vfsp->vfs_data; in zfsctl_shares_lookup() local
953 ZFS_ENTER(zfsvfs); in zfsctl_shares_lookup()
955 if (gfs_lookup_dot(vpp, dvp, zfsvfs->z_ctldir, nm) == 0) { in zfsctl_shares_lookup()
956 ZFS_EXIT(zfsvfs); in zfsctl_shares_lookup()
960 if (zfsvfs->z_shares_dir == 0) { in zfsctl_shares_lookup()
961 ZFS_EXIT(zfsvfs); in zfsctl_shares_lookup()
964 if ((error = zfs_zget(zfsvfs, zfsvfs->z_shares_dir, &dzp)) == 0) { in zfsctl_shares_lookup()
970 ZFS_EXIT(zfsvfs); in zfsctl_shares_lookup()
980 zfsvfs_t *zfsvfs = vp->v_vfsp->vfs_data; in zfsctl_snapdir_readdir_cb() local
986 ZFS_ENTER(zfsvfs); in zfsctl_snapdir_readdir_cb()
989 dsl_pool_config_enter(dmu_objset_pool(zfsvfs->z_os), FTAG); in zfsctl_snapdir_readdir_cb()
990 error = dmu_snapshot_list_next(zfsvfs->z_os, in zfsctl_snapdir_readdir_cb()
992 dsl_pool_config_exit(dmu_objset_pool(zfsvfs->z_os), FTAG); in zfsctl_snapdir_readdir_cb()
994 ZFS_EXIT(zfsvfs); in zfsctl_snapdir_readdir_cb()
1016 ZFS_EXIT(zfsvfs); in zfsctl_snapdir_readdir_cb()
1026 zfsvfs_t *zfsvfs = vp->v_vfsp->vfs_data; in zfsctl_shares_readdir() local
1030 ZFS_ENTER(zfsvfs); in zfsctl_shares_readdir()
1032 if (zfsvfs->z_shares_dir == 0) { in zfsctl_shares_readdir()
1033 ZFS_EXIT(zfsvfs); in zfsctl_shares_readdir()
1036 if ((error = zfs_zget(zfsvfs, zfsvfs->z_shares_dir, &dzp)) == 0) { in zfsctl_shares_readdir()
1044 ZFS_EXIT(zfsvfs); in zfsctl_shares_readdir()
1094 zfsvfs_t *zfsvfs = vp->v_vfsp->vfs_data; in zfsctl_shares_getattr() local
1098 ZFS_ENTER(zfsvfs); in zfsctl_shares_getattr()
1099 if (zfsvfs->z_shares_dir == 0) { in zfsctl_shares_getattr()
1100 ZFS_EXIT(zfsvfs); in zfsctl_shares_getattr()
1103 if ((error = zfs_zget(zfsvfs, zfsvfs->z_shares_dir, &dzp)) == 0) { in zfsctl_shares_getattr()
1107 ZFS_EXIT(zfsvfs); in zfsctl_shares_getattr()
1118 zfsvfs_t *zfsvfs = vp->v_vfsp->vfs_data; in zfsctl_snapdir_getattr() local
1121 ZFS_ENTER(zfsvfs); in zfsctl_snapdir_getattr()
1125 vap->va_ctime = vap->va_mtime = dmu_objset_snap_cmtime(zfsvfs->z_os); in zfsctl_snapdir_getattr()
1126 ZFS_EXIT(zfsvfs); in zfsctl_snapdir_getattr()
1262 zfsvfs_t *zfsvfs = vfsp->vfs_data; in zfsctl_lookup_objset() local
1269 ASSERT(zfsvfs->z_ctldir != NULL); in zfsctl_lookup_objset()
1270 error = zfsctl_root_lookup(zfsvfs->z_ctldir, "snapshot", &dvp, in zfsctl_lookup_objset()
1322 zfsvfs_t *zfsvfs = vfsp->vfs_data; in zfsctl_umount_snapshots() local
1328 ASSERT(zfsvfs->z_ctldir != NULL); in zfsctl_umount_snapshots()
1329 error = zfsctl_root_lookup(zfsvfs->z_ctldir, "snapshot", &dvp, in zfsctl_umount_snapshots()