mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
Prevent reclaim in metaslab preload threads
Reclaim during metaslab preloading can cause deadlocks involving znode z_lock and ARC buffer header ht_lock. Signed-off-by: Tim Chase <tim@chase2k.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #3532.
This commit is contained in:
parent
e16b3fcc61
commit
1cd777340b
@ -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();
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user