diff options
-rw-r--r-- | sys/sys/buf.h | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/sys/sys/buf.h b/sys/sys/buf.h index 051a323..61fda6c 100644 --- a/sys/sys/buf.h +++ b/sys/sys/buf.h @@ -385,53 +385,6 @@ struct cluster_save { }; #ifdef _KERNEL -static __inline void bufq_init __P((struct buf_queue_head *head)); -static __inline void bufq_insert_tail __P((struct buf_queue_head *head, - struct buf *bp)); -static __inline void bufq_remove __P((struct buf_queue_head *head, - struct buf *bp)); -static __inline struct buf *bufq_first __P((struct buf_queue_head *head)); - -static __inline void -bufq_init(struct buf_queue_head *head) -{ - TAILQ_INIT(&head->queue); - head->last_pblkno = 0; - head->insert_point = NULL; - head->switch_point = NULL; -} - -static __inline void -bufq_insert_tail(struct buf_queue_head *head, struct buf *bp) -{ - if ((bp->b_ioflags & BIO_ORDERED) != 0) { - head->insert_point = bp; - head->switch_point = NULL; - } - TAILQ_INSERT_TAIL(&head->queue, bp, b_act); -} - -static __inline void -bufq_remove(struct buf_queue_head *head, struct buf *bp) -{ - if (bp == head->switch_point) - head->switch_point = TAILQ_NEXT(bp, b_act); - if (bp == head->insert_point) { - head->insert_point = TAILQ_PREV(bp, buf_queue, b_act); - if (head->insert_point == NULL) - head->last_pblkno = 0; - } else if (bp == TAILQ_FIRST(&head->queue)) - head->last_pblkno = bp->b_pblkno; - TAILQ_REMOVE(&head->queue, bp, b_act); - if (TAILQ_FIRST(&head->queue) == head->switch_point) - head->switch_point = NULL; -} - -static __inline struct buf * -bufq_first(struct buf_queue_head *head) -{ - return (TAILQ_FIRST(&head->queue)); -} #define BUF_WRITE(bp) \ (bp)->b_op->bop_write(bp) |