On Wed, 12/17 15:53, John Snow wrote: > >+ aio_context = bdrv_get_aio_context(bs); > >+ aio_context_acquire(aio_context); > >+ > >+ target_bs = bdrv_find(target); > >+ if (!target_bs) { > >+ error_set(errp, QERR_DEVICE_NOT_FOUND, target); > >+ goto out; > >+ } > >+ > >+ bdrv_ref(target_bs); > >+ bdrv_set_aio_context(target_bs, bdrv_get_aio_context(bs)); > > why call bdrv_get_aio_context(bs) again instead of just using aio_context? > Will this cause issues?
Could be simply aio_context. [...] > >diff --git a/qmp-commands.hx b/qmp-commands.hx > >index 3348782..a7bb90b 100644 > >--- a/qmp-commands.hx > >+++ b/qmp-commands.hx > >@@ -1094,6 +1094,48 @@ Example: > > "sync": "full", > > "target": "backup.img" } } > > <- { "return": {} } > >+ > >+EQMP > >+ > >+ { > >+ .name = "blockdev-backup", > >+ .args_type = "sync:s,device:B,target:B,speed:i?," > >+ "on-source-error:s?,on-target-error:s?", > >+ .mhandler.cmd_new = qmp_marshal_input_blockdev_backup, > >+ }, > >+ > >+SQMP > >+blockdev-backup > >+------------ > > ^ Pad out the dashes to match the line length of the command. Mentioning > only because Eric got me on that one last time :) OK, thanks. Fam