mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
nbd: Use CAF when looking for dirty bitmap
When looking for a dirty bitmap to share, we should handle filters by just including them in the search (so they do not break backing chains). Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
9a71b9de3f
commit
ee2f94ca27
1 changed files with 3 additions and 3 deletions
|
@ -1567,13 +1567,13 @@ NBDExport *nbd_export_new(BlockDriverState *bs, uint64_t dev_offset,
|
||||||
if (bitmap) {
|
if (bitmap) {
|
||||||
BdrvDirtyBitmap *bm = NULL;
|
BdrvDirtyBitmap *bm = NULL;
|
||||||
|
|
||||||
while (true) {
|
while (bs) {
|
||||||
bm = bdrv_find_dirty_bitmap(bs, bitmap);
|
bm = bdrv_find_dirty_bitmap(bs, bitmap);
|
||||||
if (bm != NULL || bs->backing == NULL) {
|
if (bm != NULL) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
bs = bs->backing->bs;
|
bs = bdrv_filter_or_cow_bs(bs);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bm == NULL) {
|
if (bm == NULL) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue