Illumos #3618 ::zio dcmd does not show timestamp data
[zfs.git] / include / sys / vdev_impl.h
index 5bd432b..e0669cc 100644 (file)
@@ -67,7 +67,7 @@ typedef void  vdev_state_change_func_t(vdev_t *vd, int, int);
 typedef void   vdev_hold_func_t(vdev_t *vd);
 typedef void   vdev_rele_func_t(vdev_t *vd);
 
-typedef struct vdev_ops {
+typedef const struct vdev_ops {
        vdev_open_func_t                *vdev_op_open;
        vdev_close_func_t               *vdev_op_close;
        vdev_asize_func_t               *vdev_op_asize;
@@ -105,6 +105,8 @@ struct vdev_queue {
        avl_tree_t      vq_read_tree;
        avl_tree_t      vq_write_tree;
        avl_tree_t      vq_pending_tree;
+       hrtime_t        vq_io_complete_ts;
+       hrtime_t        vq_io_delta_ts;
        list_t          vq_io_list;
        kmutex_t        vq_lock;
 };
@@ -156,6 +158,7 @@ struct vdev {
        uint64_t        vdev_ms_count;  /* number of metaslabs          */
        metaslab_group_t *vdev_mg;      /* metaslab group               */
        metaslab_t      **vdev_ms;      /* metaslab array               */
+       uint64_t        vdev_pending_fastwrite; /* allocated fastwrites */
        txg_list_t      vdev_ms_list;   /* per-txg dirty metaslab lists */
        txg_list_t      vdev_dtl_list;  /* per-txg dirty DTL lists      */
        txg_node_t      vdev_txg_node;  /* per-txg dirty vdev linkage   */
@@ -209,7 +212,7 @@ struct vdev {
         * For DTrace to work in userland (libzpool) context, these fields must
         * remain at the end of the structure.  DTrace will use the kernel's
         * CTF definition for 'struct vdev', and since the size of a kmutex_t is
-        * larger in userland, the offsets for the rest fields would be
+        * larger in userland, the offsets for the rest of the fields would be
         * incorrect.
         */
        kmutex_t        vdev_dtl_lock;  /* vdev_dtl_{map,resilver}      */
@@ -264,6 +267,7 @@ typedef struct vdev_label {
 #define        VDEV_LABEL_START_SIZE   (2 * sizeof (vdev_label_t) + VDEV_BOOT_SIZE)
 #define        VDEV_LABEL_END_SIZE     (2 * sizeof (vdev_label_t))
 #define        VDEV_LABELS             4
+#define        VDEV_BEST_LABEL         VDEV_LABELS
 
 #define        VDEV_ALLOC_LOAD         0
 #define        VDEV_ALLOC_ADD          1