-struct buf bfreelist[BQUEUES];
-struct buf bswlist, *bclnlist;
-
-#define BUFHSZ 63
-#define RND (MAXBSIZE/DEV_BSIZE)
-struct bufhd bufhash[BUFHSZ];
-#define BUFHASH(dev, dblkno) \
- ((struct buf *)&bufhash[((int)(dev)+(((int)(dblkno))/RND)) % BUFHSZ])
-
-/*
- * Initialize hash links for buffers.
- */
-bhinit()
-{
- register int i;
- register struct bufhd *bp;
-
- for (bp = bufhash, i = 0; i < BUFHSZ; i++, bp++)
- bp->b_forw = bp->b_back = (struct buf *)bp;
-}
-
-/* #define DISKMON 1 */
-
-#ifdef DISKMON
-struct {
- int nbuf;
- long nread;
- long nreada;
- long ncache;
- long nwrite;
- long bufcount[64];
-} io_info;
-#endif
-
-/*
- * Swap IO headers -
- * They contain the necessary information for the swap I/O.
- * At any given time, a swap header can be in three
- * different lists. When free it is in the free list,
- * when allocated and the I/O queued, it is on the swap
- * device list, and finally, if the operation was a dirty
- * page push, when the I/O completes, it is inserted
- * in a list of cleaned pages to be processed by the pageout daemon.
- */
-struct buf *swbuf;
-short *swsize; /* CAN WE JUST USE B_BCOUNT? */
-int *swpf;
-
-
-#ifndef UNFAST
-#define notavail(bp) \
-{ \
- int x = spl6(); \
- (bp)->av_back->av_forw = (bp)->av_forw; \
- (bp)->av_forw->av_back = (bp)->av_back; \
- (bp)->b_flags |= B_BUSY; \
- splx(x); \
-}
-#endif