| 162 | } |
| 163 | |
| 164 | void |
| 165 | bioq_remove(struct bio_queue_head *head, struct bio *bp) |
| 166 | { |
| 167 | |
| 168 | if (head->insert_point == NULL) { |
| 169 | if (bp == TAILQ_FIRST(&head->queue)) |
| 170 | head->last_offset = bp->bio_offset + bp->bio_length; |
| 171 | } else if (bp == head->insert_point) |
| 172 | head->insert_point = NULL; |
| 173 | |
| 174 | TAILQ_REMOVE(&head->queue, bp, bio_queue); |
| 175 | if (TAILQ_EMPTY(&head->queue)) |
| 176 | head->batched = 0; |
| 177 | head->total--; |
| 178 | } |
| 179 | |
| 180 | void |
| 181 | bioq_flush(struct bio_queue_head *head, struct devstat *stp, int error) |