Print this page
2882 implement libzfs_core
2883 changing "canmount" property to "on" should not always remount dataset
2900 "zfs snapshot" should be able to create multiple, arbitrary snapshots at once
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Chris Siden <christopher.siden@delphix.com>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Reviewed by: Bill Pijewski <wdp@joyent.com>
Reviewed by: Dan Kruchinin <dan.kruchinin@gmail.com>

@@ -50,10 +50,20 @@
         ZFS_TYPE_SNAPSHOT       = 0x2,
         ZFS_TYPE_VOLUME         = 0x4,
         ZFS_TYPE_POOL           = 0x8
 } zfs_type_t;
 
+typedef enum dmu_objset_type {
+        DMU_OST_NONE,
+        DMU_OST_META,
+        DMU_OST_ZFS,
+        DMU_OST_ZVOL,
+        DMU_OST_OTHER,                  /* For testing only! */
+        DMU_OST_ANY,                    /* Be careful! */
+        DMU_OST_NUMTYPES
+} dmu_objset_type_t;
+
 #define ZFS_TYPE_DATASET        \
         (ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME | ZFS_TYPE_SNAPSHOT)
 
 #define ZAP_MAXNAMELEN 256
 #define ZAP_MAXVALUELEN (1024 * 8)

@@ -742,14 +752,14 @@
 #define ZVOL_DEFAULT_BLOCKSIZE  8192
 
 /*
  * /dev/zfs ioctl numbers.
  */
-#define ZFS_IOC         ('Z' << 8)
-
 typedef enum zfs_ioc {
-        ZFS_IOC_POOL_CREATE = ZFS_IOC,
+        ZFS_IOC_FIRST = ('Z' << 8),
+        ZFS_IOC = ZFS_IOC_FIRST,
+        ZFS_IOC_POOL_CREATE = ZFS_IOC_FIRST,
         ZFS_IOC_POOL_DESTROY,
         ZFS_IOC_POOL_IMPORT,
         ZFS_IOC_POOL_EXPORT,
         ZFS_IOC_POOL_CONFIGS,
         ZFS_IOC_POOL_STATS,

@@ -804,14 +814,19 @@
         ZFS_IOC_DIFF,
         ZFS_IOC_TMP_SNAPSHOT,
         ZFS_IOC_OBJ_TO_STATS,
         ZFS_IOC_SPACE_WRITTEN,
         ZFS_IOC_SPACE_SNAPS,
-        ZFS_IOC_DESTROY_SNAPS_NVL,
+        ZFS_IOC_DESTROY_SNAPS,
         ZFS_IOC_POOL_REGUID,
         ZFS_IOC_POOL_REOPEN,
-        ZFS_IOC_SEND_PROGRESS
+        ZFS_IOC_SEND_PROGRESS,
+        ZFS_IOC_LOG_HISTORY,
+        ZFS_IOC_SEND_NEW,
+        ZFS_IOC_SEND_SPACE,
+        ZFS_IOC_CLONE,
+        ZFS_IOC_LAST
 } zfs_ioc_t;
 
 /*
  * Internal SPA load state.  Used by FMA diagnosis engine.
  */

@@ -844,10 +859,16 @@
 #define ZPOOL_HIST_ZONE         "history zone"
 #define ZPOOL_HIST_HOST         "history hostname"
 #define ZPOOL_HIST_TXG          "history txg"
 #define ZPOOL_HIST_INT_EVENT    "history internal event"
 #define ZPOOL_HIST_INT_STR      "history internal str"
+#define ZPOOL_HIST_INT_NAME     "internal_name"
+#define ZPOOL_HIST_IOCTL        "ioctl"
+#define ZPOOL_HIST_INPUT_NVL    "in_nvl"
+#define ZPOOL_HIST_OUTPUT_NVL   "out_nvl"
+#define ZPOOL_HIST_DSNAME       "dsname"
+#define ZPOOL_HIST_DSID         "dsid"
 
 /*
  * Flags for ZFS_IOC_VDEV_SET_STATE
  */
 #define ZFS_ONLINE_CHECKREMOVE  0x1

@@ -889,60 +910,10 @@
 #define ZFS_EV_POOL_NAME        "pool_name"
 #define ZFS_EV_POOL_GUID        "pool_guid"
 #define ZFS_EV_VDEV_PATH        "vdev_path"
 #define ZFS_EV_VDEV_GUID        "vdev_guid"
 
-/*
- * Note: This is encoded on-disk, so new events must be added to the
- * end, and unused events can not be removed.  Be sure to edit
- * libzfs_pool.c: hist_event_table[].
- */
-typedef enum history_internal_events {
-        LOG_NO_EVENT = 0,
-        LOG_POOL_CREATE,
-        LOG_POOL_VDEV_ADD,
-        LOG_POOL_REMOVE,
-        LOG_POOL_DESTROY,
-        LOG_POOL_EXPORT,
-        LOG_POOL_IMPORT,
-        LOG_POOL_VDEV_ATTACH,
-        LOG_POOL_VDEV_REPLACE,
-        LOG_POOL_VDEV_DETACH,
-        LOG_POOL_VDEV_ONLINE,
-        LOG_POOL_VDEV_OFFLINE,
-        LOG_POOL_UPGRADE,
-        LOG_POOL_CLEAR,
-        LOG_POOL_SCAN,
-        LOG_POOL_PROPSET,
-        LOG_DS_CREATE,
-        LOG_DS_CLONE,
-        LOG_DS_DESTROY,
-        LOG_DS_DESTROY_BEGIN,
-        LOG_DS_INHERIT,
-        LOG_DS_PROPSET,
-        LOG_DS_QUOTA,
-        LOG_DS_PERM_UPDATE,
-        LOG_DS_PERM_REMOVE,
-        LOG_DS_PERM_WHO_REMOVE,
-        LOG_DS_PROMOTE,
-        LOG_DS_RECEIVE,
-        LOG_DS_RENAME,
-        LOG_DS_RESERVATION,
-        LOG_DS_REPLAY_INC_SYNC,
-        LOG_DS_REPLAY_FULL_SYNC,
-        LOG_DS_ROLLBACK,
-        LOG_DS_SNAPSHOT,
-        LOG_DS_UPGRADE,
-        LOG_DS_REFQUOTA,
-        LOG_DS_REFRESERV,
-        LOG_POOL_SCAN_DONE,
-        LOG_DS_USER_HOLD,
-        LOG_DS_USER_RELEASE,
-        LOG_POOL_SPLIT,
-        LOG_END
-} history_internal_events_t;
-
 #ifdef  __cplusplus
 }
 #endif
 
 #endif  /* _SYS_FS_ZFS_H */