On 01/09/2013 08:07 PM, Liu Yuan wrote: > $ qemu-system-x86_64 --enable-kvm -drive > file=~/images/test1,if=virtio,cache=writeback -smp 2 -cpu host -m 1024 > -drive file=sheepdog:test,if=virtio,cache=writeback
To emulate old impl, I modified the sheepdog block driver as following: diff --git a/block/sheepdog.c b/block/sheepdog.c index e821746..321a426 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -1118,6 +1118,7 @@ static int sd_open(BlockDriverState *bs, const char *filename, int flags) goto out; } + if (0) { s->cache_enabled = true; s->flush_fd = connect_to_sdog(s->addr, s->port); if (s->flush_fd < 0) { @@ -1125,6 +1126,7 @@ static int sd_open(BlockDriverState *bs, const char *filename, int flags) ret = s->flush_fd; goto out; } + } if (snapid || tag[0] != '\0') { dprintf("%" PRIx32 " snapshot inode was open.\n", vid);