]> git.proxmox.com Git - mirror_qemu.git/blobdiff - blockdev-nbd.c
fuse: Implement hole detection through lseek
[mirror_qemu.git] / blockdev-nbd.c
index cee9134b12ebf80d4f5223f47ca3896821baea00..d8443d235b7338949a4e6e10dec5a8cc88fa9f32 100644 (file)
@@ -209,8 +209,12 @@ void qmp_nbd_server_add(NbdServerAddOptions *arg, Error **errp)
         .has_writable           = arg->has_writable,
         .writable               = arg->writable,
     };
-    QAPI_CLONE_MEMBERS(BlockExportOptionsNbd, &export_opts->u.nbd,
+    QAPI_CLONE_MEMBERS(BlockExportOptionsNbdBase, &export_opts->u.nbd,
                        qapi_NbdServerAddOptions_base(arg));
+    if (arg->has_bitmap) {
+        export_opts->u.nbd.has_bitmaps = true;
+        QAPI_LIST_PREPEND(export_opts->u.nbd.bitmaps, g_strdup(arg->bitmap));
+    }
 
     /*
      * nbd-server-add doesn't complain when a read-only device should be