On 1/8/19 10:14 PM, Eric Blake wrote: > Having to fire up qemu, then use QMP commands for nbd-server-start > and nbd-server-add, just to expose a persistent dirty bitmap, is > rather tedious. Make it possible to expose a dirty bitmap using > just qemu-nbd (of course, for now this only works when qemu-nbd is > visiting a BDS formatted as qcow2). > > For now, I play it safe and only allow a bitmap to be exposed on > a read-only image. We may relax it in the future. > > Signed-off-by: Eric Blake <ebl...@redhat.com> > --- > qemu-nbd.texi | 5 +++++ > qemu-nbd.c | 16 ++++++++++++++-- > 2 files changed, 19 insertions(+), 2 deletions(-) >
> @@ -1015,7 +1027,7 @@ int main(int argc, char **argv) > } > } > > - exp = nbd_export_new(bs, dev_offset, fd_size, export_name, NULL, NULL, > + exp = nbd_export_new(bs, dev_offset, fd_size, export_name, bitmap, NULL, > export_description, nbdflags, nbd_export_closed, > writethrough, NULL, &error_fatal); The cover letter DID warn that this was only lightly tested. For it to even work, you have to s/bitmap, NULL/NULL, bitmap/ or else swap the meaning of the --bitmap and --description command line options. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature