mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
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 <allan@klarasystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Richard Yao <richard.yao@klarasystems.com> Signed-off-by: Allan Jude <allan@klarasystems.com> Co-authored-by: Richard Yao <richard.yao@klarasystems.com> Closes #14086
This commit is contained in:
+1
-1
@@ -1436,7 +1436,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);
|
||||
|
||||
@@ -482,7 +482,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);
|
||||
|
||||
|
||||
@@ -1344,7 +1344,7 @@ do_corrective_recv(struct receive_writer_arg *rwa, struct drr_write *drrw,
|
||||
dnode_t *dn;
|
||||
abd_t *abd = rrd->abd;
|
||||
zio_cksum_t bp_cksum = bp->blk_cksum;
|
||||
enum zio_flag flags = ZIO_FLAG_SPECULATIVE |
|
||||
zio_flag_t flags = ZIO_FLAG_SPECULATIVE |
|
||||
ZIO_FLAG_DONT_CACHE | ZIO_FLAG_DONT_RETRY | ZIO_FLAG_CANFAIL;
|
||||
|
||||
if (rwa->raw)
|
||||
@@ -2186,7 +2186,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;
|
||||
|
||||
@@ -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));
|
||||
@@ -1653,7 +1653,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;
|
||||
|
||||
@@ -671,7 +671,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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
+2
-2
@@ -237,7 +237,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;
|
||||
@@ -315,7 +315,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;
|
||||
|
||||
+20
-19
@@ -512,8 +512,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) {
|
||||
@@ -802,7 +803,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)
|
||||
{
|
||||
@@ -901,7 +902,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;
|
||||
|
||||
@@ -913,7 +914,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));
|
||||
}
|
||||
@@ -1099,7 +1100,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;
|
||||
|
||||
@@ -1117,7 +1118,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;
|
||||
@@ -1160,7 +1161,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;
|
||||
|
||||
@@ -1233,7 +1234,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);
|
||||
@@ -1266,7 +1267,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;
|
||||
|
||||
@@ -1303,7 +1304,7 @@ zio_claim(zio_t *pio, spa_t *spa, uint64_t txg, const blkptr_t *bp,
|
||||
|
||||
zio_t *
|
||||
zio_ioctl(zio_t *pio, spa_t *spa, vdev_t *vd, int cmd,
|
||||
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;
|
||||
int c;
|
||||
@@ -1328,7 +1329,7 @@ zio_ioctl(zio_t *pio, spa_t *spa, vdev_t *vd, int cmd,
|
||||
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;
|
||||
|
||||
@@ -1348,7 +1349,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;
|
||||
|
||||
@@ -1369,7 +1370,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;
|
||||
|
||||
@@ -1406,7 +1407,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;
|
||||
@@ -1480,7 +1481,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;
|
||||
@@ -2030,7 +2031,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 "
|
||||
@@ -2040,8 +2041,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,
|
||||
|
||||
Reference in New Issue
Block a user