Fix the comment in zfs.h
[zfs.git] / include / sys / fs / zfs.h
index a2b68ed..26c24fc 100644 (file)
@@ -21,6 +21,9 @@
 
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
+ * Copyright (c) 2012, Joyent, Inc. All rights reserved.
  */
 
 /* Portions Copyright 2010 Robert Milkowski */
@@ -60,7 +63,7 @@ typedef enum {
  * Dataset properties are identified by these constants and must be added to
  * the end of this list to ensure that external consumers are not affected
  * by the change. If you make any changes to this list, be sure to update
- * the property table in usr/src/common/zfs/zfs_prop.c.
+ * the property table in module/zcommon/zfs_prop.c.
  */
 typedef enum {
        ZFS_PROP_TYPE,
@@ -122,6 +125,10 @@ typedef enum {
        ZFS_PROP_DEDUP,
        ZFS_PROP_MLSLABEL,
        ZFS_PROP_SYNC,
+       ZFS_PROP_REFRATIO,
+       ZFS_PROP_WRITTEN,
+       ZFS_PROP_CLONES,
+       ZFS_PROP_SNAPDEV,
        ZFS_NUM_PROPS
 } zfs_prop_t;
 
@@ -139,7 +146,7 @@ extern const char *zfs_userquota_prop_prefixes[ZFS_NUM_USERQUOTA_PROPS];
  * Pool properties are identified by these constants and must be added to the
  * end of this list to ensure that external consumers are not affected
  * by the change. If you make any changes to this list, be sure to update
- * the property table in usr/src/common/zfs/zpool_prop.c.
+ * the property table in module/zcommon/zpool_prop.c.
  */
 typedef enum {
        ZPOOL_PROP_NAME,
@@ -162,9 +169,15 @@ typedef enum {
        ZPOOL_PROP_ALLOCATED,
        ZPOOL_PROP_READONLY,
        ZPOOL_PROP_ASHIFT,
+       ZPOOL_PROP_COMMENT,
+       ZPOOL_PROP_EXPANDSZ,
+       ZPOOL_PROP_FREEING,
        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
 
@@ -219,6 +232,7 @@ const char *zfs_prop_to_name(zfs_prop_t);
 zfs_prop_t zfs_name_to_prop(const char *);
 boolean_t zfs_prop_user(const char *);
 boolean_t zfs_prop_userquota(const char *);
+boolean_t zfs_prop_written(const char *);
 int zfs_prop_index_to_string(zfs_prop_t, uint64_t, const char **);
 int zfs_prop_string_to_index(zfs_prop_t, const char *, uint64_t *);
 uint64_t zfs_prop_random_value(zfs_prop_t, uint64_t seed);
@@ -232,6 +246,8 @@ const char *zpool_prop_to_name(zpool_prop_t);
 const char *zpool_prop_default_string(zpool_prop_t);
 uint64_t zpool_prop_default_numeric(zpool_prop_t);
 boolean_t zpool_prop_readonly(zpool_prop_t);
+boolean_t zpool_prop_feature(const char *);
+boolean_t zpool_prop_unsupported(const char *);
 int zpool_prop_index_to_string(zpool_prop_t, uint64_t, const char **);
 int zpool_prop_string_to_index(zpool_prop_t, const char *, uint64_t *);
 uint64_t zpool_prop_random_value(zpool_prop_t, uint64_t seed);
@@ -307,6 +323,11 @@ typedef enum {
        ZFS_SYNC_DISABLED = 2
 } zfs_sync_type_t;
 
+typedef enum {
+       ZFS_XATTR_OFF = 0,
+       ZFS_XATTR_DIR = 1,
+       ZFS_XATTR_SA = 2
+} zfs_xattr_type_t;
 
 /*
  * On-disk version number.
@@ -339,6 +360,7 @@ typedef enum {
 #define        SPA_VERSION_26                  26ULL
 #define        SPA_VERSION_27                  27ULL
 #define        SPA_VERSION_28                  28ULL
+#define        SPA_VERSION_5000                5000ULL
 
 /*
  * When bumping up SPA_VERSION, make sure GRUB ZFS understands the on-disk
@@ -346,8 +368,8 @@ typedef enum {
  * and do the appropriate changes.  Also bump the version number in
  * usr/src/grub/capability.
  */
-#define        SPA_VERSION                     SPA_VERSION_28
-#define        SPA_VERSION_STRING              "28"
+#define        SPA_VERSION                     SPA_VERSION_5000
+#define        SPA_VERSION_STRING              "5000"
 
 /*
  * Symbolic names for the changes that caused a SPA_VERSION switch.
@@ -398,6 +420,12 @@ typedef enum {
 #define        SPA_VERSION_DEADLISTS           SPA_VERSION_26
 #define        SPA_VERSION_FAST_SNAP           SPA_VERSION_27
 #define        SPA_VERSION_MULTI_REPLACE       SPA_VERSION_28
+#define        SPA_VERSION_BEFORE_FEATURES     SPA_VERSION_28
+#define        SPA_VERSION_FEATURES            SPA_VERSION_5000
+
+#define        SPA_VERSION_IS_SUPPORTED(v) \
+       (((v) >= SPA_VERSION_INITIAL && (v) <= SPA_VERSION_BEFORE_FEATURES) || \
+       ((v) >= SPA_VERSION_FEATURES && (v) <= SPA_VERSION))
 
 /*
  * ZPL version - rev'd whenever an incompatible on-disk format change
@@ -489,11 +517,18 @@ 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 */
 #define        ZPOOL_CONFIG_MISSING_DEVICES    "missing_vdevs" /* not stored on disk */
 #define        ZPOOL_CONFIG_LOAD_INFO          "load_info"     /* not stored on disk */
+#define        ZPOOL_CONFIG_REWIND_INFO        "rewind_info"   /* not stored on disk */
+#define        ZPOOL_CONFIG_UNSUP_FEAT         "unsup_feat"    /* not stored on disk */
+#define        ZPOOL_CONFIG_ENABLED_FEAT       "enabled_feat"  /* not stored on disk */
+#define        ZPOOL_CONFIG_CAN_RDONLY         "can_rdonly"    /* not stored on disk */
+#define        ZPOOL_CONFIG_FEATURES_FOR_READ  "features_for_read"
+#define        ZPOOL_CONFIG_FEATURE_STATS      "feature_stats" /* not stored on disk */
 /*
  * The persistent vdev state is stored as separate values rather than a single
  * 'vdev_state' entry.  This is because a device can be in multiple states, such
@@ -572,6 +607,7 @@ typedef enum vdev_aux {
        VDEV_AUX_BAD_LABEL,     /* the label is OK but invalid          */
        VDEV_AUX_VERSION_NEWER, /* on-disk version is too new           */
        VDEV_AUX_VERSION_OLDER, /* on-disk version is too old           */
+       VDEV_AUX_UNSUP_FEAT,    /* unsupported features                 */
        VDEV_AUX_SPARED,        /* hot spare used in another pool       */
        VDEV_AUX_ERR_EXCEEDED,  /* too many errors                      */
        VDEV_AUX_IO_FAILURE,    /* experienced I/O failure              */
@@ -662,6 +698,7 @@ typedef struct vdev_stat {
        uint64_t        vs_space;               /* total capacity       */
        uint64_t        vs_dspace;              /* deflated capacity    */
        uint64_t        vs_rsize;               /* replaceable dev size */
+       uint64_t        vs_esize;               /* expandable dev size */
        uint64_t        vs_ops[ZIO_TYPES];      /* operation count      */
        uint64_t        vs_bytes[ZIO_TYPES];    /* bytes read/written   */
        uint64_t        vs_read_errors;         /* read errors          */
@@ -756,7 +793,7 @@ typedef enum zfs_ioc {
        ZFS_IOC_ERROR_LOG,
        ZFS_IOC_CLEAR,
        ZFS_IOC_PROMOTE,
-       ZFS_IOC_DESTROY_SNAPS,
+       ZFS_IOC_DESTROY_SNAPS_NVL,
        ZFS_IOC_SNAPSHOT,
        ZFS_IOC_DSOBJ_TO_DSNAME,
        ZFS_IOC_OBJ_TO_PATH,
@@ -781,6 +818,11 @@ typedef enum zfs_ioc {
        ZFS_IOC_OBJ_TO_STATS,
        ZFS_IOC_EVENTS_NEXT,
        ZFS_IOC_EVENTS_CLEAR,
+       ZFS_IOC_POOL_REGUID,
+       ZFS_IOC_SPACE_WRITTEN,
+       ZFS_IOC_SPACE_SNAPS,
+       ZFS_IOC_POOL_REOPEN,
+       ZFS_IOC_SEND_PROGRESS,
 } zfs_ioc_t;
 
 /*
@@ -848,6 +890,7 @@ typedef enum {
  *     ESC_ZFS_RESILVER_START
  *     ESC_ZFS_RESILVER_END
  *     ESC_ZFS_POOL_DESTROY
+ *     ESC_ZFS_POOL_REGUID
  *
  *             ZFS_EV_POOL_NAME        DATA_TYPE_STRING
  *             ZFS_EV_POOL_GUID        DATA_TYPE_UINT64
@@ -913,6 +956,7 @@ typedef enum history_internal_events {
        LOG_DS_USER_HOLD,
        LOG_DS_USER_RELEASE,
        LOG_POOL_SPLIT,
+       LOG_POOL_GUID_CHANGE,
        LOG_END
 } history_internal_events_t;