[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH v5 29/42] nbd: Use CAF when looking
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH v5 29/42] nbd: Use CAF when looking for dirty bitmap |
Date: |
Tue, 18 Jun 2019 09:48:52 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
On 6/12/19 5:09 PM, 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 <address@hidden>
> ---
> nbd/server.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Reviewed-by: Eric Blake <address@hidden>
>
> diff --git a/nbd/server.c b/nbd/server.c
> index aeca3893fe..0d51d46b81 100644
> --- a/nbd/server.c
> +++ b/nbd/server.c
> @@ -1508,13 +1508,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) {
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-block] [PATCH v5 25/42] mirror: Deal with filters, (continued)
- [Qemu-block] [PATCH v5 22/42] block: Use CAFs in bdrv_get_allocated_file_size(), Max Reitz, 2019/06/12
- [Qemu-block] [PATCH v5 26/42] backup: Deal with filters, Max Reitz, 2019/06/12
- [Qemu-block] [PATCH v5 27/42] commit: Deal with filters, Max Reitz, 2019/06/12
- [Qemu-block] [PATCH v5 29/42] nbd: Use CAF when looking for dirty bitmap, Max Reitz, 2019/06/12
- [Qemu-block] [PATCH v5 28/42] stream: Deal with filters, Max Reitz, 2019/06/12
- [Qemu-block] [PATCH v5 31/42] block: Drop backing_bs(), Max Reitz, 2019/06/12
- [Qemu-block] [PATCH v5 32/42] block: Make bdrv_get_cumulative_perm() public, Max Reitz, 2019/06/12
- [Qemu-block] [PATCH v5 33/42] blockdev: Fix active commit choice, Max Reitz, 2019/06/12
- [Qemu-block] [PATCH v5 30/42] qemu-img: Use child access functions, Max Reitz, 2019/06/12