[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v6 03/15] block: Release dirty bitmaps in bdrv_c
Re: [Qemu-block] [PATCH v6 03/15] block: Release dirty bitmaps in bdrv_close()
Mon, 9 Nov 2015 17:04:26 +0100
Am 04.11.2015 um 19:57 hat Max Reitz geschrieben:
> bdrv_delete() is not very happy about deleting BlockDriverStates with
> dirty bitmaps still attached to them. In the past, we got around that
> very easily by relying on bdrv_close_all() bypassing bdrv_delete(), and
> bdrv_close() simply ignoring that condition. We should fix that by
> releasing all dirty bitmaps in bdrv_close()
This doesn't sound right. If there was a dirty bitmap, there must be a
user associated with it. Now that we simply free the bitmap, that user
has a dangling pointer.
An exception would be if we knew that the only "user" of this bitmap is
the monitor because the monitor doesn't actually maintain its own list
of bitmaps. However, it's doubtful whether bdrv_close() should remove
something that the QMP client added explicitly.
> and drop the assertion in bdrv_delete().
Why? It should still hold true.
[Qemu-block] [PATCH v6 05/15] iotests: Make redirecting qemu's stderr optional, Max Reitz, 2015/11/04
[Qemu-block] [PATCH v6 06/15] iotests: Add test for eject under NBD server, Max Reitz, 2015/11/04
[Qemu-block] [PATCH v6 07/15] block: Move BDS close notifiers into BB, Max Reitz, 2015/11/04