aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/vdev_removal.c
diff options
context:
space:
mode:
authorSerapheim Dimitropoulos <[email protected]>2019-01-18 09:50:16 -0800
committerBrian Behlendorf <[email protected]>2019-01-18 09:50:16 -0800
commit8dc2197b7b1e4d7ebc1420ea30e51c6541f1d834 (patch)
tree90889679fd877ddc795cba1225d26aa64668c337 /module/zfs/vdev_removal.c
parentce5fb2a7c6dfaa0f305350225e064e9f536bd5a4 (diff)
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 <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Serapheim Dimitropoulos <[email protected]> Closes #8293
Diffstat (limited to 'module/zfs/vdev_removal.c')
-rw-r--r--module/zfs/vdev_removal.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/module/zfs/vdev_removal.c b/module/zfs/vdev_removal.c
index 1896e824f..8d8900787 100644
--- a/module/zfs/vdev_removal.c
+++ b/module/zfs/vdev_removal.c
@@ -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