Re: [Qemu-devel] [PATCH v2 10/11] blockdev: Block device IO during blockdev-backup transaction

2015-05-13 Thread Fam Zheng
On Thu, 05/14 09:12, Wen Congyang wrote: > We will use bdrv_op_block_all() in the job, and don't unblock > BLOCK_OP_TYPE_DEVICE_IO. > Is it OK? Good question and you're right, it's broken in this series. I will fix it. Fam

Re: [Qemu-devel] [PATCH v2 10/11] blockdev: Block device IO during blockdev-backup transaction

2015-05-13 Thread Wen Congyang
On 05/13/2015 08:55 PM, Fam Zheng wrote: > On Wed, 05/13 19:22, Wen Congyang wrote: >> On 05/14/2015 01:28 AM, Fam Zheng wrote: >>> Signed-off-by: Fam Zheng >>> --- >>> blockdev.c | 10 +- >>> 1 file changed, 9 insertions(+), 1 deletion(-) >>> >>> diff --git a/blockdev.c b/blockdev.c >>>

Re: [Qemu-devel] [PATCH v2 10/11] blockdev: Block device IO during blockdev-backup transaction

2015-05-13 Thread Fam Zheng
On Wed, 05/13 17:08, Paolo Bonzini wrote: > On 13/05/2015 16:55, Fam Zheng wrote: > > In your idea, who will block PAUSE, and why? > > For example, blockdev-backup/drive-backup can block PAUSE on the target. > But maybe they only need to add an op blocker notifier, and use it to > block device I/

Re: [Qemu-devel] [PATCH v2 10/11] blockdev: Block device IO during blockdev-backup transaction

2015-05-13 Thread Paolo Bonzini
On 13/05/2015 16:55, Fam Zheng wrote: > > So if we consider this idea worthwhile, and decide that pausing device > > I/O on the target should pause the block job, the backup job actually > > has to prevent *adding a DEVICE_IO blocker* on the target. > > When do we need to pause device IO on the ta

Re: [Qemu-devel] [PATCH v2 10/11] blockdev: Block device IO during blockdev-backup transaction

2015-05-13 Thread Fam Zheng
On Wed, 05/13 19:22, Wen Congyang wrote: > On 05/14/2015 01:28 AM, Fam Zheng wrote: > > Signed-off-by: Fam Zheng > > --- > > blockdev.c | 10 +- > > 1 file changed, 9 insertions(+), 1 deletion(-) > > > > diff --git a/blockdev.c b/blockdev.c > > index ae52d27..bd28183 100644 > > --- a/blo

Re: [Qemu-devel] [PATCH v2 10/11] blockdev: Block device IO during blockdev-backup transaction

2015-05-13 Thread Paolo Bonzini
On 13/05/2015 19:28, Fam Zheng wrote: > +state->bs = bs; > +error_setg(&state->blocker, "blockdev-backup in progress"); > +bdrv_op_block(bs, BLOCK_OP_TYPE_DEVICE_IO, state->blocker); > + > qmp_blockdev_backup(backup->device, backup->target, > backup->sync

Re: [Qemu-devel] [PATCH v2 10/11] blockdev: Block device IO during blockdev-backup transaction

2015-05-13 Thread Wen Congyang
On 05/14/2015 01:28 AM, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > blockdev.c | 10 +- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/blockdev.c b/blockdev.c > index ae52d27..bd28183 100644 > --- a/blockdev.c > +++ b/blockdev.c > @@ -1649,6 +1649,7 @@ typedef

[Qemu-devel] [PATCH v2 10/11] blockdev: Block device IO during blockdev-backup transaction

2015-05-13 Thread Fam Zheng
Signed-off-by: Fam Zheng --- blockdev.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index ae52d27..bd28183 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1649,6 +1649,7 @@ typedef struct BlockdevBackupState { BlockDriverState *bs;