diff options
| author | Akash B <akash-b@hpe.com> | 2026-02-27 18:39:52 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-27 18:39:52 +0000 |
| commit | f8e5af53e92fa7c03393fbd4922cb9c1d0c15920 (patch) | |
| tree | d304296ab9836085facfa5713b4942973fcd0448 | |
| parent | f8457fbdc4039c34b5f1e709792a6d71ff4bfeba (diff) | |
Fix redundant declaration of dsl_pool_tvendor/openzfs/master
Remove redundant dsl_pool variable and duplicate spa_get_dsl()
call in vdev_rebuild_thread.
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Akash B <akash-b@hpe.com>
Closes #18263
| -rw-r--r-- | module/zfs/vdev_rebuild.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/module/zfs/vdev_rebuild.c b/module/zfs/vdev_rebuild.c index 0e14d29d7fb2..68a953780837 100644 --- a/module/zfs/vdev_rebuild.c +++ b/module/zfs/vdev_rebuild.c @@ -23,7 +23,7 @@ * * Copyright (c) 2018, Intel Corporation. * Copyright (c) 2020 by Lawrence Livermore National Security, LLC. - * Copyright (c) 2022 Hewlett Packard Enterprise Development LP. + * Copyright (c) 2022, 2026 Hewlett Packard Enterprise Development LP. * Copyright (c) 2024 by Delphix. All rights reserved. */ @@ -762,6 +762,7 @@ vdev_rebuild_thread(void *arg) vdev_t *vd = arg; spa_t *spa = vd->vdev_spa; vdev_t *rvd = spa->spa_root_vdev; + dsl_pool_t *dp = spa_get_dsl(spa); int error = 0; /* @@ -769,9 +770,8 @@ vdev_rebuild_thread(void *arg) * is not required for a correct rebuild, but we do want rebuilds to * emulate the resilver behavior as much as possible. */ - dsl_pool_t *dsl = spa_get_dsl(spa); - if (dsl_scan_scrubbing(dsl)) - dsl_scan_cancel(dsl); + if (dsl_scan_scrubbing(dp)) + dsl_scan_cancel(dp); spa_config_enter(spa, SCL_CONFIG, FTAG, RW_READER); mutex_enter(&vd->vdev_rebuild_lock); @@ -853,7 +853,7 @@ vdev_rebuild_thread(void *arg) if (zfs_range_tree_space(msp->ms_allocating[j])) { mutex_exit(&msp->ms_lock); mutex_exit(&msp->ms_sync_lock); - txg_wait_synced(dsl, 0); + txg_wait_synced(dp, 0); mutex_enter(&msp->ms_sync_lock); mutex_enter(&msp->ms_lock); break; @@ -930,7 +930,6 @@ vdev_rebuild_thread(void *arg) spa_config_enter(spa, SCL_CONFIG, FTAG, RW_READER); - dsl_pool_t *dp = spa_get_dsl(spa); dmu_tx_t *tx = dmu_tx_create_dd(dp->dp_mos_dir); VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT | DMU_TX_SUSPEND)); |
