mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-26 04:07:45 +03:00
OpenZFS 6939 - add sysevents to zfs core for commands
Authored by: Dave Eddy <dave@daveeddy.com> Reviewed by: Patrick Mooney <patrick.mooney@joyent.com> Reviewed by: Joshua M. Clulow <jmc@joyent.com> Reviewed by: Josh Wilsdon <jwilsdon@joyent.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Richard Elling <Richard.Elling@RichardElling.com> Reviewed by: Alan Somers <asomers@gmail.com> Reviewed by: Andrew Stormont <andyjstormont@gmail.com> Approved by: Matthew Ahrens <mahrens@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: George Melikov <mail@gmelikov.ru> Ported-by: Giuseppe Di Natale <dinatale2@llnl.gov> OpenZFS-issue: https://www.illumos.org/issues/6939 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/ce1577b Closes #6328
This commit is contained in:
committed by
Brian Behlendorf
parent
314be68aa9
commit
12fa0466df
@@ -23,6 +23,7 @@
|
||||
* Copyright (c) 2011, 2016 by Delphix. All rights reserved.
|
||||
* Copyright 2016 Gary Mills
|
||||
* Copyright (c) 2017 Datto Inc.
|
||||
* Copyright 2017 Joyent, Inc.
|
||||
*/
|
||||
|
||||
#include <sys/dsl_scan.h>
|
||||
@@ -249,9 +250,10 @@ dsl_scan_setup_sync(void *arg, dmu_tx_t *tx)
|
||||
|
||||
if (vdev_resilver_needed(spa->spa_root_vdev,
|
||||
&scn->scn_phys.scn_min_txg, &scn->scn_phys.scn_max_txg)) {
|
||||
spa_event_notify(spa, NULL, ESC_ZFS_RESILVER_START);
|
||||
spa_event_notify(spa, NULL, NULL,
|
||||
ESC_ZFS_RESILVER_START);
|
||||
} else {
|
||||
spa_event_notify(spa, NULL, ESC_ZFS_SCRUB_START);
|
||||
spa_event_notify(spa, NULL, NULL, ESC_ZFS_SCRUB_START);
|
||||
}
|
||||
|
||||
spa->spa_scrub_started = B_TRUE;
|
||||
@@ -360,7 +362,8 @@ dsl_scan_done(dsl_scan_t *scn, boolean_t complete, dmu_tx_t *tx)
|
||||
vdev_dtl_reassess(spa->spa_root_vdev, tx->tx_txg,
|
||||
complete ? scn->scn_phys.scn_max_txg : 0, B_TRUE);
|
||||
if (complete) {
|
||||
spa_event_notify(spa, NULL, scn->scn_phys.scn_min_txg ?
|
||||
spa_event_notify(spa, NULL, NULL,
|
||||
scn->scn_phys.scn_min_txg ?
|
||||
ESC_ZFS_RESILVER_FINISH : ESC_ZFS_SCRUB_FINISH);
|
||||
}
|
||||
spa_errlog_rotate(spa);
|
||||
|
||||
Reference in New Issue
Block a user