Pre-allocate vdev I/O buffers
[zfs.git] / include / sys / vdev_impl.h
index 1df61a5..8862d9b 100644 (file)
@@ -49,6 +49,7 @@ extern "C" {
  * Forward declarations that lots of things need.
  */
 typedef struct vdev_queue vdev_queue_t;
+typedef struct vdev_io vdev_io_t;
 typedef struct vdev_cache vdev_cache_t;
 typedef struct vdev_cache_entry vdev_cache_entry_t;
 
@@ -102,9 +103,15 @@ struct vdev_queue {
        avl_tree_t      vq_read_tree;
        avl_tree_t      vq_write_tree;
        avl_tree_t      vq_pending_tree;
+       list_t          vq_io_list;
        kmutex_t        vq_lock;
 };
 
+struct vdev_io {
+       char            vi_buffer[SPA_MAXBLOCKSIZE]; /* Must be first */
+       list_node_t     vi_node;
+};
+
 /*
  * Virtual device descriptor
  */