summaryrefslogtreecommitdiff
path: root/usr/src/common/zfs
diff options
context:
space:
mode:
authorahrens <none@none>2007-06-29 16:23:19 -0700
committerahrens <none@none>2007-06-29 16:23:19 -0700
commite7437265dc2a4920c197ed4337665539d358b22c (patch)
tree9c7cdf5fccdef976501b70787140cd3fe7260a3e /usr/src/common/zfs
parent5cb4fc8151d97cf08a87f2d1011efed091d169ea (diff)
downloadillumos-joyent-e7437265dc2a4920c197ed4337665539d358b22c.tar.gz
PSARC/2007/328 zfs upgrade
6552536 'zpool status -v' doesn't work with new (type-bearing) directory entries 6559635 can not import pool whose front labels are gone 6572636 need "zfs upgrade" to change ZPL version number 6572637 store object type in directory entries. 6572648 ZPL's delete queue should not be processed if the filesystem is mounted read-only 6572650 ZFS_VERSION should be SPA_VERSION for readability
Diffstat (limited to 'usr/src/common/zfs')
-rw-r--r--usr/src/common/zfs/zfs_deleg.c1
-rw-r--r--usr/src/common/zfs/zfs_prop.c16
2 files changed, 15 insertions, 2 deletions
diff --git a/usr/src/common/zfs/zfs_deleg.c b/usr/src/common/zfs/zfs_deleg.c
index 578d1c6680..d7c3046572 100644
--- a/usr/src/common/zfs/zfs_deleg.c
+++ b/usr/src/common/zfs/zfs_deleg.c
@@ -80,6 +80,7 @@ char *zfs_deleg_perm_tab[] = {
ZFS_DELEG_PERM_SHAREISCSI,
ZFS_DELEG_PERM_XATTR,
ZFS_DELEG_PERM_COPIES,
+ ZFS_DELEG_PERM_VERSION,
NULL
};
diff --git a/usr/src/common/zfs/zfs_prop.c b/usr/src/common/zfs/zfs_prop.c
index 887f20a2e1..96dacf49d8 100644
--- a/usr/src/common/zfs/zfs_prop.c
+++ b/usr/src/common/zfs/zfs_prop.c
@@ -51,6 +51,7 @@
#include <sys/spa.h>
#include <sys/zfs_acl.h>
#include <sys/zfs_ioctl.h>
+#include <sys/zfs_znode.h>
#include "zfs_prop.h"
#include "zfs_deleg.h"
@@ -204,7 +205,10 @@ static prop_desc_t zfs_prop_table[] = {
ZFS_DELEG_PERM_NONE },
{ "delegation", prop_type_boolean, 1, NULL, prop_default,
ZFS_TYPE_POOL, "on | off", "DELEGATION", B_TRUE,
- B_TRUE, ZFS_DELEG_PERM_NONE }
+ B_TRUE, ZFS_DELEG_PERM_NONE },
+ { "version", prop_type_index, 0, NULL, prop_default,
+ ZFS_TYPE_FILESYSTEM | ZFS_TYPE_SNAPSHOT, "1 | 2 | current",
+ "VERSION", B_TRUE, B_TRUE, ZFS_DELEG_PERM_VERSION },
};
#define ZFS_PROP_COUNT ((sizeof (zfs_prop_table))/(sizeof (prop_desc_t)))
@@ -517,6 +521,13 @@ static zfs_index_t copies_table[] = {
{ NULL }
};
+static zfs_index_t version_table[] = {
+ { "1", 1 },
+ { "2", 2 },
+ { "current", ZPL_VERSION },
+ { NULL }
+};
+
static zfs_index_t *
zfs_prop_index_table(zfs_prop_t prop)
{
@@ -533,12 +544,13 @@ zfs_prop_index_table(zfs_prop_t prop)
return (acl_inherit_table);
case ZFS_PROP_COPIES:
return (copies_table);
+ case ZFS_PROP_VERSION:
+ return (version_table);
default:
return (NULL);
}
}
-
/*
* Tables of index types, plus functions to convert between the user view
* (strings) and internal representation (uint64_t).