usr/src/uts/common/fs/zfs/sys/zio_impl.h
author Jeff Bonwick <Jeff.Bonwick@Sun.COM>
Sun, 01 Nov 2009 14:14:46 -0800
changeset 10922 e2081f502306
parent 7754 b80e4842ad54
child 13879 4eac7a87eff2
permissions -rw-r--r--
PSARC 2009/571 ZFS Deduplication Properties 6677093 zfs should have dedup capability
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     1
/*
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     2
 * CDDL HEADER START
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     3
 *
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     4
 * The contents of this file are subject to the terms of the
1544
938876158511 PSARC 2006/077 zpool clear
eschrock
parents: 789
diff changeset
     5
 * Common Development and Distribution License (the "License").
938876158511 PSARC 2006/077 zpool clear
eschrock
parents: 789
diff changeset
     6
 * You may not use this file except in compliance with the License.
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     7
 *
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     8
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     9
 * or http://www.opensolaris.org/os/licensing.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    10
 * See the License for the specific language governing permissions
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    11
 * and limitations under the License.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    12
 *
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    13
 * When distributing Covered Code, include this CDDL HEADER in each
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    14
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    15
 * If applicable, add the following below this CDDL HEADER, with the
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    16
 * fields enclosed by brackets "[]" replaced with your own identifying
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    17
 * information: Portions Copyright [yyyy] [name of copyright owner]
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    18
 *
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    19
 * CDDL HEADER END
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    20
 */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    21
