Re: [Qemu-devel] [PATCH v13 02/14] block: Introduce op_blockers to BlockDriverState

2014-02-17 Thread Fam Zheng
On Thu, 02/13 13:37, Benoît Canet wrote: > The Wednesday 29 Jan 2014 à 13:07:29 (+0800), Fam Zheng wrote : > > diff --git a/include/block/block_int.h b/include/block/block_int.h > > index 0bcf1c9..4e558d0 100644 > > --- a/include/block/block_int.h > > +++ b/include/block/block_int.h > > @@ -270,6 +

Re: [Qemu-devel] [PATCH v13 02/14] block: Introduce op_blockers to BlockDriverState

2014-02-17 Thread Fam Zheng
On Thu, 02/13 13:24, Benoît Canet wrote: > The Wednesday 29 Jan 2014 à 13:07:29 (+0800), Fam Zheng wrote : > > +bool bdrv_op_is_blocked(BlockDriverState *bs, BlockOpType op, Error **errp) > > +{ > > +BdrvOpBlocker *blocker; > > +assert((int) op >= 0 && op < BLOCK_OP_TYPE_MAX); > > +if (

Re: [Qemu-devel] [PATCH v13 02/14] block: Introduce op_blockers to BlockDriverState

2014-02-13 Thread Benoît Canet
The Wednesday 29 Jan 2014 à 13:07:29 (+0800), Fam Zheng wrote : > BlockDriverState.op_blockers is an array of lists with BLOCK_OP_TYPE_MAX > elements. Each list is a list of blockers of an operation type > (BlockOpType), that marks this BDS as currently blocked for a certain > type of operation wit

Re: [Qemu-devel] [PATCH v13 02/14] block: Introduce op_blockers to BlockDriverState

2014-02-13 Thread Benoît Canet
The Wednesday 29 Jan 2014 à 13:07:29 (+0800), Fam Zheng wrote : > BlockDriverState.op_blockers is an array of lists with BLOCK_OP_TYPE_MAX > elements. Each list is a list of blockers of an operation type > (BlockOpType), that marks this BDS as currently blocked for a certain > type of operation wit

[Qemu-devel] [PATCH v13 02/14] block: Introduce op_blockers to BlockDriverState

2014-01-28 Thread Fam Zheng
BlockDriverState.op_blockers is an array of lists with BLOCK_OP_TYPE_MAX elements. Each list is a list of blockers of an operation type (BlockOpType), that marks this BDS as currently blocked for a certain type of operation with reason errors stored in the list. The rule of usage is: * BDS user w