diff --git a/module/zfs/fm.c b/module/zfs/fm.c index bb2b72b969..5b06d49d01 100644 --- a/module/zfs/fm.c +++ b/module/zfs/fm.c @@ -494,7 +494,7 @@ fm_zevent_insert(zevent_t *ev) * Post a zevent */ void -fm_zevent_post(nvlist_t *nvl, zevent_cb_t *cb) +fm_zevent_post(nvlist_t *nvl, nvlist_t *detector, zevent_cb_t *cb) { size_t nvl_size = 0; zevent_t *ev; @@ -515,6 +515,7 @@ fm_zevent_post(nvlist_t *nvl, zevent_cb_t *cb) } ev->ev_nvl = nvl; + ev->ev_detector = detector; ev->ev_cb = cb; fm_zevent_insert(ev); cv_broadcast(&zevent_cv); diff --git a/module/zfs/include/sys/fm/util.h b/module/zfs/include/sys/fm/util.h index 2052e1998e..959931939a 100644 --- a/module/zfs/include/sys/fm/util.h +++ b/module/zfs/include/sys/fm/util.h @@ -82,10 +82,11 @@ typedef struct erpt_dump { typedef void zevent_cb_t(nvlist_t *); typedef struct zevent_s { - nvlist_t *ev_nvl; /* protected by the zevent_lock */ - list_t ev_zpd_list; /* " */ - list_node_t ev_node; /* " */ - zevent_cb_t *ev_cb; /* " */ + nvlist_t *ev_nvl; /* protected by the zevent_lock */ + nvlist_t *ev_detector; /* " */ + list_t ev_zpd_list; /* " */ + list_node_t ev_node; /* " */ + zevent_cb_t *ev_cb; /* " */ } zevent_t; typedef struct zfs_private_data { diff --git a/module/zfs/include/sys/zfs_context.h b/module/zfs/include/sys/zfs_context.h index 83fbadb7ae..57e1607530 100644 --- a/module/zfs/include/sys/zfs_context.h +++ b/module/zfs/include/sys/zfs_context.h @@ -59,6 +59,10 @@ extern "C" { #include #include #include +#include +#include + +#define CPU_SEQID (CPU->cpu_seqid) #ifdef __cplusplus }