aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorLiu Yuan <namei.unix@gmail.com>2013-06-08 01:54:25 +0800
committerKevin Wolf <kwolf@redhat.com>2013-06-17 17:47:58 +0200
commitb579ffb3fd64243b64ac5aaf659ac88518f17835 (patch)
tree3f49110959961abc13902887163414efc3fab62c /block
parent38aea177d93556aada7c4c7aa530f0050715e293 (diff)
sheepdog: fix snapshot tag initialization
This is an old and obvious bug. We should pass snapshot_id to the tag. Or simple command like 'qemu-img snapshot -a tag sheepdog:image' will fail Cc: qemu-devel@nongnu.org Cc: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> Cc: Kevin Wolf <kwolf@redhat.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Liu Yuan <namei.unix@gmail.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/sheepdog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/sheepdog.c b/block/sheepdog.c
index 21a4edf15b..94218ac937 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -2063,7 +2063,7 @@ static int sd_snapshot_goto(BlockDriverState *bs, const char *snapshot_id)
if (snapid) {
tag[0] = 0;
} else {
- pstrcpy(tag, sizeof(tag), s->name);
+ pstrcpy(tag, sizeof(tag), snapshot_id);
}
ret = reload_inode(s, snapid, tag);