Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 340e01248478ba8b78a6d4d1809b1eff > files > 207

kvm-83-270.el5_11.src.rpm

From f21c551be77d5c145edf0312972481ac34c4da9c Mon Sep 17 00:00:00 2001
From: Eduardo Habkost <ehabkost@redhat.com>
Date: Tue, 26 Jan 2010 15:29:53 -0200
Subject: [PATCH] Revert "Queue notify support for virtio block device."

This reverts commit bad54220ef2133fac3f1978f40d0e82f5b5dfc6c.

RH-Reverts: bad54220ef2133fac3f1978f40d0e82f5b5dfc6c
Reverts-Patchwork-ID: 6043
Bugzilla: 552250

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 qemu/hw/virtio-blk.c |    9 ---------
 1 files changed, 0 insertions(+), 9 deletions(-)

diff --git a/qemu/hw/virtio-blk.c b/qemu/hw/virtio-blk.c
index 1737585..9866a53 100644
--- a/qemu/hw/virtio-blk.c
+++ b/qemu/hw/virtio-blk.c
@@ -24,7 +24,6 @@ typedef struct VirtIOBlock
     VirtQueue *vq;
     void *rq;
     QEMUBH *bh;
-    unsigned int pending;
 } VirtIOBlock;
 
 static VirtIOBlock *to_virtio_blk(VirtIODevice *vdev)
@@ -43,7 +42,6 @@ typedef struct VirtIOBlockReq
     struct VirtIOBlockReq *next;
 } VirtIOBlockReq;
 
-static void virtio_blk_handle_output(VirtIODevice *vdev, VirtQueue *vq);
 static void virtio_blk_req_complete(VirtIOBlockReq *req, int status)
 {
     VirtIOBlock *s = req->dev;
@@ -52,10 +50,6 @@ static void virtio_blk_req_complete(VirtIOBlockReq *req, int status)
     virtqueue_push(s->vq, &req->elem, req->size + sizeof(*req->in));
     virtio_notify(&s->vdev, s->vq);
 
-    virtio_blk_handle_output(&s->vdev, s->vq);
-    if(--s->pending == 0) 
-        virtio_queue_set_notification(s->vq, 1);
-
     qemu_free(req->buffer);
     qemu_free(req);
 }
@@ -206,9 +200,6 @@ static void virtio_blk_handle_output(VirtIODevice *vdev, VirtQueue *vq)
             exit(1);
         }
 
-        if(++s->pending == 1)
-            virtio_queue_set_notification(s->vq, 0);
-
         req->out = (void *)req->elem.out_sg[0].iov_base;
         req->in = (void *)req->elem.in_sg[req->elem.in_num - 1].iov_base;
 
-- 
1.6.3.rc4.29.g8146