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>
This commit is contained in:
MORITA Kazutaka 2012-05-17 03:15:31 +09:00 committed by Kevin Wolf
parent 9fda6ab1d9
commit 622b6057be

View 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;
}