Add --enable-debug-dmu-tx configure option
[zfs.git] / include / sys / zio.h
index 97d8ec7..c0da4e2 100644 (file)
@@ -22,6 +22,9 @@
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  */
+/*
+ * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+ */
 
 #ifndef _ZIO_H
 #define        _ZIO_H
@@ -116,6 +119,11 @@ enum zio_compress {
        ZIO_COMPRESS_ON_VALUE == ZIO_COMPRESS_LZJB) ||  \
        (compress) == ZIO_COMPRESS_OFF)
 
+/*
+ * Default Linux timeout for a sd device.
+ */
+#define ZIO_DELAY_MAX                  (30 * MILLISEC)
+
 #define        ZIO_FAILURE_MODE_WAIT           0
 #define        ZIO_FAILURE_MODE_CONTINUE       1
 #define        ZIO_FAILURE_MODE_PANIC          2
@@ -401,6 +409,7 @@ struct zio {
        enum zio_flag   io_orig_flags;
        enum zio_stage  io_orig_stage;
        enum zio_stage  io_orig_pipeline;
+       uint64_t        io_delay;
        int             io_error;
        int             io_child_error[ZIO_CHILD_TYPES];
        uint64_t        io_children[ZIO_CHILD_TYPES][ZIO_WAIT_TYPES];
@@ -417,6 +426,9 @@ struct zio {
        /* FMA state */
        zio_cksum_report_t *io_cksum_report;
        uint64_t        io_ena;
+
+       /* Taskq dispatching state */
+       taskq_ent_t     io_tqent;
 };
 
 extern zio_t *zio_null(zio_t *pio, spa_t *spa, vdev_t *vd,