From 609550bc5f56c2afba6815245e1391469fbdc3bf Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Thu, 27 Oct 2022 09:54:54 -0700 Subject: [PATCH] Convert enum zio_flag to uint64_t We ran out of space in enum zio_flag for additional flags. Rather than introduce enum zio_flag2 and then modify a bunch of functions to take a second flags variable, we expand the type to 64 bits via `typedef uint64_t zio_flag_t`. Reviewed-by: Allan Jude Reviewed-by: Brian Behlendorf Signed-off-by: Richard Yao Signed-off-by: Allan Jude Co-authored-by: Richard Yao Closes #14086 --- include/os/linux/zfs/sys/trace_common.h | 4 +- include/sys/dbuf.h | 4 +- include/sys/zio.h | 100 ++++++++++++------------ module/os/linux/zfs/vdev_disk.c | 2 +- module/zfs/dmu.c | 2 +- module/zfs/dmu_objset.c | 2 +- module/zfs/dmu_recv.c | 2 +- module/zfs/dmu_send.c | 4 +- module/zfs/dmu_traverse.c | 2 +- module/zfs/vdev_queue.c | 2 +- module/zfs/zil.c | 4 +- module/zfs/zio.c | 39 ++++----- 12 files changed, 86 insertions(+), 81 deletions(-) diff --git a/include/os/linux/zfs/sys/trace_common.h b/include/os/linux/zfs/sys/trace_common.h index 6922d1a181..bf06e108db 100644 --- a/include/os/linux/zfs/sys/trace_common.h +++ b/include/os/linux/zfs/sys/trace_common.h @@ -39,10 +39,10 @@ __field(hrtime_t, zio_timestamp) \ __field(hrtime_t, zio_delta) \ __field(uint64_t, zio_delay) \ - __field(enum zio_flag, zio_flags) \ + __field(zio_flag_t, zio_flags) \ __field(enum zio_stage, zio_stage) \ __field(enum zio_stage, zio_pipeline) \ - __field(enum zio_flag, zio_orig_flags) \ + __field(zio_flag_t, zio_orig_flags) \ __field(enum zio_stage, zio_orig_stage) \ __field(enum zio_stage, zio_orig_pipeline) \ __field(uint8_t, zio_reexecute) \ diff --git a/include/sys/dbuf.h b/include/sys/dbuf.h index e7289c0fe1..e16fa4c1b3 100644 --- a/include/sys/dbuf.h +++ b/include/sys/dbuf.h @@ -190,7 +190,7 @@ typedef struct dbuf_dirty_record { uint64_t dr_blkid; abd_t *dr_abd; zio_prop_t dr_props; - enum zio_flag dr_flags; + zio_flag_t dr_flags; } dll; } dt; } dbuf_dirty_record_t; @@ -377,7 +377,7 @@ void dmu_buf_write_embedded(dmu_buf_t *dbuf, void *data, int uncompressed_size, int compressed_size, int byteorder, dmu_tx_t *tx); int dmu_lightweight_write_by_dnode(dnode_t *dn, uint64_t offset, abd_t *abd, - const struct zio_prop *zp, enum zio_flag flags, dmu_tx_t *tx); + const struct zio_prop *zp, zio_flag_t flags, dmu_tx_t *tx); void dmu_buf_redact(dmu_buf_t *dbuf, dmu_tx_t *tx); void dbuf_destroy(dmu_buf_impl_t *db); diff --git a/include/sys/zio.h b/include/sys/zio.h index 04a11adfd6..09c6c12da8 100644 --- a/include/sys/zio.h +++ b/include/sys/zio.h @@ -181,32 +181,37 @@ typedef enum zio_suspend_reason { ZIO_SUSPEND_MMP, } zio_suspend_reason_t; -enum zio_flag { +/* + * This was originally an enum type. However, those are 32-bit and there is no + * way to make a 64-bit enum type. Since we ran out of bits for flags, we were + * forced to upgrade it to a uint64_t. + */ +typedef uint64_t zio_flag_t; /* * Flags inherited by gang, ddt, and vdev children, * and that must be equal for two zios to aggregate */ - ZIO_FLAG_DONT_AGGREGATE = 1 << 0, - ZIO_FLAG_IO_REPAIR = 1 << 1, - ZIO_FLAG_SELF_HEAL = 1 << 2, - ZIO_FLAG_RESILVER = 1 << 3, - ZIO_FLAG_SCRUB = 1 << 4, - ZIO_FLAG_SCAN_THREAD = 1 << 5, - ZIO_FLAG_PHYSICAL = 1 << 6, +#define ZIO_FLAG_DONT_AGGREGATE (1ULL << 0) +#define ZIO_FLAG_IO_REPAIR (1ULL << 1) +#define ZIO_FLAG_SELF_HEAL (1ULL << 2) +#define ZIO_FLAG_RESILVER (1ULL << 3) +#define ZIO_FLAG_SCRUB (1ULL << 4) +#define ZIO_FLAG_SCAN_THREAD (1ULL << 5) +#define ZIO_FLAG_PHYSICAL (1ULL << 6) #define ZIO_FLAG_AGG_INHERIT (ZIO_FLAG_CANFAIL - 1) /* * Flags inherited by ddt, gang, and vdev children. */ - ZIO_FLAG_CANFAIL = 1 << 7, /* must be first for INHERIT */ - ZIO_FLAG_SPECULATIVE = 1 << 8, - ZIO_FLAG_CONFIG_WRITER = 1 << 9, - ZIO_FLAG_DONT_RETRY = 1 << 10, - ZIO_FLAG_DONT_CACHE = 1 << 11, - ZIO_FLAG_NODATA = 1 << 12, - ZIO_FLAG_INDUCE_DAMAGE = 1 << 13, - ZIO_FLAG_IO_ALLOCATING = 1 << 14, +#define ZIO_FLAG_CANFAIL (1ULL << 7) /* must be first for INHERIT */ +#define ZIO_FLAG_SPECULATIVE (1ULL << 8) +#define ZIO_FLAG_CONFIG_WRITER (1ULL << 9) +#define ZIO_FLAG_DONT_RETRY (1ULL << 10) +#define ZIO_FLAG_DONT_CACHE (1ULL << 11) +#define ZIO_FLAG_NODATA (1ULL << 12) +#define ZIO_FLAG_INDUCE_DAMAGE (1ULL << 13) +#define ZIO_FLAG_IO_ALLOCATING (1ULL << 14) #define ZIO_FLAG_DDT_INHERIT (ZIO_FLAG_IO_RETRY - 1) #define ZIO_FLAG_GANG_INHERIT (ZIO_FLAG_IO_RETRY - 1) @@ -214,30 +219,29 @@ enum zio_flag { /* * Flags inherited by vdev children. */ - ZIO_FLAG_IO_RETRY = 1 << 15, /* must be first for INHERIT */ - ZIO_FLAG_PROBE = 1 << 16, - ZIO_FLAG_TRYHARD = 1 << 17, - ZIO_FLAG_OPTIONAL = 1 << 18, +#define ZIO_FLAG_IO_RETRY (1ULL << 15) /* must be first for INHERIT */ +#define ZIO_FLAG_PROBE (1ULL << 16) +#define ZIO_FLAG_TRYHARD (1ULL << 17) +#define ZIO_FLAG_OPTIONAL (1ULL << 18) #define ZIO_FLAG_VDEV_INHERIT (ZIO_FLAG_DONT_QUEUE - 1) /* * Flags not inherited by any children. */ - ZIO_FLAG_DONT_QUEUE = 1 << 19, /* must be first for INHERIT */ - ZIO_FLAG_DONT_PROPAGATE = 1 << 20, - ZIO_FLAG_IO_BYPASS = 1 << 21, - ZIO_FLAG_IO_REWRITE = 1 << 22, - ZIO_FLAG_RAW_COMPRESS = 1 << 23, - ZIO_FLAG_RAW_ENCRYPT = 1 << 24, - ZIO_FLAG_GANG_CHILD = 1 << 25, - ZIO_FLAG_DDT_CHILD = 1 << 26, - ZIO_FLAG_GODFATHER = 1 << 27, - ZIO_FLAG_NOPWRITE = 1 << 28, - ZIO_FLAG_REEXECUTED = 1 << 29, - ZIO_FLAG_DELEGATED = 1 << 30, - ZIO_FLAG_FASTWRITE = 1 << 31, -}; +#define ZIO_FLAG_DONT_QUEUE (1ULL << 19) /* must be first for INHERIT */ +#define ZIO_FLAG_DONT_PROPAGATE (1ULL << 20) +#define ZIO_FLAG_IO_BYPASS (1ULL << 21) +#define ZIO_FLAG_IO_REWRITE (1ULL << 22) +#define ZIO_FLAG_RAW_COMPRESS (1ULL << 23) +#define ZIO_FLAG_RAW_ENCRYPT (1ULL << 24) +#define ZIO_FLAG_GANG_CHILD (1ULL << 25) +#define ZIO_FLAG_DDT_CHILD (1ULL << 26) +#define ZIO_FLAG_GODFATHER (1ULL << 27) +#define ZIO_FLAG_NOPWRITE (1ULL << 28) +#define ZIO_FLAG_REEXECUTED (1ULL << 29) +#define ZIO_FLAG_DELEGATED (1ULL << 30) +#define ZIO_FLAG_FASTWRITE (1ULL << 31) #define ZIO_FLAG_MUSTSUCCEED 0 #define ZIO_FLAG_RAW (ZIO_FLAG_RAW_COMPRESS | ZIO_FLAG_RAW_ENCRYPT) @@ -494,10 +498,10 @@ struct zio { zio_alloc_list_t io_alloc_list; /* Internal pipeline state */ - enum zio_flag io_flags; + zio_flag_t io_flags; enum zio_stage io_stage; enum zio_stage io_pipeline; - enum zio_flag io_orig_flags; + zio_flag_t io_orig_flags; enum zio_stage io_orig_stage; enum zio_stage io_orig_pipeline; enum zio_stage io_pipeline_trace; @@ -534,25 +538,25 @@ enum blk_verify_flag { extern int zio_bookmark_compare(const void *, const void *); extern zio_t *zio_null(zio_t *pio, spa_t *spa, vdev_t *vd, - zio_done_func_t *done, void *priv, enum zio_flag flags); + zio_done_func_t *done, void *priv, zio_flag_t flags); extern zio_t *zio_root(spa_t *spa, - zio_done_func_t *done, void *priv, enum zio_flag flags); + zio_done_func_t *done, void *priv, zio_flag_t flags); extern zio_t *zio_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, struct abd *data, uint64_t lsize, zio_done_func_t *done, void *priv, - zio_priority_t priority, enum zio_flag flags, const zbookmark_phys_t *zb); + zio_priority_t priority, zio_flag_t flags, const zbookmark_phys_t *zb); extern zio_t *zio_write(zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp, struct abd *data, uint64_t size, uint64_t psize, const zio_prop_t *zp, zio_done_func_t *ready, zio_done_func_t *children_ready, zio_done_func_t *physdone, zio_done_func_t *done, - void *priv, zio_priority_t priority, enum zio_flag flags, + void *priv, zio_priority_t priority, zio_flag_t flags, const zbookmark_phys_t *zb); extern zio_t *zio_rewrite(zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp, struct abd *data, uint64_t size, zio_done_func_t *done, void *priv, - zio_priority_t priority, enum zio_flag flags, zbookmark_phys_t *zb); + zio_priority_t priority, zio_flag_t flags, zbookmark_phys_t *zb); extern void zio_write_override(zio_t *zio, blkptr_t *bp, int copies, boolean_t nopwrite); @@ -561,24 +565,24 @@ extern void zio_free(spa_t *spa, uint64_t txg, const blkptr_t *bp); extern zio_t *zio_claim(zio_t *pio, spa_t *spa, uint64_t txg, const blkptr_t *bp, - zio_done_func_t *done, void *priv, enum zio_flag flags); + zio_done_func_t *done, void *priv, zio_flag_t flags); extern zio_t *zio_trim(zio_t *pio, vdev_t *vd, uint64_t offset, uint64_t size, zio_done_func_t *done, void *priv, zio_priority_t priority, - enum zio_flag flags, enum trim_flag trim_flags); + zio_flag_t flags, enum trim_flag trim_flags); extern zio_t *zio_read_phys(zio_t *pio, vdev_t *vd, uint64_t offset, uint64_t size, struct abd *data, int checksum, zio_done_func_t *done, void *priv, zio_priority_t priority, - enum zio_flag flags, boolean_t labels); + zio_flag_t flags, boolean_t labels); extern zio_t *zio_write_phys(zio_t *pio, vdev_t *vd, uint64_t offset, uint64_t size, struct abd *data, int checksum, zio_done_func_t *done, void *priv, zio_priority_t priority, - enum zio_flag flags, boolean_t labels); + zio_flag_t flags, boolean_t labels); extern zio_t *zio_free_sync(zio_t *pio, spa_t *spa, uint64_t txg, - const blkptr_t *bp, enum zio_flag flags); + const blkptr_t *bp, zio_flag_t flags); extern int zio_alloc_zil(spa_t *spa, objset_t *os, uint64_t txg, blkptr_t *new_bp, uint64_t size, boolean_t *slog); @@ -611,12 +615,12 @@ extern void zio_resubmit_stage_async(void *); extern zio_t *zio_vdev_child_io(zio_t *zio, blkptr_t *bp, vdev_t *vd, uint64_t offset, struct abd *data, uint64_t size, int type, - zio_priority_t priority, enum zio_flag flags, + zio_priority_t priority, zio_flag_t flags, zio_done_func_t *done, void *priv); extern zio_t *zio_vdev_delegated_io(vdev_t *vd, uint64_t offset, struct abd *data, uint64_t size, zio_type_t type, zio_priority_t priority, - enum zio_flag flags, zio_done_func_t *done, void *priv); + zio_flag_t flags, zio_done_func_t *done, void *priv); extern void zio_vdev_io_bypass(zio_t *zio); extern void zio_vdev_io_reissue(zio_t *zio); diff --git a/module/os/linux/zfs/vdev_disk.c b/module/os/linux/zfs/vdev_disk.c index 0108b42478..935cdc039d 100644 --- a/module/os/linux/zfs/vdev_disk.c +++ b/module/os/linux/zfs/vdev_disk.c @@ -172,7 +172,7 @@ vdev_disk_error(zio_t *zio) * which is safe from any context. */ printk(KERN_WARNING "zio pool=%s vdev=%s error=%d type=%d " - "offset=%llu size=%llu flags=%x\n", spa_name(zio->io_spa), + "offset=%llu size=%llu flags=%llu\n", spa_name(zio->io_spa), zio->io_vd->vdev_path, zio->io_error, zio->io_type, (u_longlong_t)zio->io_offset, (u_longlong_t)zio->io_size, zio->io_flags); diff --git a/module/zfs/dmu.c b/module/zfs/dmu.c index 25923417cf..4415bf35b8 100644 --- a/module/zfs/dmu.c +++ b/module/zfs/dmu.c @@ -1443,7 +1443,7 @@ dmu_return_arcbuf(arc_buf_t *buf) */ int dmu_lightweight_write_by_dnode(dnode_t *dn, uint64_t offset, abd_t *abd, - const zio_prop_t *zp, enum zio_flag flags, dmu_tx_t *tx) + const zio_prop_t *zp, zio_flag_t flags, dmu_tx_t *tx) { dbuf_dirty_record_t *dr = dbuf_dirty_lightweight(dn, dbuf_whichblock(dn, 0, offset), tx); diff --git a/module/zfs/dmu_objset.c b/module/zfs/dmu_objset.c index 8a893da7e2..2f8e9592c8 100644 --- a/module/zfs/dmu_objset.c +++ b/module/zfs/dmu_objset.c @@ -449,7 +449,7 @@ dmu_objset_open_impl(spa_t *spa, dsl_dataset_t *ds, blkptr_t *bp, arc_flags_t aflags = ARC_FLAG_WAIT; zbookmark_phys_t zb; int size; - enum zio_flag zio_flags = ZIO_FLAG_CANFAIL; + zio_flag_t zio_flags = ZIO_FLAG_CANFAIL; SET_BOOKMARK(&zb, ds ? ds->ds_object : DMU_META_OBJSET, ZB_ROOT_OBJECT, ZB_ROOT_LEVEL, ZB_ROOT_BLKID); diff --git a/module/zfs/dmu_recv.c b/module/zfs/dmu_recv.c index e3a7dd06fb..3ecbc97d13 100644 --- a/module/zfs/dmu_recv.c +++ b/module/zfs/dmu_recv.c @@ -1979,7 +1979,7 @@ flush_write_batch_impl(struct receive_writer_arg *rwa) zio_prop_t zp; dmu_write_policy(rwa->os, dn, 0, 0, &zp); - enum zio_flag zio_flags = 0; + zio_flag_t zio_flags = 0; if (rwa->raw) { zp.zp_encrypt = B_TRUE; diff --git a/module/zfs/dmu_send.c b/module/zfs/dmu_send.c index b42a9f3f53..5918b7634e 100644 --- a/module/zfs/dmu_send.c +++ b/module/zfs/dmu_send.c @@ -934,7 +934,7 @@ do_dump(dmu_send_cookie_t *dscp, struct send_range *range) ASSERT3U(range->start_blkid + 1, ==, range->end_blkid); if (BP_GET_TYPE(bp) == DMU_OT_SA) { arc_flags_t aflags = ARC_FLAG_WAIT; - enum zio_flag zioflags = ZIO_FLAG_CANFAIL; + zio_flag_t zioflags = ZIO_FLAG_CANFAIL; if (dscp->dsc_featureflags & DMU_BACKUP_FEATURE_RAW) { ASSERT(BP_IS_PROTECTED(bp)); @@ -1654,7 +1654,7 @@ issue_data_read(struct send_reader_thread_arg *srta, struct send_range *range) !split_large_blocks && !BP_SHOULD_BYTESWAP(bp) && !BP_IS_EMBEDDED(bp) && !DMU_OT_IS_METADATA(BP_GET_TYPE(bp)); - enum zio_flag zioflags = ZIO_FLAG_CANFAIL; + zio_flag_t zioflags = ZIO_FLAG_CANFAIL; if (srta->featureflags & DMU_BACKUP_FEATURE_RAW) { zioflags |= ZIO_FLAG_RAW; diff --git a/module/zfs/dmu_traverse.c b/module/zfs/dmu_traverse.c index 2f1c2978b3..06b0b44ec9 100644 --- a/module/zfs/dmu_traverse.c +++ b/module/zfs/dmu_traverse.c @@ -670,7 +670,7 @@ traverse_impl(spa_t *spa, dsl_dataset_t *ds, uint64_t objset, blkptr_t *rootbp, /* See comment on ZIL traversal in dsl_scan_visitds. */ if (ds != NULL && !ds->ds_is_snapshot && !BP_IS_HOLE(rootbp)) { - enum zio_flag zio_flags = ZIO_FLAG_CANFAIL; + zio_flag_t zio_flags = ZIO_FLAG_CANFAIL; uint32_t flags = ARC_FLAG_WAIT; objset_phys_t *osp; arc_buf_t *buf; diff --git a/module/zfs/vdev_queue.c b/module/zfs/vdev_queue.c index cc5b15b8c0..4056d5ff0b 100644 --- a/module/zfs/vdev_queue.c +++ b/module/zfs/vdev_queue.c @@ -605,7 +605,7 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio) int maxblocksize; boolean_t stretch = B_FALSE; avl_tree_t *t = vdev_queue_type_tree(vq, zio->io_type); - enum zio_flag flags = zio->io_flags & ZIO_FLAG_AGG_INHERIT; + zio_flag_t flags = zio->io_flags & ZIO_FLAG_AGG_INHERIT; uint64_t next_offset; abd_t *abd; diff --git a/module/zfs/zil.c b/module/zfs/zil.c index 880912d665..8ace4c45c3 100644 --- a/module/zfs/zil.c +++ b/module/zfs/zil.c @@ -220,7 +220,7 @@ static int zil_read_log_block(zilog_t *zilog, boolean_t decrypt, const blkptr_t *bp, blkptr_t *nbp, void *dst, char **end) { - enum zio_flag zio_flags = ZIO_FLAG_CANFAIL; + zio_flag_t zio_flags = ZIO_FLAG_CANFAIL; arc_flags_t aflags = ARC_FLAG_WAIT; arc_buf_t *abuf = NULL; zbookmark_phys_t zb; @@ -298,7 +298,7 @@ zil_read_log_block(zilog_t *zilog, boolean_t decrypt, const blkptr_t *bp, static int zil_read_log_data(zilog_t *zilog, const lr_write_t *lr, void *wbuf) { - enum zio_flag zio_flags = ZIO_FLAG_CANFAIL; + zio_flag_t zio_flags = ZIO_FLAG_CANFAIL; const blkptr_t *bp = &lr->lr_blkptr; arc_flags_t aflags = ARC_FLAG_WAIT; arc_buf_t *abuf = NULL; diff --git a/module/zfs/zio.c b/module/zfs/zio.c index c83ff29e3a..4bdbae9ac8 100644 --- a/module/zfs/zio.c +++ b/module/zfs/zio.c @@ -515,8 +515,9 @@ zio_decrypt(zio_t *zio, abd_t *data, uint64_t size) /* * If this is an authenticated block, just check the MAC. It would be - * nice to separate this out into its own flag, but for the moment - * enum zio_flag is out of bits. + * nice to separate this out into its own flag, but when this was done, + * we had run out of bits in what is now zio_flag_t. Future cleanup + * could make this a flag bit. */ if (BP_IS_AUTHENTICATED(bp)) { if (ot == DMU_OT_OBJSET) { @@ -805,7 +806,7 @@ static zio_t * zio_create(zio_t *pio, spa_t *spa, uint64_t txg, const blkptr_t *bp, abd_t *data, uint64_t lsize, uint64_t psize, zio_done_func_t *done, void *private, zio_type_t type, zio_priority_t priority, - enum zio_flag flags, vdev_t *vd, uint64_t offset, + zio_flag_t flags, vdev_t *vd, uint64_t offset, const zbookmark_phys_t *zb, enum zio_stage stage, enum zio_stage pipeline) { @@ -904,7 +905,7 @@ zio_destroy(zio_t *zio) zio_t * zio_null(zio_t *pio, spa_t *spa, vdev_t *vd, zio_done_func_t *done, - void *private, enum zio_flag flags) + void *private, zio_flag_t flags) { zio_t *zio; @@ -916,7 +917,7 @@ zio_null(zio_t *pio, spa_t *spa, vdev_t *vd, zio_done_func_t *done, } zio_t * -zio_root(spa_t *spa, zio_done_func_t *done, void *private, enum zio_flag flags) +zio_root(spa_t *spa, zio_done_func_t *done, void *private, zio_flag_t flags) { return (zio_null(NULL, spa, NULL, done, private, flags)); } @@ -1104,7 +1105,7 @@ zfs_dva_valid(spa_t *spa, const dva_t *dva, const blkptr_t *bp) zio_t * zio_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, abd_t *data, uint64_t size, zio_done_func_t *done, void *private, - zio_priority_t priority, enum zio_flag flags, const zbookmark_phys_t *zb) + zio_priority_t priority, zio_flag_t flags, const zbookmark_phys_t *zb) { zio_t *zio; @@ -1122,7 +1123,7 @@ zio_write(zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp, abd_t *data, uint64_t lsize, uint64_t psize, const zio_prop_t *zp, zio_done_func_t *ready, zio_done_func_t *children_ready, zio_done_func_t *physdone, zio_done_func_t *done, - void *private, zio_priority_t priority, enum zio_flag flags, + void *private, zio_priority_t priority, zio_flag_t flags, const zbookmark_phys_t *zb) { zio_t *zio; @@ -1165,7 +1166,7 @@ zio_write(zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp, zio_t * zio_rewrite(zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp, abd_t *data, uint64_t size, zio_done_func_t *done, void *private, - zio_priority_t priority, enum zio_flag flags, zbookmark_phys_t *zb) + zio_priority_t priority, zio_flag_t flags, zbookmark_phys_t *zb) { zio_t *zio; @@ -1238,7 +1239,7 @@ zio_free(spa_t *spa, uint64_t txg, const blkptr_t *bp) */ zio_t * zio_free_sync(zio_t *pio, spa_t *spa, uint64_t txg, const blkptr_t *bp, - enum zio_flag flags) + zio_flag_t flags) { ASSERT(!BP_IS_HOLE(bp)); ASSERT(spa_syncing_txg(spa) == txg); @@ -1271,7 +1272,7 @@ zio_free_sync(zio_t *pio, spa_t *spa, uint64_t txg, const blkptr_t *bp, zio_t * zio_claim(zio_t *pio, spa_t *spa, uint64_t txg, const blkptr_t *bp, - zio_done_func_t *done, void *private, enum zio_flag flags) + zio_done_func_t *done, void *private, zio_flag_t flags) { zio_t *zio; @@ -1309,7 +1310,7 @@ zio_claim(zio_t *pio, spa_t *spa, uint64_t txg, const blkptr_t *bp, zio_t * zio_trim(zio_t *pio, vdev_t *vd, uint64_t offset, uint64_t size, zio_done_func_t *done, void *private, zio_priority_t priority, - enum zio_flag flags, enum trim_flag trim_flags) + zio_flag_t flags, enum trim_flag trim_flags) { zio_t *zio; @@ -1329,7 +1330,7 @@ zio_trim(zio_t *pio, vdev_t *vd, uint64_t offset, uint64_t size, zio_t * zio_read_phys(zio_t *pio, vdev_t *vd, uint64_t offset, uint64_t size, abd_t *data, int checksum, zio_done_func_t *done, void *private, - zio_priority_t priority, enum zio_flag flags, boolean_t labels) + zio_priority_t priority, zio_flag_t flags, boolean_t labels) { zio_t *zio; @@ -1350,7 +1351,7 @@ zio_read_phys(zio_t *pio, vdev_t *vd, uint64_t offset, uint64_t size, zio_t * zio_write_phys(zio_t *pio, vdev_t *vd, uint64_t offset, uint64_t size, abd_t *data, int checksum, zio_done_func_t *done, void *private, - zio_priority_t priority, enum zio_flag flags, boolean_t labels) + zio_priority_t priority, zio_flag_t flags, boolean_t labels) { zio_t *zio; @@ -1387,7 +1388,7 @@ zio_write_phys(zio_t *pio, vdev_t *vd, uint64_t offset, uint64_t size, zio_t * zio_vdev_child_io(zio_t *pio, blkptr_t *bp, vdev_t *vd, uint64_t offset, abd_t *data, uint64_t size, int type, zio_priority_t priority, - enum zio_flag flags, zio_done_func_t *done, void *private) + zio_flag_t flags, zio_done_func_t *done, void *private) { enum zio_stage pipeline = ZIO_VDEV_CHILD_PIPELINE; zio_t *zio; @@ -1461,7 +1462,7 @@ zio_vdev_child_io(zio_t *pio, blkptr_t *bp, vdev_t *vd, uint64_t offset, zio_t * zio_vdev_delegated_io(vdev_t *vd, uint64_t offset, abd_t *data, uint64_t size, - zio_type_t type, zio_priority_t priority, enum zio_flag flags, + zio_type_t type, zio_priority_t priority, zio_flag_t flags, zio_done_func_t *done, void *private) { zio_t *zio; @@ -1489,7 +1490,7 @@ void zio_flush(zio_t *pio, vdev_t *vd, boolean_t propagate) { const int cmd = DKIOCFLUSHWRITECACHE; - const enum zio_flag flags = + const zio_flag_t flags = ZIO_FLAG_CANFAIL | ZIO_FLAG_DONT_RETRY | (propagate ? 0 : ZIO_FLAG_DONT_PROPAGATE); spa_t *spa = pio->io_spa; @@ -2035,7 +2036,7 @@ zio_deadman_impl(zio_t *pio, int ziodepth) "delta=%llu queued=%llu io=%llu " "path=%s " "last=%llu type=%d " - "priority=%d flags=0x%x stage=0x%x " + "priority=%d flags=0x%llx stage=0x%x " "pipeline=0x%x pipeline-trace=0x%x " "objset=%llu object=%llu " "level=%llu blkid=%llu " @@ -2045,8 +2046,8 @@ zio_deadman_impl(zio_t *pio, int ziodepth) (u_longlong_t)delta, pio->io_delta, pio->io_delay, vd ? vd->vdev_path : "NULL", vq ? vq->vq_io_complete_ts : 0, pio->io_type, - pio->io_priority, pio->io_flags, pio->io_stage, - pio->io_pipeline, pio->io_pipeline_trace, + pio->io_priority, (u_longlong_t)pio->io_flags, + pio->io_stage, pio->io_pipeline, pio->io_pipeline_trace, (u_longlong_t)zb->zb_objset, (u_longlong_t)zb->zb_object, (u_longlong_t)zb->zb_level, (u_longlong_t)zb->zb_blkid, (u_longlong_t)pio->io_offset, (u_longlong_t)pio->io_size,