+/*
+ * Each buffer in the pool is usually doubly linked into 2 lists:
+ * the device with which it is currently associated (always)
+ * and also on a list of blocks available for allocation
+ * for other use (usually).
+ * The latter list is kept in last-used order, and the two
+ * lists are doubly linked to make it easy to remove
+ * a buffer from one list when it was found by
+ * looking through the other.
+ * A buffer is on the available list, and is liable
+ * to be reassigned to another disk block, if and only
+ * if it is not marked BUSY. When a buffer is busy, the
+ * available-list pointers can be used for other purposes.
+ * Most drivers use the forward ptr as a link in their I/O
+ * active queue.
+ * A buffer header contains all the information required
+ * to perform I/O.
+ * Most of the routines which manipulate these things
+ * are in bio.c.
+ */
+struct buf
+{
+ int b_flags; /* see defines below */
+ struct buf *b_forw; /* headed by devtab of b_dev */
+ struct buf *b_back; /* " */
+ struct buf *av_forw; /* position on free list, */
+ struct buf *av_back; /* if not BUSY*/
+ int b_dev; /* major+minor device name */
+ int b_wcount; /* transfer count (usu. words) */
+ char *b_addr; /* low order core address */
+ char *b_xmem; /* high order core address */
+ char *b_blkno; /* block # on device */
+ char b_error; /* returned after I/O */
+ char *b_resid; /* words not transferred after error */