Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 331413
b: refs/heads/master
c: bb81110
h: refs/heads/master
i:
  331411: ea89813
v: v3
  • Loading branch information
Asias He authored and Rusty Russell committed Sep 28, 2012
1 parent 364f820 commit fdd1f4f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d78b519f6b945aef6202bbb5b56f928572e15165
refs/heads/master: bb8111086c12ebdadc0544ba04dccd3aad212ad2
19 changes: 11 additions & 8 deletions trunk/drivers/block/virtio_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,15 +274,18 @@ static void virtblk_done(struct virtqueue *vq)
unsigned int len;

spin_lock_irqsave(vblk->disk->queue->queue_lock, flags);
while ((vbr = virtqueue_get_buf(vblk->vq, &len)) != NULL) {
if (vbr->bio) {
virtblk_bio_done(vbr);
bio_done = true;
} else {
virtblk_request_done(vbr);
req_done = true;
do {
virtqueue_disable_cb(vq);
while ((vbr = virtqueue_get_buf(vblk->vq, &len)) != NULL) {
if (vbr->bio) {
virtblk_bio_done(vbr);
bio_done = true;
} else {
virtblk_request_done(vbr);
req_done = true;
}
}
}
} while (!virtqueue_enable_cb(vq));
/* In case queue is stopped waiting for more buffers. */
if (req_done)
blk_start_queue(vblk->disk->queue);
Expand Down

0 comments on commit fdd1f4f

Please sign in to comment.