Re: [Qemu-devel] [PATCH v5 2/4] qmp: Add command 'blockdev-backup'

2014-12-18 Thread Fam Zheng
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; > >+} > >+ > >+

Re: [Qemu-devel] [PATCH v5 2/4] qmp: Add command 'blockdev-backup'

2014-12-17 Thread John Snow
On 12/17/2014 07:51 AM, Fam Zheng wrote: Similar to drive-backup, but this command uses a device id as target instead of creating/opening an image file. Also add blocker on target bs, since the target is also a named device now. Add check and report error for bs == target which became possibl

[Qemu-devel] [PATCH v5 2/4] qmp: Add command 'blockdev-backup'

2014-12-17 Thread Fam Zheng
Similar to drive-backup, but this command uses a device id as target instead of creating/opening an image file. Also add blocker on target bs, since the target is also a named device now. Add check and report error for bs == target which became possible but is an illegal case with introduction of