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 <behlendorf1@llnl.gov>
Signed-off-by: Chris Dunlap <cdunlap@llnl.gov>
Issue #2
This commit is contained in:
Brian Behlendorf
2013-11-22 11:20:41 -08:00
parent 4d8c78c844
commit a2f1945ee3
3 changed files with 18 additions and 0 deletions
+1
View File
@@ -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"
+1
View File
@@ -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 {