X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=include%2Fsys%2Fzio.h;h=4f20cab6591e9792a6f6899deea641c95b28df9b;hb=395350c85d9903beba43bac7ae79092ae25f1526;hp=97d8ec74d2e9d1a1ed36700ac3e66f9aa7e1a3d6;hpb=6283f55ea1b91e680386388c17d14b89e344fa8d;p=zfs.git diff --git a/include/sys/zio.h b/include/sys/zio.h index 97d8ec7..4f20cab 100644 --- a/include/sys/zio.h +++ b/include/sys/zio.h @@ -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, @@ -482,6 +494,8 @@ extern void *zio_buf_alloc(size_t size); extern void zio_buf_free(void *buf, size_t size); extern void *zio_data_buf_alloc(size_t size); extern void zio_data_buf_free(void *buf, size_t size); +extern void *zio_vdev_alloc(void); +extern void zio_vdev_free(void *buf); extern void zio_resubmit_stage_async(void *);