• E
    nbd/client: Make x-dirty-bitmap more reliable · 47829c40
    Eric Blake 提交于
    The implementation of x-dirty-bitmap in qemu 3.0 (commit 216ee365)
    silently falls back to treating the server as not supporting
    NBD_CMD_BLOCK_STATUS if a requested meta_context name was not
    negotiated, which in turn means treating the _entire_ image as
    data. Since our hack relied on using 'qemu-img map' to view
    which portions of the image were dirty by seeing what the
    redirected bdrv_block_status() treats as holes, this means
    that our fallback treats the entire image as clean.  Better
    would have been to treat the entire image as dirty, or to fail
    to connect because the user's request for a specific context
    could not be honored. This patch goes with the latter.
    Signed-off-by: NEric Blake <eblake@redhat.com>
    Message-Id: <20181130023232.3079982-3-eblake@redhat.com>
    Reviewed-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
    47829c40
nbd-client.c 30.6 KB