[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 6/8] qcow2: add autoclear bit for dirty bitmaps
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH 6/8] qcow2: add autoclear bit for dirty bitmaps |
Date: |
Tue, 9 Jun 2015 16:49:18 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Mon, Jun 08, 2015 at 06:21:24PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> @@ -928,8 +936,9 @@ static int qcow2_open(BlockDriverState *bs, QDict
> *options, int flags,
> }
>
> /* Clear unknown autoclear feature bits */
> - if (!bs->read_only && !(flags & BDRV_O_INCOMING) &&
> s->autoclear_features) {
> - s->autoclear_features = 0;
> + if (!bs->read_only && !(flags & BDRV_O_INCOMING) &&
> + (s->autoclear_features & ~QCOW2_AUTOCLEAR_MASK)) {
> + s->autoclear_features |= QCOW2_AUTOCLEAR_MASK;
This should be bitwise-and instead of bitwise-or:
s->autoclear_features &= QCOW2_AUTOCLEAR_MASK
Otherwise we set features that happen to be in QCOW2_AUTOCLEAR_MASK but
were not enabled by the user. Right now that's not fatal but if other
features are added to QCOW2_AUTOCLEAR_MASK it could introduce a bug,
depending on the feature semantics.
pgpaGFOAcUgJv.pgp
Description: PGP signature
- Re: [Qemu-devel] [PATCH 1/8] spec: add qcow2-dirty-bitmaps specification, (continued)
Re: [Qemu-devel] [PATCH 1/8] spec: add qcow2-dirty-bitmaps specification, Kevin Wolf, 2015/06/10
[Qemu-devel] [PATCH 3/8] block: store persistent dirty bitmaps, Vladimir Sementsov-Ogievskiy, 2015/06/08
[Qemu-devel] [PATCH 6/8] qcow2: add autoclear bit for dirty bitmaps, Vladimir Sementsov-Ogievskiy, 2015/06/08
[Qemu-devel] [PATCH 7/8] qemu: command line option for dirty bitmaps, Vladimir Sementsov-Ogievskiy, 2015/06/08
[Qemu-devel] [PATCH 2/8] qcow2: add dirty-bitmaps feature, Vladimir Sementsov-Ogievskiy, 2015/06/08