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
|