summaryrefslogtreecommitdiffstats
path: root/include/sys/zio.h
diff options
context:
space:
mode:
authorGeorge.Wilson <[email protected]>2013-04-29 15:49:23 -0700
committerBrian Behlendorf <[email protected]>2013-05-01 17:05:52 -0700
commitcc92e9d0c3e67a7e66c844466f85696a087bf60a (patch)
tree97f27cdfb4a662dee0de0d916e7c92cc0e03a605 /include/sys/zio.h
parent57f5a2008e2e6acf58934cf43c5fdca0faffa73e (diff)
3246 ZFS I/O deadman thread
Reviewed by: Matt Ahrens <[email protected]> Reviewed by: Eric Schrock <[email protected]> Reviewed by: Christopher Siden <[email protected]> Approved by: Garrett D'Amore <[email protected]> NOTES: This patch has been reworked from the original in the following ways to accomidate Linux ZFS implementation *) Usage of the cyclic interface was replaced by the delayed taskq interface. This avoids the need to implement new compatibility code and allows us to rely on the existing taskq implementation. *) An extern for zfs_txg_synctime_ms was added to sys/dsl_pool.h because declaring externs in source files as was done in the original patch is just plain wrong. *) Instead of panicing the system when the deadman triggers a zevent describing the blocked vdev and the first pending I/O is posted. If the panic behavior is desired Linux provides other generic methods to panic the system when threads are observed to hang. *) For reference, to delay zios by 30 seconds for testing you can use zinject as follows: 'zinject -d <vdev> -D30 <pool>' References: illumos/illumos-gate@283b84606b6fc326692c03273de1774e8c122f9a https://www.illumos.org/issues/3246 Ported-by: Brian Behlendorf <[email protected]> Closes #1396
Diffstat (limited to 'include/sys/zio.h')
-rw-r--r--include/sys/zio.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/sys/zio.h b/include/sys/zio.h
index 64efde016..03530330c 100644
--- a/include/sys/zio.h
+++ b/include/sys/zio.h
@@ -21,8 +21,6 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- */
-/*
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2012 by Delphix. All rights reserved.
* Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
@@ -411,7 +409,10 @@ struct zio {
const zio_vsd_ops_t *io_vsd_ops;
uint64_t io_offset;
- uint64_t io_deadline;
+ uint64_t io_deadline; /* expires at timestamp + deadline */
+ uint64_t io_timestamp; /* submitted at (ticks) */
+ uint64_t io_delta; /* vdev queue service delta (ticks) */
+ uint64_t io_delay; /* vdev disk service delta (ticks) */
avl_node_t io_offset_node;
avl_node_t io_deadline_node;
avl_tree_t *io_vdev_tree;
@@ -423,7 +424,6 @@ 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];
@@ -560,6 +560,7 @@ extern int zio_handle_fault_injection(zio_t *zio, int error);
extern int zio_handle_device_injection(vdev_t *vd, zio_t *zio, int error);
extern int zio_handle_label_injection(zio_t *zio, int error);
extern void zio_handle_ignored_writes(zio_t *zio);
+extern uint64_t zio_handle_io_delay(zio_t *zio);
/*
* Checksum ereport functions