summaryrefslogtreecommitdiffstats
path: root/module/zfs/dsl_scrub.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2009-02-18 13:12:58 -0800
committerBrian Behlendorf <[email protected]>2009-02-18 13:12:58 -0800
commitba528721da4d12474117ba5cb87c5d9befaaa319 (patch)
treef242b20efe337bbbccc9586a47d1b22ac9caf156 /module/zfs/dsl_scrub.c
parentcee9272c61ae61ae6d917688911d50fd9205c15f (diff)
parentd164b2093561a9771db07346e6fffc9ca19427a2 (diff)
Merge commit 'refs/top-bases/gcc-no-parenthesis' into gcc-no-parenthesis
Diffstat (limited to 'module/zfs/dsl_scrub.c')
-rw-r--r--module/zfs/dsl_scrub.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/module/zfs/dsl_scrub.c b/module/zfs/dsl_scrub.c
index dbdfe8c75..783604101 100644
--- a/module/zfs/dsl_scrub.c
+++ b/module/zfs/dsl_scrub.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -95,6 +95,9 @@ dsl_pool_scrub_setup_sync(void *arg1, void *arg2, cred_t *cr, dmu_tx_t *tx)
ESC_ZFS_RESILVER_START);
dp->dp_scrub_max_txg = MIN(dp->dp_scrub_max_txg,
tx->tx_txg);
+ } else {
+ spa_event_notify(dp->dp_spa, NULL,
+ ESC_ZFS_SCRUB_START);
}
/* zero out the scrub stats in all vdev_stat_t's */
@@ -212,8 +215,9 @@ dsl_pool_scrub_cancel_sync(void *arg1, void *arg2, cred_t *cr, dmu_tx_t *tx)
*/
vdev_dtl_reassess(dp->dp_spa->spa_root_vdev, tx->tx_txg,
*completep ? dp->dp_scrub_max_txg : 0, B_TRUE);
- if (dp->dp_scrub_min_txg && *completep)
- spa_event_notify(dp->dp_spa, NULL, ESC_ZFS_RESILVER_FINISH);
+ if (*completep)
+ spa_event_notify(dp->dp_spa, NULL, dp->dp_scrub_min_txg ?
+ ESC_ZFS_RESILVER_FINISH : ESC_ZFS_SCRUB_FINISH);
spa_errlog_rotate(dp->dp_spa);
/*