/*	@(#)diskstats.h	13.1 (Tolerant) 91/02/02	*/


/*
 *  diskstats.h -- statistics for physical disk drives
 *
 *  A tx_diskstats[] and tx_diskbusy[] entry exists for each physical disk
 *  in the TX system.  MAX_DSK tx_diskstats[] and tx_diskbusy[] entries are
 *  valloc'ed at init time in module dskalloc() in file tsdev/dsk.c .  The
 *  mapping from the RTE device handle to the tx_diskstats[] and
 *  tx_diskbusy[] array index is performed via the DSTAT_IX macro.  The
 *  tx_diskstats[] and tx_diskbusy[] arrays are located via txinfo
 *  pointers.
 */

#define	MAX_CHAN	2
#define	MAX_CTL		16
#define	MAX_DRV		2
#define MAX_DSK		(MAX_CHAN * MAX_CTL * MAX_DRV)

#define DSTAT_IX(dev) ((dev & 0xf0) + ((dev >> 5) & 0x8) + (dev & 0x3))

#define BITS_DKBUSY_CL	32	/* bits per tx_diskbusy[] element */

struct disk_stats
{
    int 	txdk_busy;	/* pending requests on this drive */
    int		txdk_time;	/* # of clock ticks when (dk_busy != 0) */
    int		txdk_xfer;	/* # of I/O requests on this drive */
    int		txdk_blks;	/* # of blocks xfered in R/W operations */
};
