aboutsummaryrefslogtreecommitdiff
path: root/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
index 01fae24d699e..9e0b8a0998c3 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
@@ -112,7 +112,7 @@ snapentry_compare(const void *a, const void *b)
return (0);
}
-#ifdef sun
+#ifdef illumos
vnodeops_t *zfsctl_ops_root;
vnodeops_t *zfsctl_ops_snapdir;
vnodeops_t *zfsctl_ops_snapshot;
@@ -123,20 +123,20 @@ static const fs_operation_def_t zfsctl_tops_root[];
static const fs_operation_def_t zfsctl_tops_snapdir[];
static const fs_operation_def_t zfsctl_tops_snapshot[];
static const fs_operation_def_t zfsctl_tops_shares[];
-#else /* !sun */
+#else
static struct vop_vector zfsctl_ops_root;
static struct vop_vector zfsctl_ops_snapdir;
static struct vop_vector zfsctl_ops_snapshot;
static struct vop_vector zfsctl_ops_shares;
static struct vop_vector zfsctl_ops_shares_dir;
-#endif /* !sun */
+#endif
static vnode_t *zfsctl_mknode_snapdir(vnode_t *);
static vnode_t *zfsctl_mknode_shares(vnode_t *);
static vnode_t *zfsctl_snapshot_mknode(vnode_t *, uint64_t objset);
static int zfsctl_unmount_snap(zfs_snapentry_t *, int, cred_t *);
-#ifdef sun
+#ifdef illumos
static gfs_opsvec_t zfsctl_opsvec[] = {
{ ".zfs", zfsctl_tops_root, &zfsctl_ops_root },
{ ".zfs/snapshot", zfsctl_tops_snapdir, &zfsctl_ops_snapdir },
@@ -145,7 +145,7 @@ static gfs_opsvec_t zfsctl_opsvec[] = {
{ ".zfs/shares/vnode", zfsctl_tops_shares, &zfsctl_ops_shares },
{ NULL }
};
-#endif /* sun */
+#endif
/*
* Root directory elements. We only have two entries
@@ -170,7 +170,7 @@ static gfs_dirent_t zfsctl_root_entries[] = {
void
zfsctl_init(void)
{
-#ifdef sun
+#ifdef illumos
VERIFY(gfs_make_opsvec(zfsctl_opsvec) == 0);
#endif
}
@@ -178,7 +178,7 @@ zfsctl_init(void)
void
zfsctl_fini(void)
{
-#ifdef sun
+#ifdef illumos
/*
* Remove vfsctl vnode ops
*/
@@ -198,7 +198,7 @@ zfsctl_fini(void)
zfsctl_ops_snapshot = NULL;
zfsctl_ops_shares = NULL;
zfsctl_ops_shares_dir = NULL;
-#endif /* sun */
+#endif /* illumos */
}
boolean_t
@@ -549,7 +549,7 @@ zfsctl_root_lookup(vnode_t *dvp, char *nm, vnode_t **vpp, pathname_t *pnp,
return (err);
}
-#ifdef sun
+#ifdef illumos
static int
zfsctl_pathconf(vnode_t *vp, int cmd, ulong_t *valp, cred_t *cr,
caller_context_t *ct)
@@ -565,9 +565,9 @@ zfsctl_pathconf(vnode_t *vp, int cmd, ulong_t *valp, cred_t *cr,
return (fs_pathconf(vp, cmd, valp, cr, ct));
}
-#endif /* sun */
+#endif /* illumos */
-#ifdef sun
+#ifdef illumos
static const fs_operation_def_t zfsctl_tops_root[] = {
{ VOPNAME_OPEN, { .vop_open = zfsctl_common_open } },
{ VOPNAME_CLOSE, { .vop_close = zfsctl_common_close } },
@@ -582,7 +582,7 @@ static const fs_operation_def_t zfsctl_tops_root[] = {
{ VOPNAME_FID, { .vop_fid = zfsctl_common_fid } },
{ NULL }
};
-#endif /* sun */
+#endif /* illumos */
/*
* Special case the handling of "..".
@@ -676,7 +676,7 @@ zfsctl_unmount_snap(zfs_snapentry_t *sep, int fflags, cred_t *cr)
if ((error = vn_vfswlock(svp)) != 0)
return (error);
-#ifdef sun
+#ifdef illumos
VN_HOLD(svp);
error = dounmount(vn_mountedvfs(svp), fflags, cr);
if (error) {
@@ -696,12 +696,12 @@ zfsctl_unmount_snap(zfs_snapentry_t *sep, int fflags, cred_t *cr)
kmem_free(sep, sizeof (zfs_snapentry_t));
return (0);
-#else /* !sun */
+#else
return (dounmount(vn_mountedvfs(svp), fflags, curthread));
-#endif /* !sun */
+#endif
}
-#ifdef sun
+#ifdef illumos
static void
zfsctl_rename_snap(zfsctl_snapdir_t *sdp, zfs_snapentry_t *sep, const char *nm)
{
@@ -754,9 +754,9 @@ zfsctl_rename_snap(zfsctl_snapdir_t *sdp, zfs_snapentry_t *sep, const char *nm)
vfs_unlock(vfsp);
}
-#endif /* sun */
+#endif /* illumos */
-#ifdef sun
+#ifdef illumos
/*ARGSUSED*/
static int
zfsctl_snapdir_rename(vnode_t *sdvp, char *snm, vnode_t *tdvp, char *tnm,
@@ -821,9 +821,9 @@ zfsctl_snapdir_rename(vnode_t *sdvp, char *snm, vnode_t *tdvp, char *tnm,
return (err);
}
-#endif /* sun */
+#endif /* illumos */
-#ifdef sun
+#ifdef illumos
/* ARGSUSED */
static int
zfsctl_snapdir_remove(vnode_t *dvp, char *name, vnode_t *cwd, cred_t *cr,
@@ -879,7 +879,7 @@ zfsctl_snapdir_remove(vnode_t *dvp, char *name, vnode_t *cwd, cred_t *cr,
return (err);
}
-#endif /* sun */
+#endif /* illumos */
/*
* This creates a snapshot under '.zfs/snapshot'.
@@ -1067,7 +1067,7 @@ zfsctl_snapdir_lookup(ap)
}
ZFS_EXIT(zfsvfs);
return (err);
-#endif /* !illumos */
+#endif /* illumos */
}
sep = kmem_alloc(sizeof (zfs_snapentry_t), KM_SLEEP);
@@ -1374,7 +1374,7 @@ zfsctl_snapdir_inactive(ap)
return (0);
}
-#ifdef sun
+#ifdef illumos
static const fs_operation_def_t zfsctl_tops_snapdir[] = {
{ VOPNAME_OPEN, { .vop_open = zfsctl_common_open } },
{ VOPNAME_CLOSE, { .vop_close = zfsctl_common_close } },
@@ -1405,7 +1405,7 @@ static const fs_operation_def_t zfsctl_tops_shares[] = {
{ VOPNAME_FID, { .vop_fid = zfsctl_shares_fid } },
{ NULL }
};
-#else /* !sun */
+#else /* !illumos */
static struct vop_vector zfsctl_ops_snapdir = {
.vop_default = &default_vnodeops,
.vop_open = zfsctl_common_open,
@@ -1434,7 +1434,7 @@ static struct vop_vector zfsctl_ops_shares = {
.vop_reclaim = gfs_vop_reclaim,
.vop_fid = zfsctl_shares_fid,
};
-#endif /* !sun */
+#endif /* illumos */
/*
* pvp is the GFS vnode '.zfs/snapshot'.