aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2021-03-13 09:10:16 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2021-03-13 09:31:49 +0000
commit59146a6921d06d5cf4320dc8ed82810363ffe7c4 (patch)
tree5f31eca1247e011473af5919bde7596b5f212a69 /sys/contrib
parentfb3edd4f3ff89f5883b8309ff71ff4a426279c85 (diff)
downloadsrc-59146a6921d06d5cf4320dc8ed82810363ffe7c4.tar.gz
src-59146a6921d06d5cf4320dc8ed82810363ffe7c4.zip
zfs: make seqc asserts conditional on replay
Avoids tripping on asserts when doing pool recovery.
Diffstat (limited to 'sys/contrib')
-rw-r--r--sys/contrib/openzfs/module/os/freebsd/zfs/zfs_acl.c9
-rw-r--r--sys/contrib/openzfs/module/zfs/zfs_replay.c5
2 files changed, 6 insertions, 8 deletions
diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_acl.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_acl.c
index 23b87de8bd0d..7089d0e0e887 100644
--- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_acl.c
+++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_acl.c
@@ -1141,10 +1141,11 @@ zfs_acl_chown_setattr(znode_t *zp)
int error;
zfs_acl_t *aclp;
- if (zp->z_zfsvfs->z_replay == B_FALSE)
+ if (zp->z_zfsvfs->z_replay == B_FALSE) {
ASSERT_VOP_ELOCKED(ZTOV(zp), __func__);
+ ASSERT_VOP_IN_SEQC(ZTOV(zp));
+ }
ASSERT(MUTEX_HELD(&zp->z_acl_lock));
- ASSERT_VOP_IN_SEQC(ZTOV(zp));
if ((error = zfs_acl_node_read(zp, B_TRUE, &aclp, B_FALSE)) == 0)
zp->z_mode = zfs_mode_compute(zp->z_mode, aclp,
@@ -1172,7 +1173,9 @@ zfs_aclset_common(znode_t *zp, zfs_acl_t *aclp, cred_t *cr, dmu_tx_t *tx)
int count = 0;
zfs_acl_phys_t acl_phys;
- ASSERT_VOP_IN_SEQC(ZTOV(zp));
+ if (zp->z_zfsvfs->z_replay == B_FALSE) {
+ ASSERT_VOP_IN_SEQC(ZTOV(zp));
+ }
mode = zp->z_mode;
diff --git a/sys/contrib/openzfs/module/zfs/zfs_replay.c b/sys/contrib/openzfs/module/zfs/zfs_replay.c
index 53c7dbd5df43..cba5e8c9cd0b 100644
--- a/sys/contrib/openzfs/module/zfs/zfs_replay.c
+++ b/sys/contrib/openzfs/module/zfs/zfs_replay.c
@@ -859,12 +859,7 @@ zfs_replay_setattr(void *arg1, void *arg2, boolean_t byteswap)
zfsvfs->z_fuid_replay = zfs_replay_fuid_domain(start, &start,
lr->lr_uid, lr->lr_gid);
- /*
- * Satisfy assertions.
- */
- vn_seqc_write_begin(ZTOV(zp));
error = zfs_setattr(zp, vap, 0, kcred);
- vn_seqc_write_end(ZTOV(zp));
zfs_fuid_info_free(zfsvfs->z_fuid_replay);
zfsvfs->z_fuid_replay = NULL;