Re: [Qemu-devel] [PATCH v5 4/7] block: Add checks of blocker in block operations

2013-11-27 Thread Fam Zheng
On 2013年11月27日 00:13, Paolo Bonzini wrote: Il 26/11/2013 05:05, Fam Zheng ha scritto: --- a/blockdev.c +++ b/blockdev.c @@ -1001,6 +1001,11 @@ SnapshotInfo *qmp_blockdev_snapshot_delete_internal_sync(const char *device, return NULL; } +if (bdrv_op_is_blocked(bs, BLOCK_OP_TY

Re: [Qemu-devel] [PATCH v5 4/7] block: Add checks of blocker in block operations

2013-11-26 Thread Paolo Bonzini
Il 26/11/2013 05:05, Fam Zheng ha scritto: > --- a/blockdev.c > +++ b/blockdev.c > @@ -1001,6 +1001,11 @@ SnapshotInfo > *qmp_blockdev_snapshot_delete_internal_sync(const char *device, > return NULL; > } > > +if (bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_INTERNAL_SNAPSHOT_DELETE, >

[Qemu-devel] [PATCH v5 4/7] block: Add checks of blocker in block operations

2013-11-25 Thread Fam Zheng
Before operate on a BlockDriverState, respective types are checked against bs->op_blockers and it will error out if there's a blocker. Signed-off-by: Fam Zheng --- blockdev.c | 17 + 1 file changed, 17 insertions(+) diff --git a/blockdev.c b/blockdev.c index 1efa806..cfb815f 100