mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +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
+3
-2
@@ -25,6 +25,7 @@
|
||||
* Copyright 2017 Nexenta Systems, Inc.
|
||||
* Copyright (c) 2014 Integros [integros.com]
|
||||
* Copyright 2016 Toomas Soome <tsoome@me.com>
|
||||
* Copyright 2017 Joyent, Inc.
|
||||
*/
|
||||
|
||||
#include <sys/zfs_context.h>
|
||||
@@ -2657,7 +2658,7 @@ vdev_online(spa_t *spa, uint64_t guid, uint64_t flags, vdev_state_t *newstate)
|
||||
if (wasoffline ||
|
||||
(oldstate < VDEV_STATE_DEGRADED &&
|
||||
vd->vdev_state >= VDEV_STATE_DEGRADED))
|
||||
spa_event_notify(spa, vd, ESC_ZFS_VDEV_ONLINE);
|
||||
spa_event_notify(spa, vd, NULL, ESC_ZFS_VDEV_ONLINE);
|
||||
|
||||
return (spa_vdev_state_exit(spa, vd, 0));
|
||||
}
|
||||
@@ -2821,7 +2822,7 @@ vdev_clear(spa_t *spa, vdev_t *vd)
|
||||
if (vd->vdev_aux == NULL && !vdev_is_dead(vd))
|
||||
spa_async_request(spa, SPA_ASYNC_RESILVER);
|
||||
|
||||
spa_event_notify(spa, vd, ESC_ZFS_VDEV_CLEAR);
|
||||
spa_event_notify(spa, vd, NULL, ESC_ZFS_VDEV_CLEAR);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user