/*
10922
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    22
 * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    23
 * Use is subject to license terms.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    24
 */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    25
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    26
#ifndef _ZIO_IMPL_H
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    27
#define	_ZIO_IMPL_H
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    28
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    29
#include <sys/zfs_context.h>
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    30
#include <sys/zio.h>
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    31
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    32
#ifdef	__cplusplus
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    33
extern "C" {
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    34
#endif
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    35
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    36
/*
10922
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    37
 * zio pipeline stage definitions
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    38
 */
10922
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    39
enum zio_stage {
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    40
	ZIO_STAGE_OPEN			= 1 << 0,	/* RWFCI */
7754
b80e4842ad54 6754011 SPA 3.0: lock breakup, i/o pipeline refactoring, device failure handling
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 5688
diff changeset
    41
10922
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    42
	ZIO_STAGE_READ_BP_INIT		= 1 << 1,	/* R---- */
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    43
	ZIO_STAGE_FREE_BP_INIT		= 1 << 2,	/* --F-- */
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    44
	ZIO_STAGE_ISSUE_ASYNC		= 1 << 3,	/* RWF-- */
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    45
	ZIO_STAGE_WRITE_BP_INIT		= 1 << 4,	/* -W--- */
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    46
10922
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    47
	ZIO_STAGE_CHECKSUM_GENERATE	= 1 << 5,	/* -W--- */
7754
b80e4842ad54 6754011 SPA 3.0: lock breakup, i/o pipeline refactoring, device failure handling
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 5688
diff changeset
    48
10922
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    49
	ZIO_STAGE_DDT_READ_START	= 1 << 6,	/* R---- */
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    50
	ZIO_STAGE_DDT_READ_DONE		= 1 << 7,	/* R---- */
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    51
	ZIO_STAGE_DDT_WRITE		= 1 << 8,	/* -W--- */
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    52
	ZIO_STAGE_DDT_FREE		= 1 << 9,	/* --F-- */
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    53
10922
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    54
	ZIO_STAGE_GANG_ASSEMBLE		= 1 << 10,	/* RWFC- */
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    55
	ZIO_STAGE_GANG_ISSUE		= 1 << 11,	/* RWFC- */
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    56
10922
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    57
	ZIO_STAGE_DVA_ALLOCATE		= 1 << 12,	/* -W--- */
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    58
	ZIO_STAGE_DVA_FREE		= 1 << 13,	/* --F-- */
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    59
	ZIO_STAGE_DVA_CLAIM		= 1 << 14,	/* ---C- */
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    60
10922
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    61
	ZIO_STAGE_READY			= 1 << 15,	/* RWFCI */
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    62
10922
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    63
	ZIO_STAGE_VDEV_IO_START		= 1 << 16,	/* RW--I */
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    64
	ZIO_STAGE_VDEV_IO_DONE		= 1 << 17,	/* RW--I */
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    65
	ZIO_STAGE_VDEV_IO_ASSESS	= 1 << 18,	/* RW--I */
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    66
10922
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    67
	ZIO_STAGE_CHECKSUM_VERIFY	= 1 << 19,	/* R---- */
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    68
10922
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    69
	ZIO_STAGE_DONE			= 1 << 20	/* RWFCI */
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    70
};
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    71
10922
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    72
#define	ZIO_INTERLOCK_STAGES			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    73
	(ZIO_STAGE_READY |			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    74
	ZIO_STAGE_DONE)
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    75
10922
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    76
#define	ZIO_INTERLOCK_PIPELINE			\
7754
b80e4842ad54 6754011 SPA 3.0: lock breakup, i/o pipeline refactoring, device failure handling
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 5688
diff changeset
    77
	ZIO_INTERLOCK_STAGES
b80e4842ad54 6754011 SPA 3.0: lock breakup, i/o pipeline refactoring, device failure handling
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 5688
diff changeset
    78
10922
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    79
#define	ZIO_VDEV_IO_STAGES			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    80
	(ZIO_STAGE_VDEV_IO_START |		\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    81
	ZIO_STAGE_VDEV_IO_DONE |		\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    82
	ZIO_STAGE_VDEV_IO_ASSESS)
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    83
10922
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    84
#define	ZIO_VDEV_CHILD_PIPELINE			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    85
	(ZIO_VDEV_IO_STAGES |			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    86
	ZIO_STAGE_DONE)
7754
b80e4842ad54 6754011 SPA 3.0: lock breakup, i/o pipeline refactoring, device failure handling
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 5688
diff changeset
    87
10922
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    88
#define	ZIO_READ_COMMON_STAGES			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    89
	(ZIO_INTERLOCK_STAGES |			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    90
	ZIO_VDEV_IO_STAGES |			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    91
	ZIO_STAGE_CHECKSUM_VERIFY)
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    92
10922
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    93
#define	ZIO_READ_PHYS_PIPELINE			\
7754
b80e4842ad54 6754011 SPA 3.0: lock breakup, i/o pipeline refactoring, device failure handling
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 5688
diff changeset
    94
	ZIO_READ_COMMON_STAGES
5329
33cb98223b2d PSARC 2007/567 zpool failmode property
gw25295
parents: 1775
diff changeset
    95
10922
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    96
#define	ZIO_READ_PIPELINE			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    97
	(ZIO_READ_COMMON_STAGES |		\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    98
	ZIO_STAGE_READ_BP_INIT)
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
    99
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   100
#define	ZIO_DDT_CHILD_READ_PIPELINE		\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   101
	ZIO_READ_COMMON_STAGES
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   102
10922
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   103
#define	ZIO_DDT_READ_PIPELINE			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   104
	(ZIO_INTERLOCK_STAGES |			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   105
	ZIO_STAGE_READ_BP_INIT |		\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   106
	ZIO_STAGE_DDT_READ_START |		\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   107
	ZIO_STAGE_DDT_READ_DONE)
5530
4ed96167d864 6354519 stack overflow in zfs due to zio pipeline
bonwick
parents: 5329
diff changeset
   108
10922
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   109
#define	ZIO_WRITE_COMMON_STAGES			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   110
	(ZIO_INTERLOCK_STAGES |			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   111
	ZIO_VDEV_IO_STAGES |			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   112
	ZIO_STAGE_ISSUE_ASYNC |			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   113
	ZIO_STAGE_CHECKSUM_GENERATE)
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   114
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   115
#define	ZIO_WRITE_PHYS_PIPELINE			\
5530
4ed96167d864 6354519 stack overflow in zfs due to zio pipeline
bonwick
parents: 5329
diff changeset
   116
	ZIO_WRITE_COMMON_STAGES
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   117
10922
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   118
#define	ZIO_REWRITE_PIPELINE			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   119
	(ZIO_WRITE_COMMON_STAGES |		\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   120
	ZIO_STAGE_WRITE_BP_INIT)
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   121
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   122
#define	ZIO_WRITE_PIPELINE			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   123
	(ZIO_WRITE_COMMON_STAGES |		\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   124
	ZIO_STAGE_WRITE_BP_INIT |		\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   125
	ZIO_STAGE_DVA_ALLOCATE)
7754
b80e4842ad54 6754011 SPA 3.0: lock breakup, i/o pipeline refactoring, device failure handling
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 5688
diff changeset
   126
10922
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   127
#define	ZIO_DDT_CHILD_WRITE_PIPELINE		\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   128
	(ZIO_INTERLOCK_STAGES |			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   129
	ZIO_VDEV_IO_STAGES |			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   130
	ZIO_STAGE_DVA_ALLOCATE)
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   131
10922
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   132
#define	ZIO_DDT_WRITE_PIPELINE			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   133
	(ZIO_INTERLOCK_STAGES |			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   134
	ZIO_STAGE_ISSUE_ASYNC |			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   135
	ZIO_STAGE_WRITE_BP_INIT |		\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   136
	ZIO_STAGE_CHECKSUM_GENERATE |		\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   137
	ZIO_STAGE_DDT_WRITE)
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   138
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   139
#define	ZIO_GANG_STAGES				\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   140
	(ZIO_STAGE_GANG_ASSEMBLE |		\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   141
	ZIO_STAGE_GANG_ISSUE)
5530
4ed96167d864 6354519 stack overflow in zfs due to zio pipeline
bonwick
parents: 5329
diff changeset
   142
10922
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   143
#define	ZIO_FREE_PIPELINE			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   144
	(ZIO_INTERLOCK_STAGES |			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   145
	ZIO_STAGE_FREE_BP_INIT |		\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   146
	ZIO_STAGE_DVA_FREE)
5530
4ed96167d864 6354519 stack overflow in zfs due to zio pipeline
bonwick
parents: 5329
diff changeset
   147
10922
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   148
#define	ZIO_DDT_FREE_PIPELINE			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   149
	(ZIO_INTERLOCK_STAGES |			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   150
	ZIO_STAGE_FREE_BP_INIT |		\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   151
	ZIO_STAGE_ISSUE_ASYNC |			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   152
	ZIO_STAGE_DDT_FREE)
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   153
10922
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   154
#define	ZIO_CLAIM_PIPELINE			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   155
	(ZIO_INTERLOCK_STAGES |			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   156
	ZIO_STAGE_DVA_CLAIM)
5530
4ed96167d864 6354519 stack overflow in zfs due to zio pipeline
bonwick
parents: 5329
diff changeset
   157
10922
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   158
#define	ZIO_IOCTL_PIPELINE			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   159
	(ZIO_INTERLOCK_STAGES |			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   160
	ZIO_STAGE_VDEV_IO_START |		\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   161
	ZIO_STAGE_VDEV_IO_ASSESS)
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   162
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   163
#define	ZIO_BLOCKING_STAGES			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   164
	(ZIO_STAGE_DVA_ALLOCATE |		\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   165
	ZIO_STAGE_DVA_CLAIM |			\
e2081f502306 PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents: 7754
diff changeset
   166
	ZIO_STAGE_VDEV_IO_START)
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   167
1544
938876158511 PSARC 2006/077 zpool clear
eschrock
parents: 789
diff changeset
   168
extern void zio_inject_init(void);
938876158511 PSARC 2006/077 zpool clear
eschrock
parents: 789
diff changeset
   169
extern void zio_inject_fini(void);
938876158511 PSARC 2006/077 zpool clear
eschrock
parents: 789
diff changeset
   170
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   171
#ifdef	__cplusplus
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   172
}
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   173
#endif
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   174
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
   175
#endif	/* _ZIO_IMPL_H */