diff options
author | Dan McDonald <[email protected]> | 2011-11-15 14:01:27 -0500 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2012-08-08 11:49:37 -0700 |
commit | d96eb2b1538db13ee7a716ec0e1162f5735edc12 (patch) | |
tree | 63f67c6b2136cd575c1b1cd5d949eb289ae75cae /include/sys | |
parent | ee5fd0bb80d68ef095f831784cbb17181b2ba898 (diff) |
Illumos #1693: persistent 'comment' field for a zpool
Reviewed by: George Wilson <[email protected]>
Reviewed by: Eric Schrock <[email protected]>
Approved by: Richard Lowe <[email protected]>
References:
https://www.illumos.org/issues/1693
Ported by: Martin Matuska <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #678
Diffstat (limited to 'include/sys')
-rw-r--r-- | include/sys/fs/zfs.h | 5 | ||||
-rw-r--r-- | include/sys/spa_impl.h | 1 | ||||
-rw-r--r-- | include/sys/zfs_context.h | 2 |
3 files changed, 8 insertions, 0 deletions
diff --git a/include/sys/fs/zfs.h b/include/sys/fs/zfs.h index 86d7ad515..13f9cdcfd 100644 --- a/include/sys/fs/zfs.h +++ b/include/sys/fs/zfs.h @@ -167,9 +167,13 @@ typedef enum { ZPOOL_PROP_ALLOCATED, ZPOOL_PROP_READONLY, ZPOOL_PROP_ASHIFT, + ZPOOL_PROP_COMMENT, ZPOOL_NUM_PROPS } zpool_prop_t; +/* Small enough to not hog a whole line of printout in zpool(1M). */ +#define ZPROP_MAX_COMMENT 32 + #define ZPROP_CONT -2 #define ZPROP_INVAL -1 @@ -500,6 +504,7 @@ typedef struct zpool_rewind_policy { #define ZPOOL_CONFIG_SPLIT_LIST "guid_list" #define ZPOOL_CONFIG_REMOVING "removing" #define ZPOOL_CONFIG_RESILVERING "resilvering" +#define ZPOOL_CONFIG_COMMENT "comment" #define ZPOOL_CONFIG_SUSPENDED "suspended" /* not stored on disk */ #define ZPOOL_CONFIG_TIMESTAMP "timestamp" /* not stored on disk */ #define ZPOOL_CONFIG_BOOTFS "bootfs" /* not stored on disk */ diff --git a/include/sys/spa_impl.h b/include/sys/spa_impl.h index 1317a9fc6..d367486a0 100644 --- a/include/sys/spa_impl.h +++ b/include/sys/spa_impl.h @@ -112,6 +112,7 @@ struct spa { * Fields protected by spa_namespace_lock. */ char spa_name[MAXNAMELEN]; /* pool name */ + char *spa_comment; /* comment */ avl_node_t spa_avl; /* node in spa_namespace_avl */ nvlist_t *spa_config; /* last synced config */ nvlist_t *spa_config_syncing; /* currently syncing config */ diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h index e4af6fc37..7bcdc9e98 100644 --- a/include/sys/zfs_context.h +++ b/include/sys/zfs_context.h @@ -60,6 +60,7 @@ #include <sys/zfs_debug.h> #include <sys/fm/fs/zfs.h> #include <sys/sunddi.h> +#include <sys/ctype.h> #include <linux/dcache_compat.h> #else /* _KERNEL */ @@ -92,6 +93,7 @@ #include <atomic.h> #include <dirent.h> #include <time.h> +#include <ctype.h> #include <sys/note.h> #include <sys/types.h> #include <sys/cred.h> |