Skip to content

Commit 2848de1

Browse files
authored
Remove zl_issuer_lock from zil_suspend().
This locking was recently added as part of openzfs#14979. But appears it is illegal to take zl_issuer_lock while holding dp_config_rwlock, taken by dsl_pool_hold(). It causes deadlock with sync thread in spa_sync_upgrades(). On a second thought, we should not need this locking, since zil_commit_impl() we call below takes zl_issuer_lock, that should sufficiently protect zl_suspend reads, combined with other logic from openzfs#14979. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Alexander Motin <[email protected]> Sponsored by: iXsystems, Inc. Closes openzfs#15103
1 parent 48d0e94 commit 2848de1

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

module/zfs/zil.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3941,13 +3941,11 @@ zil_suspend(const char *osname, void **cookiep)
39413941
return (error);
39423942
zilog = dmu_objset_zil(os);
39433943

3944-
mutex_enter(&zilog->zl_issuer_lock);
39453944
mutex_enter(&zilog->zl_lock);
39463945
zh = zilog->zl_header;
39473946

39483947
if (zh->zh_flags & ZIL_REPLAY_NEEDED) { /* unplayed log */
39493948
mutex_exit(&zilog->zl_lock);
3950-
mutex_exit(&zilog->zl_issuer_lock);
39513949
dmu_objset_rele(os, suspend_tag);
39523950
return (SET_ERROR(EBUSY));
39533951
}
@@ -3961,7 +3959,6 @@ zil_suspend(const char *osname, void **cookiep)
39613959
if (cookiep == NULL && !zilog->zl_suspending &&
39623960
(zilog->zl_suspend > 0 || BP_IS_HOLE(&zh->zh_log))) {
39633961
mutex_exit(&zilog->zl_lock);
3964-
mutex_exit(&zilog->zl_issuer_lock);
39653962
dmu_objset_rele(os, suspend_tag);
39663963
return (0);
39673964
}
@@ -3970,7 +3967,6 @@ zil_suspend(const char *osname, void **cookiep)
39703967
dsl_pool_rele(dmu_objset_pool(os), suspend_tag);
39713968

39723969
zilog->zl_suspend++;
3973-
mutex_exit(&zilog->zl_issuer_lock);
39743970

39753971
if (zilog->zl_suspend > 1) {
39763972
/*

0 commit comments

Comments
 (0)