[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v7 36/47] nbd: Use CAF when looking for dirty bitmap
From: |
Max Reitz |
Subject: |
[PATCH v7 36/47] nbd: Use CAF when looking for dirty bitmap |
Date: |
Thu, 25 Jun 2020 17:22:04 +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 <mreitz@redhat.com>
---
nbd/server.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/nbd/server.c b/nbd/server.c
index 20754e9ebc..b504a79435 100644
--- a/nbd/server.c
+++ b/nbd/server.c
@@ -1561,13 +1561,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_filter_or_cow_bs(bs);
}
if (bm == NULL) {
--
2.26.2
- [PATCH v7 24/47] block: Use CAFs for debug breakpoints, (continued)
- [PATCH v7 24/47] block: Use CAFs for debug breakpoints, Max Reitz, 2020/06/25
- [PATCH v7 26/47] block: Improve get_allocated_file_size's default, Max Reitz, 2020/06/25
- [PATCH v7 28/47] block/null: Implement bdrv_get_allocated_file_size, Max Reitz, 2020/06/25
- [PATCH v7 31/47] block: Use child access functions for QAPI queries, Max Reitz, 2020/06/25
- [PATCH v7 32/47] block-copy: Use CAF to find sync=top base, Max Reitz, 2020/06/25
- [PATCH v7 33/47] mirror: Deal with filters, Max Reitz, 2020/06/25
- [PATCH v7 29/47] blockdev: Use CAF in external_snapshot_prepare(), Max Reitz, 2020/06/25
- [PATCH v7 27/47] blkverify: Use bdrv_sum_allocated_file_size(), Max Reitz, 2020/06/25
- [PATCH v7 30/47] block: Report data child for query-blockstats, Max Reitz, 2020/06/25
- [PATCH v7 34/47] backup: Deal with filters, Max Reitz, 2020/06/25
- [PATCH v7 36/47] nbd: Use CAF when looking for dirty bitmap,
Max Reitz <=
- [PATCH v7 37/47] qemu-img: Use child access functions, Max Reitz, 2020/06/25
- [PATCH v7 35/47] commit: Deal with filters, Max Reitz, 2020/06/25
- [PATCH v7 38/47] block: Drop backing_bs(), Max Reitz, 2020/06/25
- [PATCH v7 41/47] block: Leave BDS.backing_file constant, Max Reitz, 2020/06/25
- [PATCH v7 39/47] blockdev: Fix active commit choice, Max Reitz, 2020/06/25
- [PATCH v7 40/47] block: Inline bdrv_co_block_status_from_*(), Max Reitz, 2020/06/25
- [PATCH v7 43/47] iotests: Let complete_and_wait() work with commit, Max Reitz, 2020/06/25
- [PATCH v7 42/47] iotests: Test that qcow2's data-file is flushed, Max Reitz, 2020/06/25
- [PATCH v7 44/47] iotests: Add filter commit test cases, Max Reitz, 2020/06/25
- [PATCH v7 45/47] iotests: Add filter mirror test cases, Max Reitz, 2020/06/25