mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
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:
@@ -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 *);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user