aboutsummaryrefslogtreecommitdiffstats
path: root/include/sys/fm
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2013-11-22 11:20:41 -0800
committerBrian Behlendorf <[email protected]>2014-03-31 16:10:41 -0700
commita2f1945ee3ce8eba02ef54168c72f3be8f2cebdc (patch)
tree2aea8350c3afc4faa00f7de5037f848f8cdf4a20 /include/sys/fm
parent4d8c78c84445c099873c77c9fa20287dca982ed5 (diff)
Add a unique "eid" value to all zevents
Tagging each zevent with a unique monotonically increasing EID (Event IDentifier) provides the required infrastructure for a user space daemon to reliably process zevents. By writing the EID to persistent storage the daemon can safely resume where it left off in the event stream when it's restarted. Signed-off-by: Brian Behlendorf <[email protected]> Signed-off-by: Chris Dunlap <[email protected]> Issue #2
Diffstat (limited to 'include/sys/fm')
-rw-r--r--include/sys/fm/protocol.h1
-rw-r--r--include/sys/fm/util.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/sys/fm/protocol.h b/include/sys/fm/protocol.h
index 1ee221286..de05bb296 100644
--- a/include/sys/fm/protocol.h
+++ b/include/sys/fm/protocol.h
@@ -70,6 +70,7 @@ extern "C" {
#define FM_EREPORT_DETECTOR "detector"
#define FM_EREPORT_ENA "ena"
#define FM_EREPORT_TIME "time"
+#define FM_EREPORT_EID "eid"
/* list.* event payload member names */
#define FM_LIST_EVENT_SIZE "list-sz"
diff --git a/include/sys/fm/util.h b/include/sys/fm/util.h
index 2f03d1011..9dfd436c1 100644
--- a/include/sys/fm/util.h
+++ b/include/sys/fm/util.h
@@ -81,6 +81,7 @@ typedef struct zevent_s {
list_t ev_ze_list; /* " */
list_node_t ev_node; /* " */
zevent_cb_t *ev_cb; /* " */
+ uint64_t ev_eid;
} zevent_t;
typedef struct zfs_zevent {