Revert "Add KSTAT_TYPE_TXG type"

This reverts commit dba79fcbf2 in
favor of using the generic KSTAT_TYPE_RAW callbacks.  The advantage
of this approach is that arbitrary types can be added without the
need to add them to the SPL.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #296
This commit is contained in:
Brian Behlendorf
2013-09-30 11:32:42 -07:00
parent 09f38b7e60
commit ce07767f79
2 changed files with 1 additions and 61 deletions
+1 -22
View File
@@ -44,8 +44,7 @@
#define KSTAT_TYPE_INTR 2 /* interrupt stats; ks_ndata == 1 */
#define KSTAT_TYPE_IO 3 /* I/O stats; ks_ndata == 1 */
#define KSTAT_TYPE_TIMER 4 /* event timer; ks_ndata >= 1 */
#define KSTAT_TYPE_TXG 5 /* txg sync; ks_ndata >= 1 */
#define KSTAT_NUM_TYPES 6
#define KSTAT_NUM_TYPES 5
#define KSTAT_DATA_CHAR 0
#define KSTAT_DATA_INT32 1
@@ -176,26 +175,6 @@ typedef struct kstat_timer {
hrtime_t stop_time; /* previous event stop time */
} kstat_timer_t;
typedef enum kstat_txg_state {
TXG_STATE_OPEN = 1,
TXG_STATE_QUIESCING = 2,
TXG_STATE_SYNCING = 3,
TXG_STATE_COMMITTED = 4,
} kstat_txg_state_t;
typedef struct kstat_txg {
u_longlong_t txg; /* txg id */
kstat_txg_state_t state; /* txg state */
hrtime_t birth; /* birth time stamp */
u_longlong_t nread; /* number of bytes read */
u_longlong_t nwritten; /* number of bytes written */
uint_t reads; /* number of read operations */
uint_t writes; /* number of write operations */
hrtime_t open_time; /* open time */
hrtime_t quiesce_time;/* quiesce time */
hrtime_t sync_time; /* sync time */
} kstat_txg_t;
int spl_kstat_init(void);
void spl_kstat_fini(void);