mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Simplify spa_sync by breaking it up to smaller functions
The point of this refactoring is to break the high-level conceptual steps of spa_sync() to their own helper functions. In general large functions can enhance readability if structured well, but in this case the amount of conceptual steps taken could use the help of helper functions. Reviewed-by: Matt Ahrens <mahrens@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Serapheim Dimitropoulos <serapheim@delphix.com> Closes #8293
This commit is contained in:
committed by
Brian Behlendorf
parent
ce5fb2a7c6
commit
8dc2197b7b
@@ -1798,6 +1798,9 @@ svr_sync(spa_t *spa, dmu_tx_t *tx)
|
||||
spa_vdev_removal_t *svr = spa->spa_vdev_removal;
|
||||
int txgoff = dmu_tx_get_txg(tx) & TXG_MASK;
|
||||
|
||||
if (svr == NULL)
|
||||
return;
|
||||
|
||||
/*
|
||||
* This check is necessary so that we do not dirty the
|
||||
* DIRECTORY_OBJECT via spa_sync_removing_state() when there
|
||||
|
||||
Reference in New Issue
Block a user