@@ -75,82 +75,7 @@ typedef enum {
7575 ZPROP_SRC_RECEIVED = 0x20
7676} zprop_source_t ;
7777
78- typedef enum zpool_errata {
79- ZPOOL_ERRATA_NONE ,
80- ZPOOL_ERRATA_ZOL_2094_SCRUB ,
81- ZPOOL_ERRATA_ZOL_2094_ASYNC_DESTROY ,
82- ZPOOL_ERRATA_ZOL_6845_ENCRYPTION ,
83- ZPOOL_ERRATA_ZOL_8308_ENCRYPTION ,
84- } zpool_errata_t ;
85-
86- typedef enum {
87- /*
88- * The following correspond to faults as defined in the (fault.fs.zfs.*)
89- * event namespace. Each is associated with a corresponding message ID.
90- * This must be kept in sync with the zfs_msgid_table in
91- * lib/libzfs/libzfs_status.c.
92- */
93- ZPOOL_STATUS_CORRUPT_CACHE , /* corrupt /kernel/drv/zpool.cache */
94- ZPOOL_STATUS_MISSING_DEV_R , /* missing device with replicas */
95- ZPOOL_STATUS_MISSING_DEV_NR , /* missing device with no replicas */
96- ZPOOL_STATUS_CORRUPT_LABEL_R , /* bad device label with replicas */
97- ZPOOL_STATUS_CORRUPT_LABEL_NR , /* bad device label with no replicas */
98- ZPOOL_STATUS_BAD_GUID_SUM , /* sum of device guids didn't match */
99- ZPOOL_STATUS_CORRUPT_POOL , /* pool metadata is corrupted */
100- ZPOOL_STATUS_CORRUPT_DATA , /* data errors in user (meta)data */
101- ZPOOL_STATUS_FAILING_DEV , /* device experiencing errors */
102- ZPOOL_STATUS_VERSION_NEWER , /* newer on-disk version */
103- ZPOOL_STATUS_HOSTID_MISMATCH , /* last accessed by another system */
104- ZPOOL_STATUS_HOSTID_ACTIVE , /* currently active on another system */
105- ZPOOL_STATUS_HOSTID_REQUIRED , /* multihost=on and hostid=0 */
106- ZPOOL_STATUS_IO_FAILURE_WAIT , /* failed I/O, failmode 'wait' */
107- ZPOOL_STATUS_IO_FAILURE_CONTINUE , /* failed I/O, failmode 'continue' */
108- ZPOOL_STATUS_IO_FAILURE_MMP , /* failed MMP, failmode not 'panic' */
109- ZPOOL_STATUS_BAD_LOG , /* cannot read log chain(s) */
110- ZPOOL_STATUS_ERRATA , /* informational errata available */
111-
112- /*
113- * If the pool has unsupported features but can still be opened in
114- * read-only mode, its status is ZPOOL_STATUS_UNSUP_FEAT_WRITE. If the
115- * pool has unsupported features but cannot be opened at all, its
116- * status is ZPOOL_STATUS_UNSUP_FEAT_READ.
117- */
118- ZPOOL_STATUS_UNSUP_FEAT_READ , /* unsupported features for read */
119- ZPOOL_STATUS_UNSUP_FEAT_WRITE , /* unsupported features for write */
120-
121- /*
122- * These faults have no corresponding message ID. At the time we are
123- * checking the status, the original reason for the FMA fault (I/O or
124- * checksum errors) has been lost.
125- */
126- ZPOOL_STATUS_FAULTED_DEV_R , /* faulted device with replicas */
127- ZPOOL_STATUS_FAULTED_DEV_NR , /* faulted device with no replicas */
128-
129- /*
130- * The following are not faults per se, but still an error possibly
131- * requiring administrative attention. There is no corresponding
132- * message ID.
133- */
134- ZPOOL_STATUS_VERSION_OLDER , /* older legacy on-disk version */
135- ZPOOL_STATUS_FEAT_DISABLED , /* supported features are disabled */
136- ZPOOL_STATUS_RESILVERING , /* device being resilvered */
137- ZPOOL_STATUS_OFFLINE_DEV , /* device offline */
138- ZPOOL_STATUS_REMOVED_DEV , /* removed device */
139- ZPOOL_STATUS_REBUILDING , /* device being rebuilt */
140- ZPOOL_STATUS_REBUILD_SCRUB , /* recommend scrubbing the pool */
141- ZPOOL_STATUS_NON_NATIVE_ASHIFT , /* (e.g. 512e dev with ashift of 9) */
142- ZPOOL_STATUS_COMPATIBILITY_ERR , /* bad 'compatibility' property */
143- ZPOOL_STATUS_INCOMPATIBLE_FEAT , /* feature set outside compatibility */
144-
145- /*
146- * Finally, the following indicates a healthy pool.
147- */
148- ZPOOL_STATUS_OK
149- } zpool_status_t ;
150-
151- #ifndef __sun
15278typedef bool boolean_t ;
153- #endif
15479
15580typedef struct libzfs_handle libzfs_handle_t ;
15681typedef struct zpool_handle zpool_handle_t ;
@@ -162,4 +87,3 @@ extern void libzfs_fini(libzfs_handle_t *);
16287extern uint64_t zpool_get_prop_int (zpool_handle_t * , zpool_prop_t , zprop_source_t * );
16388extern const char * zpool_get_name (zpool_handle_t * );
16489extern const char * zpool_get_state_str (zpool_handle_t * );
165- extern zpool_status_t zpool_get_status (zpool_handle_t * , const char * * , zpool_errata_t * );
0 commit comments