diff options
author | MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> | 2012-05-17 03:15:31 +0900 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-05-25 18:12:54 +0200 |
commit | 622b6057beb3d8ce8035aaedab2137108bd6bfe4 (patch) | |
tree | 4fd0b2cf6a8c66539f8727f979e8305aa0568bfb | |
parent | 9fda6ab1d9f33c04f35438bce101427dd557fef6 (diff) |
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>
-rw-r--r-- | block/sheepdog.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/sheepdog.c b/block/sheepdog.c index e01d371680..776a1cc969 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; } |