qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v7 36/47] nbd: Use CAF when looking for dirty bitmap


From: Andrey Shinkevich
Subject: Re: [PATCH v7 36/47] nbd: Use CAF when looking for dirty bitmap
Date: Thu, 23 Jul 2020 20:21:01 +0300
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.9.0

On 25.06.2020 18:22, Max Reitz wrote:
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) {


Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]