From: MORITA Kazutaka Date: Wed, 16 May 2012 18:15:31 +0000 (+0900) Subject: sheepdog: mark image as snapshot when tag is specified X-Git-Tag: v1.1.0-rc4~13^2~7 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=622b6057beb3d8ce8035aaedab2137108bd6bfe4;p=qemu.git 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 Signed-off-by: Kevin Wolf --- 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; }