aboutsummaryrefslogtreecommitdiff
path: root/block
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 /block
parent9fda6ab1d9f33c04f35438bce101427dd557fef6 (diff)
downloadqemu-622b6057beb3d8ce8035aaedab2137108bd6bfe4.zip
qemu-622b6057beb3d8ce8035aaedab2137108bd6bfe4.tar.gz
qemu-622b6057beb3d8ce8035aaedab2137108bd6bfe4.tar.bz2
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>
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 e01d371..776a1cc 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;
}