Remove changes from linux-have-sysevent to prepare for topic branch removal.
This commit is contained in:
parent
0eff4db8b4
commit
d6f1146154
|
@ -58,6 +58,7 @@ extern "C" {
|
||||||
#include <atomic.h>
|
#include <atomic.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#include <libsysevent.h>
|
||||||
#include <sys/note.h>
|
#include <sys/note.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/cred.h>
|
#include <sys/cred.h>
|
||||||
|
@ -71,11 +72,8 @@ extern "C" {
|
||||||
#include <sys/sdt.h>
|
#include <sys/sdt.h>
|
||||||
#include <sys/kstat.h>
|
#include <sys/kstat.h>
|
||||||
#include <sys/u8_textprep.h>
|
#include <sys/u8_textprep.h>
|
||||||
#ifdef HAVE_SYSEVENT
|
|
||||||
#include <libsysevent.h>
|
|
||||||
#include <sys/sysevent/eventdefs.h>
|
#include <sys/sysevent/eventdefs.h>
|
||||||
#include <sys/sysevent/dev.h>
|
#include <sys/sysevent/dev.h>
|
||||||
#endif /* HAVE_SYSEVENT */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Stack
|
* Stack
|
||||||
|
|
|
@ -535,11 +535,7 @@ extern void spa_prop_clear_bootfs(spa_t *spa, uint64_t obj, dmu_tx_t *tx);
|
||||||
extern void spa_configfile_set(spa_t *, nvlist_t *, boolean_t);
|
extern void spa_configfile_set(spa_t *, nvlist_t *, boolean_t);
|
||||||
|
|
||||||
/* asynchronous event notification */
|
/* asynchronous event notification */
|
||||||
#ifdef HAVE_SYSEVENT
|
|
||||||
extern void spa_event_notify(spa_t *spa, vdev_t *vdev, const char *name);
|
extern void spa_event_notify(spa_t *spa, vdev_t *vdev, const char *name);
|
||||||
#else
|
|
||||||
#define spa_event_notify(s,v,n) ((void)0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef ZFS_DEBUG
|
#ifdef ZFS_DEBUG
|
||||||
#define dprintf_bp(bp, fmt, ...) do { \
|
#define dprintf_bp(bp, fmt, ...) do { \
|
||||||
|
|
|
@ -58,11 +58,9 @@ extern "C" {
|
||||||
#include <sys/zone.h>
|
#include <sys/zone.h>
|
||||||
#include <sys/uio.h>
|
#include <sys/uio.h>
|
||||||
#include <sys/zfs_debug.h>
|
#include <sys/zfs_debug.h>
|
||||||
#ifdef HAVE_SYSEVENT
|
|
||||||
#include <sys/sysevent.h>
|
#include <sys/sysevent.h>
|
||||||
#include <sys/sysevent/eventdefs.h>
|
#include <sys/sysevent/eventdefs.h>
|
||||||
#include <sys/sysevent/dev.h>
|
#include <sys/sysevent/dev.h>
|
||||||
#endif /* HAVE_SYSEVENT */
|
|
||||||
#include <sys/fm/util.h>
|
#include <sys/fm/util.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -3721,11 +3721,9 @@ spa_async_probe(spa_t *spa, vdev_t *vd)
|
||||||
static void
|
static void
|
||||||
spa_async_autoexpand(spa_t *spa, vdev_t *vd)
|
spa_async_autoexpand(spa_t *spa, vdev_t *vd)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_SYSEVENT
|
|
||||||
sysevent_id_t eid;
|
sysevent_id_t eid;
|
||||||
nvlist_t *attr;
|
nvlist_t *attr;
|
||||||
char *physpath;
|
char *physpath;
|
||||||
#endif
|
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
if (!spa->spa_autoexpand)
|
if (!spa->spa_autoexpand)
|
||||||
|
@ -3739,7 +3737,6 @@ spa_async_autoexpand(spa_t *spa, vdev_t *vd)
|
||||||
if (!vd->vdev_ops->vdev_op_leaf || vd->vdev_physpath == NULL)
|
if (!vd->vdev_ops->vdev_op_leaf || vd->vdev_physpath == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef HAVE_SYSEVENT
|
|
||||||
physpath = kmem_zalloc(MAXPATHLEN, KM_SLEEP);
|
physpath = kmem_zalloc(MAXPATHLEN, KM_SLEEP);
|
||||||
(void) snprintf(physpath, MAXPATHLEN, "/devices%s", vd->vdev_physpath);
|
(void) snprintf(physpath, MAXPATHLEN, "/devices%s", vd->vdev_physpath);
|
||||||
|
|
||||||
|
@ -3751,7 +3748,6 @@ spa_async_autoexpand(spa_t *spa, vdev_t *vd)
|
||||||
|
|
||||||
nvlist_free(attr);
|
nvlist_free(attr);
|
||||||
kmem_free(physpath, MAXPATHLEN);
|
kmem_free(physpath, MAXPATHLEN);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -4521,10 +4517,10 @@ spa_has_active_shared_spare(spa_t *spa)
|
||||||
* in the userland libzpool, as we don't want consumers to misinterpret ztest
|
* in the userland libzpool, as we don't want consumers to misinterpret ztest
|
||||||
* or zdb as real changes.
|
* or zdb as real changes.
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_SYSEVENT
|
|
||||||
void
|
void
|
||||||
spa_event_notify(spa_t *spa, vdev_t *vd, const char *name)
|
spa_event_notify(spa_t *spa, vdev_t *vd, const char *name)
|
||||||
{
|
{
|
||||||
|
#ifdef _KERNEL
|
||||||
sysevent_t *ev;
|
sysevent_t *ev;
|
||||||
sysevent_attr_list_t *attr = NULL;
|
sysevent_attr_list_t *attr = NULL;
|
||||||
sysevent_value_t value;
|
sysevent_value_t value;
|
||||||
|
@ -4569,8 +4565,8 @@ done:
|
||||||
if (attr)
|
if (attr)
|
||||||
sysevent_free_attr(attr);
|
sysevent_free_attr(attr);
|
||||||
sysevent_free(ev);
|
sysevent_free(ev);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif /* HAVE_SYSEVENT */
|
|
||||||
|
|
||||||
#if defined(_KERNEL) && defined(HAVE_SPL)
|
#if defined(_KERNEL) && defined(HAVE_SPL)
|
||||||
/* state manipulation functions */
|
/* state manipulation functions */
|
||||||
|
|
Loading…
Reference in New Issue