mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 03:37:45 +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
@@ -647,7 +647,7 @@ spa_condense_indirect_thread_check(void *arg, zthr_t *zthr)
|
||||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
static int
|
||||
static void
|
||||
spa_condense_indirect_thread(void *arg, zthr_t *zthr)
|
||||
{
|
||||
spa_t *spa = arg;
|
||||
@@ -744,13 +744,11 @@ spa_condense_indirect_thread(void *arg, zthr_t *zthr)
|
||||
* shutting down.
|
||||
*/
|
||||
if (zthr_iscancelled(zthr))
|
||||
return (0);
|
||||
return;
|
||||
|
||||
VERIFY0(dsl_sync_task(spa_name(spa), NULL,
|
||||
spa_condense_indirect_complete_sync, sci, 0,
|
||||
ZFS_SPACE_CHECK_EXTRA_RESERVED));
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user