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] Fix a bug with snapshots that was introduced with the cr

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix a bug with snapshots that was introduced with the crc code.
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Thu, 09 Jun 2005 14:07:02 +0000
Delivery-date: Thu, 09 Jun 2005 16:01:42 +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@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1699, 2005/06/09 15:07:02+01:00, akw27@xxxxxxxxxxxxxxxxxxxxxx

        Fix a bug with snapshots that was introduced with the crc code.



 Makefile         |    2 +-
 requests-async.c |   12 ++++++++++--
 vdi.c            |   23 +----------------------
 3 files changed, 12 insertions(+), 25 deletions(-)


diff -Nru a/tools/blktap/Makefile b/tools/blktap/Makefile
--- a/tools/blktap/Makefile     2005-06-09 12:02:41 -04:00
+++ b/tools/blktap/Makefile     2005-06-09 12:02:41 -04:00
@@ -80,7 +80,7 @@
        $(INSTALL_PROG) $(IBINS) $(DESTDIR)/$(BLKTAP_INSTALL_DIR)
 
 clean:
-       rm -rf *.a *.so *.o *.rpm $(LIB) *~ $(DEPS) xen TAGS blkdump 
$(VDI_TOOLS) parallax
+       rm -rf *.a *.so *.o *.rpm $(LIB) *~ $(DEPS) xen TAGS blkdump 
$(VDI_TOOLS) parallax vdi_unittest
 
 rpm: all
        rm -rf staging
diff -Nru a/tools/blktap/requests-async.c b/tools/blktap/requests-async.c
--- a/tools/blktap/requests-async.c     2005-06-09 12:02:41 -04:00
+++ b/tools/blktap/requests-async.c     2005-06-09 12:02:41 -04:00
@@ -51,6 +51,14 @@
 void clear_w_bits(radix_tree_node node) 
 {
     int i;
+    for (i=0; i<RADIX_TREE_MAP_ENTRIES; i++)
+        node[i] = node[i] & ONEMASK;
+    return;
+}
+
+void clear_L3_w_bits(radix_tree_node node) 
+{
+    int i;
     for (i=0; i<RADIX_TREE_MAP_ENTRIES; i+=2)
         node[i] = node[i] & ONEMASK;
     return;
@@ -513,7 +521,7 @@
     
        DPRINTF("READ_L3_L2f\n");
         node = (radix_tree_node) IO_BLOCK(r);
-        clear_w_bits(node);
+        clear_L3_w_bits(node);
         if (node == NULL) goto fail;
         a    = node[L2_IDX(req->vaddr)];
         addr = getid(a);
@@ -613,7 +621,7 @@
     
        DPRINTF("READ_L3_L1f\n");
         node = (radix_tree_node) IO_BLOCK(r);
-        clear_w_bits(node);
+        clear_L3_w_bits(node);
         if (node == NULL) goto fail;
         a    = node[L2_IDX(req->vaddr)];
         addr = getid(a);
diff -Nru a/tools/blktap/vdi.c b/tools/blktap/vdi.c
--- a/tools/blktap/vdi.c        2005-06-09 12:02:41 -04:00
+++ b/tools/blktap/vdi.c        2005-06-09 12:02:41 -04:00
@@ -14,6 +14,7 @@
 #include <pthread.h>
 #include "blockstore.h"
 #include "block-async.h"
+#include "requests-async.h"
 #include "radix.h"
 #include "vdi.h"
                     
@@ -159,28 +160,6 @@
 {
     free(vdi->radix_lock);
     freeblock(vdi);
-}
-
-u64 vdi_lookup_block(vdi_t *vdi, u64 vdi_block, int *writable)
-{
-    u64 gblock;
-    
-    gblock = lookup(VDI_HEIGHT, vdi->radix_root, vdi_block);
-    
-    if (writable != NULL) *writable = iswritable(gblock);
-
-    return getid(gblock);
-}
-
-void vdi_update_block(vdi_t *vdi, u64 vdi_block, u64 g_block)
-{
-    u64 id;
-    
-    /* updates are always writable. */
-    id = writable(g_block);
-    
-    vdi->radix_root = update(VDI_HEIGHT, vdi->radix_root, vdi_block, id);
-    writeblock(vdi->block, vdi);
 }
 
 void vdi_snapshot(vdi_t *vdi)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix a bug with snapshots that was introduced with the crc code., BitKeeper Bot <=