#ifndef __ZEV_H__ #define __ZEV_H__ #include #ifdef _KERNEL #include #include #include #include #include #endif #define ZEVIOC ('z' << 8) #define ZEV_IOC_GET_STATISTICS (ZEVIOC | 1) /* get zev statistics */ #define ZEV_IOC_MUTE_POOL (ZEVIOC | 2) /* no events for pool */ #define ZEV_IOC_UNMUTE_POOL (ZEVIOC | 3) /* send pool events */ #define ZEV_IOC_SET_MAX_QUEUE_LEN (ZEVIOC | 4) /* when to block ops */ #define ZEV_OP_MIN 1 #define ZEV_OP_ZFS_MOUNT 1 #define ZEV_OP_ZFS_UMOUNT 2 #define ZEV_OP_ZVOL_WRITE 3 #define ZEV_OP_ZVOL_TRUNCATE 4 #define ZEV_OP_ZNODE_CLOSE_AFTER_UPDATE 5 #define ZEV_OP_ZNODE_CREATE 6 #define ZEV_OP_ZNODE_REMOVE 7 #define ZEV_OP_ZNODE_LINK 8 #define ZEV_OP_ZNODE_SYMLINK 9 #define ZEV_OP_ZNODE_RENAME 10 #define ZEV_OP_ZNODE_WRITE 11 #define ZEV_OP_ZNODE_TRUNCATE 12 #define ZEV_OP_ZNODE_SETATTR 13 #define ZEV_OP_ZNODE_ACL 14 #define ZEV_OP_MAX 14 typedef struct zev_statistics_t { uint64_t zev_queue_len; uint64_t zev_max_queue_len; uint64_t zev_bytes_read; /* counters */ uint64_t zev_cnt_total_events; uint64_t zev_cnt_errors; /* zfsvfs ops */ uint64_t zev_cnt_zfs_mount; uint64_t zev_cnt_zfs_umount; /* zvol ops */ uint64_t zev_cnt_zvol_write; uint64_t zev_cnt_zvol_truncate; /* znode ops */ uint64_t zev_cnt_znode_close_after_update; uint64_t zev_cnt_znode_create; uint64_t zev_cnt_znode_remove; uint64_t zev_cnt_znode_link; uint64_t zev_cnt_znode_symlink; uint64_t zev_cnt_znode_rename; uint64_t zev_cnt_znode_write; uint64_t zev_cnt_znode_truncate; uint64_t zev_cnt_znode_setattr; uint64_t zev_cnt_znode_acl; } zev_statistics_t; typedef struct zev_ioctl_poolarg { uint64_t zev_poolname_len; char zev_poolname[MAXPATHLEN]; } zev_ioctl_poolarg_t; #ifdef _KERNEL void zev_mq_printf(int op, int error, char *fmt, ...); int zev_skip_pool(objset_t *os); #endif #endif /* __ZEV_H__ */