mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 19:28:53 +03:00
Illumos 5981 - Deadlock in dmu_objset_find_dp
5981 Deadlock in dmu_objset_find_dp Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Dan McDonald <danmcd@omniti.com> Approved by: Robert Mustacchi <rm@joyent.com> References: https://www.illumos.org/issues/5981 https://github.com/illumos/illumos-gate/commit/1d3f896 Ported-by: kernelOfTruth kerneloftruth@gmail.com Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #3553
This commit is contained in:
committed by
Brian Behlendorf
parent
71e2fe41be
commit
5e8cd5d17f
@@ -1784,7 +1784,15 @@ dmu_objset_find_dp_cb(void *arg)
|
||||
dmu_objset_find_ctx_t *dcp = arg;
|
||||
dsl_pool_t *dp = dcp->dc_dp;
|
||||
|
||||
dsl_pool_config_enter(dp, FTAG);
|
||||
/*
|
||||
* We need to get a pool_config_lock here, as there are several
|
||||
* asssert(pool_config_held) down the stack. Getting a lock via
|
||||
* dsl_pool_config_enter is risky, as it might be stalled by a
|
||||
* pending writer. This would deadlock, as the write lock can
|
||||
* only be granted when our parent thread gives up the lock.
|
||||
* The _prio interface gives us priority over a pending writer.
|
||||
*/
|
||||
dsl_pool_config_enter_prio(dp, FTAG);
|
||||
|
||||
dmu_objset_find_dp_impl(dcp);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user