[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v6 29/42] nbd: Use CAF when looking for dirty bitmap
From: |
Max Reitz |
Subject: |
[Qemu-devel] [PATCH v6 29/42] nbd: Use CAF when looking for dirty bitmap |
Date: |
Fri, 9 Aug 2019 18:13:54 +0200 |
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 <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
---
nbd/server.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/nbd/server.c b/nbd/server.c
index fbd51b48a7..a1c73ce957 100644
--- a/nbd/server.c
+++ b/nbd/server.c
@@ -1511,13 +1511,13 @@ NBDExport *nbd_export_new(BlockDriverState *bs,
uint64_t dev_offset,
if (bitmap) {
BdrvDirtyBitmap *bm = NULL;
- while (true) {
+ while (bs) {
bm = bdrv_find_dirty_bitmap(bs, bitmap);
- if (bm != NULL || bs->backing == NULL) {
+ if (bm != NULL) {
break;
}
- bs = bs->backing->bs;
+ bs = bdrv_filtered_bs(bs);
}
if (bm == NULL) {
--
2.21.0
- [Qemu-devel] [PATCH v6 24/42] block: Use child access functions for QAPI queries, (continued)
- [Qemu-devel] [PATCH v6 27/42] commit: Deal with filters, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 28/42] stream: Deal with filters, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 29/42] nbd: Use CAF when looking for dirty bitmap,
Max Reitz <=
- [Qemu-devel] [PATCH v6 30/42] qemu-img: Use child access functions, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 31/42] block: Drop backing_bs(), Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 32/42] block: Make bdrv_get_cumulative_perm() public, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 33/42] blockdev: Fix active commit choice, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 38/42] iotests: Let complete_and_wait() work with commit, Max Reitz, 2019/08/09
- [Qemu-devel] [PATCH v6 34/42] block: Inline bdrv_co_block_status_from_*(), Max Reitz, 2019/08/09