OSDN Git Service

qcow2: try load bitmaps only once
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Wed, 11 Apr 2018 12:26:05 +0000 (15:26 +0300)
committerMax Reitz <mreitz@redhat.com>
Mon, 16 Apr 2018 11:35:32 +0000 (13:35 +0200)
commit605bc8be4260d3440fdfd0079005e6d9c6fc1e44
treec90bcffe87710f3c00809a4cf9c6fb6a6613bec8
parentae2b1b4e1bb89ea949446597c8776255da0a79d3
qcow2: try load bitmaps only once

Checking reopen by existence of some bitmaps is wrong, as it may be
some other bitmaps, or on the other hand, user may remove bitmaps. This
criteria is bad. To simplify things and make behavior more predictable
let's just add a flag to remember, that we've already tried to load
bitmaps on open and do not want do it again.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-id: 20180411122606.367301-2-vsementsov@virtuozzo.com
[mreitz: Changed comment wording according to Eric Blake's suggestion]
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/qcow2.c
block/qcow2.h