The default cache mode has been changed from write-back to
write-through after merging in Oct 23. And this make the guest
boot slowly with qcow. This patch changes it to write-back again.
Best Regards
--yang
diff --git a/xenstore.c b/xenstore.c
index 6bfcdbb..7463cef 100644
--- a/xenstore.c
+++ b/xenstore.c
@@ -472,7 +472,7 @@ void xenstore_parse_domain_config(int hvm_domid)
#ifdef CONFIG_STUBDOM
if (pasprintf(&danger_buf, "%s/device/vbd/%s", danger_path,
e_danger[i]) == -1)
continue;
- if (bdrv_open2(bs, danger_buf, 0 /* snapshot */, &bdrv_vbd) == 0) {
+ if (bdrv_open2(bs, danger_buf, BDRV_O_CACHE_WB | BDRV_O_RDONLY/*
snapshot and write-back */, &bdrv_vbd) == 0) {
pstrcpy(bs->filename, sizeof(bs->filename), params);
} else
#endif
@@ -498,7 +498,7 @@ void xenstore_parse_domain_config(int hvm_domid)
}
}
pstrcpy(bs->filename, sizeof(bs->filename), params);
- if (bdrv_open2(bs, params, 0 /* snapshot */, format) < 0)
+ if (bdrv_open2(bs, params, BDRV_O_CACHE_WB | BDRV_O_RDONLY/*
snapshot and write-back */, format) < 0)
fprintf(stderr, "qemu: could not open vbd '%s' or hard disk
image '%s' (drv '%s' format '%s')\n", buf, params, drv ? drv : "?", format ?
format->format_name : "0");
}
--
1.6.0.rc1
0001--using-write-back-as-the-default-cache-mode.patch
Description: 0001--using-write-back-as-the-default-cache-mode.patch
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|