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 <behlendorf1@llnl.gov>
Signed-off-by: Chris Dunlap <cdunlap@llnl.gov>
Issue #2
This commit is contained in:
Brian Behlendorf
2013-11-22 14:52:16 -08:00
parent a2f1945ee3
commit 75e3ff58fe
7 changed files with 128 additions and 1 deletions
+1
View File
@@ -864,6 +864,7 @@ typedef enum zfs_ioc {
ZFS_IOC_LINUX = ('Z' << 8) + 0x80,
ZFS_IOC_EVENTS_NEXT,
ZFS_IOC_EVENTS_CLEAR,
ZFS_IOC_EVENTS_SEEK,
/*
* FreeBSD - 1/64 numbers reserved.