diff options
author | Pawel Jakub Dawidek <[email protected]> | 2023-04-18 08:42:09 +0900 |
---|---|---|
committer | GitHub <[email protected]> | 2023-04-17 16:42:09 -0700 |
commit | 3b5af2013992231645e0a462eef4171d1c48de17 (patch) | |
tree | 19f28b7b7cd85e3a90444baba675bde50a67b73e | |
parent | ac18dc77f3703940682aecb442f4e58aa2c14f1a (diff) |
Fix VERIFY(!zil_replaying(zilog, tx)) panic
The zfs_log_clone_range() function is never called from the
zfs_clone_range_replay() function, so I assumed it is safe to assert
that zil_replaying() is never TRUE here. It turns out zil_replaying()
also returns TRUE when the sync property is set to disabled.
Fix the problem by just returning if zil_replaying() returns TRUE.
Reviewed-by: Richard Yao <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reported by: Florian Smeets
Signed-off-by: Pawel Jakub Dawidek <[email protected]>
Closes #14758
-rw-r--r-- | module/zfs/zfs_log.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/module/zfs/zfs_log.c b/module/zfs/zfs_log.c index d009c58d8..50325907b 100644 --- a/module/zfs/zfs_log.c +++ b/module/zfs/zfs_log.c @@ -905,9 +905,7 @@ zfs_log_clone_range(zilog_t *zilog, dmu_tx_t *tx, int txtype, znode_t *zp, uint64_t partlen, max_log_data; size_t i, partnbps; - VERIFY(!zil_replaying(zilog, tx)); - - if (zp->z_unlinked) + if (zil_replaying(zilog, tx) || zp->z_unlinked) return; max_log_data = zil_max_log_data(zilog, sizeof (lr_clone_range_t)); |