mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
scrub: generate scrub_finish event
The `scn_min_txg` can now be used not only with resilver. Instead of checking `scn_min_txg` to determine whether it’s a resilver or a scrub, simply check which function is defined. Thanks to this change, a scrub_finish event is generated when performing a scrub from the saved txg. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Mariusz Zaborski <mariusz.zaborski@klarasystems.com> Closes #17432
This commit is contained in:
committed by
Alexander Motin
parent
a4e775d2ca
commit
954894ee53
@@ -235,6 +235,9 @@ static uint_t zfs_resilver_defer_percent = 10;
|
||||
#define DSL_SCAN_IS_SCRUB(scn) \
|
||||
((scn)->scn_phys.scn_func == POOL_SCAN_SCRUB)
|
||||
|
||||
#define DSL_SCAN_IS_RESILVER(scn) \
|
||||
((scn)->scn_phys.scn_func == POOL_SCAN_RESILVER)
|
||||
|
||||
/*
|
||||
* Enable/disable the processing of the free_bpobj object.
|
||||
*/
|
||||
@@ -1169,7 +1172,7 @@ dsl_scan_done(dsl_scan_t *scn, boolean_t complete, dmu_tx_t *tx)
|
||||
vdev_dtl_reassess(spa->spa_root_vdev, tx->tx_txg,
|
||||
scn->scn_phys.scn_max_txg, B_TRUE, B_FALSE);
|
||||
|
||||
if (scn->scn_phys.scn_min_txg) {
|
||||
if (DSL_SCAN_IS_RESILVER(scn)) {
|
||||
nvlist_t *aux = fnvlist_alloc();
|
||||
fnvlist_add_string(aux, ZFS_EV_RESILVER_TYPE,
|
||||
"healing");
|
||||
|
||||
Reference in New Issue
Block a user