diff options
author | Serapheim Dimitropoulos <[email protected]> | 2019-01-18 09:50:16 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-01-18 09:50:16 -0800 |
commit | 8dc2197b7b1e4d7ebc1420ea30e51c6541f1d834 (patch) | |
tree | 90889679fd877ddc795cba1225d26aa64668c337 /module/zfs/vdev_removal.c | |
parent | ce5fb2a7c6dfaa0f305350225e064e9f536bd5a4 (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.c | 3 |
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 |