WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Merge arcadians.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Merge arcadians.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-unstable.bk
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Fri, 01 Apr 2005 16:50:40 +0000
Delivery-date: Fri, 01 Apr 2005 18:03:24 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1427, 2005/04/01 17:50:40+01:00, vh249@xxxxxxxxxxxxxxxxxxxxxx

        Merge arcadians.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-unstable.bk
        into arcadians.cl.cam.ac.uk:/local/scratch-2/vh249/xen-unstable.bk



 blkfront.c |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)


diff -Nru a/linux-2.6.11-xen-sparse/drivers/xen/blkfront/blkfront.c 
b/linux-2.6.11-xen-sparse/drivers/xen/blkfront/blkfront.c
--- a/linux-2.6.11-xen-sparse/drivers/xen/blkfront/blkfront.c   2005-04-01 
13:03:26 -05:00
+++ b/linux-2.6.11-xen-sparse/drivers/xen/blkfront/blkfront.c   2005-04-01 
13:03:26 -05:00
@@ -74,8 +74,10 @@
 
 static blkif_front_ring_t blk_ring;
 
+#define BLK_RING_SIZE __RING_SIZE((blkif_sring_t *)0, PAGE_SIZE)
+
 unsigned long rec_ring_free;
-blkif_request_t rec_ring[RING_SIZE(&blk_ring)];
+blkif_request_t rec_ring[BLK_RING_SIZE];
 
 static int recovery = 0;           /* "Recovery in progress" flag.  Protected
                                     * by the blkif_io_lock */
@@ -90,8 +92,7 @@
 {
     unsigned long free = rec_ring_free;
 
-    if ( free > RING_SIZE(&blk_ring) )
-        BUG();
+    BUG_ON(free > BLK_RING_SIZE);
 
     rec_ring_free = rec_ring[free].id;
 
@@ -521,8 +522,7 @@
 {
     /* We kick pending request queues if the ring is reasonably empty. */
     if ( (nr_pending != 0) && 
-         (RING_PENDING_REQUESTS(&blk_ring) < 
-          (RING_SIZE(&blk_ring) >> 1)) )
+         (RING_PENDING_REQUESTS(&blk_ring) < (BLK_RING_SIZE >> 1)) )
     {
         /* Attempt to drain the queue, but bail if the ring becomes full. */
         while ( (nr_pending != 0) && !RING_FULL(&blk_ring) )
@@ -1137,7 +1137,7 @@
     
     sring = (blkif_sring_t *)__get_free_page(GFP_KERNEL);
     SHARED_RING_INIT(sring);
-    FRONT_RING_INIT(&blk_ring, sring);
+    FRONT_RING_INIT(&blk_ring, sring, PAGE_SIZE);
     blkif_state  = BLKIF_STATE_DISCONNECTED;
     blkif_send_interface_connect();
 }
@@ -1157,7 +1157,7 @@
      * This will need to be fixed once we have barriers */
 
     /* Stage 1 : Find active and move to safety. */
-    for ( i = 0; i < RING_SIZE(&blk_ring); i++ )
+    for ( i = 0; i < BLK_RING_SIZE; i++ )
     {
         if ( rec_ring[i].id >= PAGE_OFFSET )
         {
@@ -1178,10 +1178,10 @@
     }
 
     /* Stage 3 : Set up free list. */
-    for ( ; i < RING_SIZE(&blk_ring); i++ )
+    for ( ; i < BLK_RING_SIZE; i++ )
         rec_ring[i].id = i+1;
     rec_ring_free = blk_ring.req_prod_pvt;
-    rec_ring[RING_SIZE(&blk_ring)-1].id = 0x0fffffff;
+    rec_ring[BLK_RING_SIZE-1].id = 0x0fffffff;
 
     /* blk_ring->req_prod will be set when we flush_requests().*/
     wmb();
@@ -1368,9 +1368,9 @@
     printk(KERN_INFO "xen_blk: Initialising virtual block device driver\n");
 
     rec_ring_free = 0;
-    for ( i = 0; i < RING_SIZE(&blk_ring); i++ )
+    for ( i = 0; i < BLK_RING_SIZE; i++ )
         rec_ring[i].id = i+1;
-    rec_ring[RING_SIZE(&blk_ring)-1].id = 0x0fffffff;
+    rec_ring[BLK_RING_SIZE-1].id = 0x0fffffff;
 
     (void)ctrl_if_register_receiver(CMSG_BLKIF_FE, blkif_ctrlif_rx,
                                     CALLBACK_IN_BLOCKING_CONTEXT);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog