aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>2012-05-17 03:15:31 +0900
committerKevin Wolf <kwolf@redhat.com>2012-05-25 18:12:54 +0200
commit622b6057beb3d8ce8035aaedab2137108bd6bfe4 (patch)
tree4fd0b2cf6a8c66539f8727f979e8305aa0568bfb
parentqemu-img: Explain how rebase operation can be used to perform a 'diff' operat... (diff)
downloadqemu-kvm-622b6057beb3d8ce8035aaedab2137108bd6bfe4.tar.gz
qemu-kvm-622b6057beb3d8ce8035aaedab2137108bd6bfe4.tar.bz2
qemu-kvm-622b6057beb3d8ce8035aaedab2137108bd6bfe4.zip
sheepdog: mark image as snapshot when tag is specified
When a snapshot tag is specified in the filename, the opened image is a snapshot. Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r--block/sheepdog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/sheepdog.c b/block/sheepdog.c
index e01d37168..776a1cc96 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -1103,7 +1103,7 @@ static int sd_open(BlockDriverState *bs, const char *filename, int flags)
}
}
- if (snapid) {
+ if (snapid || tag[0] != '\0') {
dprintf("%" PRIx32 " snapshot inode was open.\n", vid);
s->is_snapshot = 1;
}