82 /*
83 * Virtual device properties
84 */
85 struct vdev_cache_entry {
86 char *ve_data;
87 uint64_t ve_offset;
88 uint64_t ve_lastused;
89 avl_node_t ve_offset_node;
90 avl_node_t ve_lastused_node;
91 uint32_t ve_hits;
92 uint16_t ve_missed_update;
93 zio_t *ve_fill_io;
94 };
95
96 struct vdev_cache {
97 avl_tree_t vc_offset_tree;
98 avl_tree_t vc_lastused_tree;
99 kmutex_t vc_lock;
100 };
101
102 struct vdev_queue {
103 avl_tree_t vq_deadline_tree;
104 avl_tree_t vq_read_tree;
105 avl_tree_t vq_write_tree;
106 avl_tree_t vq_pending_tree;
107 hrtime_t vq_io_complete_ts;
108 kmutex_t vq_lock;
109 };
110
111 /*
112 * Virtual device descriptor
113 */
114 struct vdev {
115 /*
116 * Common to all vdev types.
117 */
118 uint64_t vdev_id; /* child number in vdev parent */
119 uint64_t vdev_guid; /* unique ID for this vdev */
120 uint64_t vdev_guid_sum; /* self guid + all child guids */
121 uint64_t vdev_orig_guid; /* orig. guid prior to remove */
122 uint64_t vdev_asize; /* allocatable device capacity */
123 uint64_t vdev_min_asize; /* min acceptable asize */
124 uint64_t vdev_max_asize; /* max acceptable asize */
125 uint64_t vdev_ashift; /* block alignment shift */
126 uint64_t vdev_state; /* see VDEV_STATE_* #defines */
127 uint64_t vdev_prevstate; /* used when reopening a vdev */
|
82 /*
83 * Virtual device properties
84 */
85 struct vdev_cache_entry {
86 char *ve_data;
87 uint64_t ve_offset;
88 uint64_t ve_lastused;
89 avl_node_t ve_offset_node;
90 avl_node_t ve_lastused_node;
91 uint32_t ve_hits;
92 uint16_t ve_missed_update;
93 zio_t *ve_fill_io;
94 };
95
96 struct vdev_cache {
97 avl_tree_t vc_offset_tree;
98 avl_tree_t vc_lastused_tree;
99 kmutex_t vc_lock;
100 };
101
102 typedef struct vdev_queue_class {
103 uint32_t vqc_active;
104
105 /*
106 * Sorted by offset or timestamp, depending on if the queue is
107 * LBA-ordered vs FIFO.
108 */
109 avl_tree_t vqc_queued_tree;
110 } vdev_queue_class_t;
111
112 struct vdev_queue {
113 vdev_t *vq_vdev;
114 vdev_queue_class_t vq_class[ZIO_PRIORITY_NUM_QUEUEABLE];
115 avl_tree_t vq_active_tree;
116 uint64_t vq_last_offset;
117 hrtime_t vq_io_complete_ts; /* time last i/o completed */
118 kmutex_t vq_lock;
119 };
120
121 /*
122 * Virtual device descriptor
123 */
124 struct vdev {
125 /*
126 * Common to all vdev types.
127 */
128 uint64_t vdev_id; /* child number in vdev parent */
129 uint64_t vdev_guid; /* unique ID for this vdev */
130 uint64_t vdev_guid_sum; /* self guid + all child guids */
131 uint64_t vdev_orig_guid; /* orig. guid prior to remove */
132 uint64_t vdev_asize; /* allocatable device capacity */
133 uint64_t vdev_min_asize; /* min acceptable asize */
134 uint64_t vdev_max_asize; /* max acceptable asize */
135 uint64_t vdev_ashift; /* block alignment shift */
136 uint64_t vdev_state; /* see VDEV_STATE_* #defines */
137 uint64_t vdev_prevstate; /* used when reopening a vdev */
|