GC: bufqueues are not used under -current, we use bioqueues.
This commit is contained in:
parent
5539274514
commit
921e42206a
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user