From 75e3ff58feda2d836c4546c5dc2e98fcd2d1a67b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 22 Nov 2013 14:52:16 -0800 Subject: Add zpool_events_seek() functionality The ZFS_IOC_EVENTS_SEEK ioctl was added to allow user space callers to seek around the zevent file descriptor by EID. When a specific EID is passed and it exists the cursor will be positioned there. If the EID is no longer cached by the kernel ENOENT is returned. The caller may also pass ZEVENT_SEEK_START or ZEVENT_SEEK_END to seek to those respective locations. Signed-off-by: Brian Behlendorf Signed-off-by: Chris Dunlap Issue #2 --- include/sys/fm/util.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/sys/fm/util.h') diff --git a/include/sys/fm/util.h b/include/sys/fm/util.h index 9dfd436c1..18fe49073 100644 --- a/include/sys/fm/util.h +++ b/include/sys/fm/util.h @@ -71,7 +71,7 @@ typedef struct erpt_dump { #ifdef _KERNEL -#define ZEVENT_SHUTDOWN 0x1 +#define ZEVENT_SHUTDOWN 0x1 typedef void zevent_cb_t(nvlist_t *, nvlist_t *); @@ -99,6 +99,7 @@ extern int zfs_zevent_fd_hold(int, minor_t *, zfs_zevent_t **); extern void zfs_zevent_fd_rele(int); extern int zfs_zevent_next(zfs_zevent_t *, nvlist_t **, uint64_t *, uint64_t *); extern int zfs_zevent_wait(zfs_zevent_t *); +extern int zfs_zevent_seek(zfs_zevent_t *, uint64_t); extern void zfs_zevent_init(zfs_zevent_t **); extern void zfs_zevent_destroy(zfs_zevent_t *); -- cgit v1.2.3