]> git.proxmox.com Git - qemu.git/commitdiff
sheepdog: mark image as snapshot when tag is specified
authorMORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Wed, 16 May 2012 18:15:31 +0000 (03:15 +0900)
committerKevin Wolf <kwolf@redhat.com>
Fri, 25 May 2012 16:12:54 +0000 (18:12 +0200)
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>
block/sheepdog.c

index e01d37168029fa45eb9822ab21c8a0dda97a2931..776a1cc9693e3f9d9291176e9e7761ae640b0c59 100644 (file)
@@ -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;
     }