From 622b6057beb3d8ce8035aaedab2137108bd6bfe4 Mon Sep 17 00:00:00 2001 From: MORITA Kazutaka Date: Thu, 17 May 2012 03:15:31 +0900 Subject: [PATCH] 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 --- block/sheepdog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.7.4