dsl_scan: close errorscrub cursor on pause
If the cursor were ever to actively hold resources, not finalising it would mean leaking those resources whenever the scrub is paused. The cursor is already reinitialized from the stored serialized form if/when it is resumed, so there's nothing we need from the old one, just to release it. Sponsored-by: TrueNAS Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Signed-off-by: Rob Norris <rob.norris@truenas.com> Closes #18603
This commit is contained in:
committed by
Brian Behlendorf
parent
037368b124
commit
68980eb105
@@ -1280,6 +1280,7 @@ dsl_errorscrub_pause_resume_sync(void *arg, dmu_tx_t *tx)
|
||||
spa->spa_scan_pass_errorscrub_pause = gethrestime_sec();
|
||||
scn->errorscrub_phys.dep_paused_flags = B_TRUE;
|
||||
dsl_errorscrub_sync_state(scn, tx);
|
||||
zap_cursor_fini(&scn->errorscrub_cursor);
|
||||
spa_event_notify(spa, NULL, NULL, ESC_ZFS_ERRORSCRUB_PAUSED);
|
||||
} else {
|
||||
ASSERT3U(*cmd, ==, POOL_SCRUB_NORMAL);
|
||||
|
||||
Reference in New Issue
Block a user