mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
zinject: make iotype extendable
I'm about to add a new "type", and I need somewhere to put it! Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes #16947
This commit is contained in:
@@ -456,6 +456,24 @@ typedef enum zinject_type {
|
||||
ZINJECT_DELAY_EXPORT,
|
||||
} zinject_type_t;
|
||||
|
||||
typedef enum zinject_iotype {
|
||||
/*
|
||||
* Compatibility: zi_iotype used to be set to ZIO_TYPE_, so make sure
|
||||
* the corresponding ZINJECT_IOTYPE_ matches. Note that existing here
|
||||
* does not mean that injections are possible for all these types.
|
||||
*/
|
||||
ZINJECT_IOTYPE_NULL = ZIO_TYPE_NULL,
|
||||
ZINJECT_IOTYPE_READ = ZIO_TYPE_READ,
|
||||
ZINJECT_IOTYPE_WRITE = ZIO_TYPE_WRITE,
|
||||
ZINJECT_IOTYPE_FREE = ZIO_TYPE_FREE,
|
||||
ZINJECT_IOTYPE_CLAIM = ZIO_TYPE_CLAIM,
|
||||
ZINJECT_IOTYPE_FLUSH = ZIO_TYPE_FLUSH,
|
||||
ZINJECT_IOTYPE_TRIM = ZIO_TYPE_TRIM,
|
||||
ZINJECT_IOTYPE_ALL = ZIO_TYPES,
|
||||
/* Room for future expansion for ZIO_TYPE_* */
|
||||
ZINJECT_IOTYPES = 16,
|
||||
} zinject_iotype_t;
|
||||
|
||||
typedef struct zfs_share {
|
||||
uint64_t z_exportdata;
|
||||
uint64_t z_sharedata;
|
||||
|
||||
Reference in New Issue
Block a user