mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-26 12:12:13 +03:00
Serialize ZTHR operations to eliminate races
Adds a new lock for serializing operations on zthrs. The commit also includes some code cleanup and refactoring. Reviewed by: Matt Ahrens <mahrens@delphix.com> Reviewed by: Tom Caputi <tcaputi@datto.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Serapheim Dimitropoulos <serapheim@delphix.com> Closes #8229
This commit is contained in:
committed by
Brian Behlendorf
parent
83c796c5e9
commit
61c3391acc
@@ -393,7 +393,7 @@ spa_checkpoint_discard_thread_check(void *arg, zthr_t *zthr)
|
||||
return (B_TRUE);
|
||||
}
|
||||
|
||||
int
|
||||
void
|
||||
spa_checkpoint_discard_thread(void *arg, zthr_t *zthr)
|
||||
{
|
||||
spa_t *spa = arg;
|
||||
@@ -408,7 +408,7 @@ spa_checkpoint_discard_thread(void *arg, zthr_t *zthr)
|
||||
dmu_buf_t **dbp;
|
||||
|
||||
if (zthr_iscancelled(zthr))
|
||||
return (0);
|
||||
return;
|
||||
|
||||
ASSERT3P(vd->vdev_ops, !=, &vdev_indirect_ops);
|
||||
|
||||
@@ -445,8 +445,6 @@ spa_checkpoint_discard_thread(void *arg, zthr_t *zthr)
|
||||
VERIFY0(dsl_sync_task(spa->spa_name, NULL,
|
||||
spa_checkpoint_discard_complete_sync, spa,
|
||||
0, ZFS_SPACE_CHECK_NONE));
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user