[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Fix race between sending responses to the guest frontend driver and guest



ChangeSet 1.1372.1.1, 2005/03/25 19:09:13+00:00, cl349@xxxxxxxxxxxxxxxxxxxx

        Fix race between sending responses to the guest frontend driver and 
guest
        adding new requests.
        Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>



 blktap.h         |    2 ++
 blktap_userdev.c |    5 ++---
 2 files changed, 4 insertions(+), 3 deletions(-)


diff -Nru a/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap.h 
b/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap.h
--- a/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap.h       2005-03-25 
18:03:17 -05:00
+++ b/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap.h       2005-03-25 
18:03:17 -05:00
@@ -30,6 +30,8 @@
 
 /* -------[ debug / pretty printing ]--------------------------------- */
 
+#define PRINTK(_f, _a...) printk(KERN_ALERT "(file=%s, line=%d) " _f, \
+                           __FILE__ , __LINE__ , ## _a )
 #if 0
 #define DPRINTK(_f, _a...) printk(KERN_ALERT "(file=%s, line=%d) " _f, \
                            __FILE__ , __LINE__ , ## _a )
diff -Nru a/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_userdev.c 
b/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_userdev.c
--- a/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_userdev.c       
2005-03-25 18:03:17 -05:00
+++ b/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_userdev.c       
2005-03-25 18:03:17 -05:00
@@ -299,7 +299,7 @@
     }
 
     if ( RING_FULL(&blktap_ufe_ring) ) {
-        DPRINTK("blktap: fe_ring is full, can't add.\n");
+        PRINTK("blktap: fe_ring is full, can't add.\n");
         return 0;
     }
 
@@ -383,10 +383,9 @@
             zap_page_range(blktap_vma, MMAP_VADDR(ID_TO_IDX(resp_s->id), 0), 
                     ar->nr_pages << PAGE_SHIFT, NULL);
             write_resp_to_fe_ring(blkif, resp_s);
+            blktap_ufe_ring.rsp_cons = i + 1;
             kick_fe_domain(blkif);
         }
-        
-        blktap_ufe_ring.rsp_cons = i;
     }
     return 0;
 }


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.