forked from openzfs/zfs
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent reclaim in metaslab preload threads
Reclaim during metaslab preloading can cause deadlocks involving znode z_lock and ARC buffer header ht_lock. Fixes openzfs#3532.
- Loading branch information
Showing
1 changed file
with
2 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1579,6 +1579,7 @@ metaslab_preload(void *arg) | |
{ | ||
metaslab_t *msp = arg; | ||
spa_t *spa = msp->ms_group->mg_vd->vdev_spa; | ||
fstrans_cookie_t cookie = spl_fstrans_mark(); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
behlendorf
|
||
|
||
ASSERT(!MUTEX_HELD(&msp->ms_group->mg_lock)); | ||
|
||
|
@@ -1592,6 +1593,7 @@ metaslab_preload(void *arg) | |
*/ | ||
msp->ms_access_txg = spa_syncing_txg(spa) + metaslab_unload_delay + 1; | ||
mutex_exit(&msp->ms_lock); | ||
spl_fstrans_unmark(cookie); | ||
} | ||
|
||
static void | ||
|
It may very well be possible to narrow the scope of the lockdown.