Skip to content

Commit

Permalink
Fix merge conflict in ZFS (openzfs#502)
Browse files Browse the repository at this point in the history
  • Loading branch information
pcd1193182 authored Oct 13, 2021
1 parent 0e5f7ca commit 91a5dca
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 40 deletions.
76 changes: 38 additions & 38 deletions include/sys/zio.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ enum zio_checksum {
#define ZIO_CHECKSUM_DEFAULT ZIO_CHECKSUM_ON

#define ZIO_CHECKSUM_MASK 0xffULL
#define ZIO_CHECKSUM_VERIFY (1 << 8)
#define ZIO_CHECKSUM_VERIFY (1U << 8)

#define ZIO_DEDUPCHECKSUM ZIO_CHECKSUM_SHA256

Expand Down Expand Up @@ -169,57 +169,57 @@ enum zio_flag {
* 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,
ZIO_FLAG_DONT_AGGREGATE = 1U << 0,
ZIO_FLAG_IO_REPAIR = 1U << 1,
ZIO_FLAG_SELF_HEAL = 1U << 2,
ZIO_FLAG_RESILVER = 1U << 3,
ZIO_FLAG_SCRUB = 1U << 4,
ZIO_FLAG_SCAN_THREAD = 1U << 5,
ZIO_FLAG_PHYSICAL = 1U << 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,
ZIO_FLAG_CANFAIL = 1U << 7, /* must be first for INHERIT */
ZIO_FLAG_SPECULATIVE = 1U << 8,
ZIO_FLAG_CONFIG_WRITER = 1U << 9,
ZIO_FLAG_DONT_RETRY = 1U << 10,
ZIO_FLAG_DONT_CACHE = 1U << 11,
ZIO_FLAG_NODATA = 1U << 12,
ZIO_FLAG_INDUCE_DAMAGE = 1U << 13,
ZIO_FLAG_IO_ALLOCATING = 1U << 14,

#define ZIO_FLAG_DDT_INHERIT (ZIO_FLAG_IO_RETRY - 1)
#define ZIO_FLAG_GANG_INHERIT (ZIO_FLAG_IO_RETRY - 1)

/*
* 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,
ZIO_FLAG_IO_RETRY = 1U << 15, /* must be first for INHERIT */
ZIO_FLAG_PROBE = 1U << 16,
ZIO_FLAG_TRYHARD = 1U << 17,
ZIO_FLAG_OPTIONAL = 1U << 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,
ZIO_FLAG_DONT_QUEUE = 1U << 19, /* must be first for INHERIT */
ZIO_FLAG_DONT_PROPAGATE = 1U << 20,
ZIO_FLAG_IO_BYPASS = 1U << 21,
ZIO_FLAG_IO_REWRITE = 1U << 22,
ZIO_FLAG_RAW_COMPRESS = 1U << 23,
ZIO_FLAG_RAW_ENCRYPT = 1U << 24,
ZIO_FLAG_GANG_CHILD = 1U << 25,
ZIO_FLAG_DDT_CHILD = 1U << 26,
ZIO_FLAG_GODFATHER = 1U << 27,
ZIO_FLAG_NOPWRITE = 1U << 28,
ZIO_FLAG_REEXECUTED = 1U << 29,
ZIO_FLAG_DELEGATED = 1U << 30,
ZIO_FLAG_FASTWRITE = 1U << 31,
};

#define ZIO_FLAG_MUSTSUCCEED 0
Expand All @@ -237,8 +237,8 @@ enum zio_flag {
(((zio)->io_flags & ZIO_FLAG_VDEV_INHERIT) | \
ZIO_FLAG_DONT_PROPAGATE | ZIO_FLAG_CANFAIL)

#define ZIO_CHILD_BIT(x) (1 << (x))
#define ZIO_CHILD_BIT_IS_SET(val, x) ((val) & (1 << (x)))
#define ZIO_CHILD_BIT(x) (1U << (x))
#define ZIO_CHILD_BIT_IS_SET(val, x) ((val) & (1U << (x)))

enum zio_child {
ZIO_CHILD_VDEV = 0,
Expand Down Expand Up @@ -405,18 +405,18 @@ enum zio_control_flag {
* perform. They only apply to ZIO_TYPE_TRIM zios, and are distinct
* from io_flags.
*/
ZIO_CONTROL_TRIM_SECURE = 1 << 0,
ZIO_CONTROL_TRIM_SECURE = 1U << 0,

/*
* Controls the lookup of zios in avl to match only by
* offsets.
*/
ZIO_CONTROL_OFFSET_MATCH = 1 << 1,
ZIO_CONTROL_OFFSET_MATCH = 1U << 1,

/*
* Controls pipeline to flush writes to object storage.
*/
ZIO_CONTROL_FLUSH_WRITES = 1 << 2,
ZIO_CONTROL_FLUSH_WRITES = 1U << 2,
};

typedef struct zio_alloc_list {
Expand Down
8 changes: 8 additions & 0 deletions module/zfs/refcount.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,14 @@ zfs_refcount_not_held(zfs_refcount_t *rc, const void *holder)
return (B_TRUE);
}

EXPORT_SYMBOL(zfs_refcount_create);
EXPORT_SYMBOL(zfs_refcount_destroy);
EXPORT_SYMBOL(zfs_refcount_is_zero);
EXPORT_SYMBOL(zfs_refcount_count);
EXPORT_SYMBOL(zfs_refcount_add);
EXPORT_SYMBOL(zfs_refcount_remove);
EXPORT_SYMBOL(zfs_refcount_held);

/* BEGIN CSTYLED */
ZFS_MODULE_PARAM(zfs, ,reference_tracking_enable, INT, ZMOD_RW,
"Track reference holders to refcount_t objects");
Expand Down
3 changes: 3 additions & 0 deletions tests/test-runner/bin/zts-report.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ if sys.platform.startswith('freebsd'):
'delegate/zfs_allow_003_pos': ['FAIL', known_reason],
'inheritance/inherit_001_pos': ['FAIL', '11829'],
'resilver/resilver_restart_001': ['FAIL', known_reason],
'pool_checkpoint/checkpoint_big_rewind': ['FAIL', '12622'],
'pool_checkpoint/checkpoint_indirect': ['FAIL', '12623'],
})
elif sys.platform.startswith('linux'):
maybe.update({
Expand All @@ -368,6 +370,7 @@ elif sys.platform.startswith('linux'):
'rsend/rsend_010_pos': ['FAIL', known_reason],
'rsend/rsend_011_pos': ['FAIL', known_reason],
'snapshot/rollback_003_pos': ['FAIL', known_reason],
'zvol/zvol_misc/zvol_misc_snapdev': ['FAIL', '12621'],
})

if os.environ.get('ZTS_OBJECT_STORE') == 'true':
Expand Down
4 changes: 2 additions & 2 deletions tests/zfs-tests/tests/functional/deadman/deadman_sync.ksh
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ else
fi
log_must zpool events

# Verify at least 5 deadman events were logged. The first after 5 seconds,
# Verify at least 4 deadman events were logged. The first after 5 seconds,
# and another each second thereafter until the delay is clearer.
events=$(zpool events | grep -c ereport.fs.zfs.deadman)
if [ "$events" -lt 5 ]; then
if [ "$events" -lt 4 ]; then
log_fail "Expect >=5 deadman events, $events found"
fi

Expand Down

0 comments on commit 91a5dca

Please sign in to comment.