diff options
-rw-r--r-- | block/nbd-client.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/block/nbd-client.c b/block/nbd-client.c index 76e9ca3abe..e6e27dafa6 100644 --- a/block/nbd-client.c +++ b/block/nbd-client.c @@ -992,6 +992,11 @@ int nbd_client_init(BlockDriverState *bs, logout("Failed to negotiate with the NBD server\n"); return ret; } + if (x_dirty_bitmap && !client->info.base_allocation) { + error_setg(errp, "requested x-dirty-bitmap %s not found", + x_dirty_bitmap); + return -EINVAL; + } if (client->info.flags & NBD_FLAG_READ_ONLY) { ret = bdrv_apply_auto_read_only(bs, "NBD export is read-only", errp); if (ret < 0) { |