diff mbox

[v17,01/14] block: Add BlockOpType enum

Message ID 1394436370-8908-2-git-send-email-famz@redhat.com
State New
Headers show

Commit Message

Fam Zheng March 10, 2014, 7:25 a.m. UTC
This adds the enum of all the operations that can be taken on a block
device.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
---
 include/block/block.h | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

Comments

Jeff Cody April 6, 2014, 11:47 p.m. UTC | #1
On Mon, Mar 10, 2014 at 03:25:57PM +0800, Fam Zheng wrote:
> This adds the enum of all the operations that can be taken on a block
> device.
> 
> Signed-off-by: Fam Zheng <famz@redhat.com>
> Reviewed-by: Benoit Canet <benoit@irqsave.net>
> ---
>  include/block/block.h | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/include/block/block.h b/include/block/block.h
> index 780f48b..8820735 100644
> --- a/include/block/block.h
> +++ b/include/block/block.h
> @@ -154,6 +154,25 @@ typedef struct BDRVReopenState {
>      void *opaque;
>  } BDRVReopenState;
>  
> +/*
> + * Block operation types
> + */
> +typedef enum BlockOpType {
> +    BLOCK_OP_TYPE_BACKUP_SOURCE,
> +    BLOCK_OP_TYPE_BACKUP_TARGET,
> +    BLOCK_OP_TYPE_CHANGE,
> +    BLOCK_OP_TYPE_COMMIT,
> +    BLOCK_OP_TYPE_DATAPLANE,
> +    BLOCK_OP_TYPE_DRIVE_DEL,
> +    BLOCK_OP_TYPE_EJECT,
> +    BLOCK_OP_TYPE_EXTERNAL_SNAPSHOT,
> +    BLOCK_OP_TYPE_INTERNAL_SNAPSHOT,
> +    BLOCK_OP_TYPE_INTERNAL_SNAPSHOT_DELETE,
> +    BLOCK_OP_TYPE_MIRROR,
> +    BLOCK_OP_TYPE_RESIZE,
> +    BLOCK_OP_TYPE_STREAM,
> +    BLOCK_OP_TYPE_MAX,
> +} BlockOpType;
>  
>  void bdrv_iostatus_enable(BlockDriverState *bs);
>  void bdrv_iostatus_reset(BlockDriverState *bs);
> -- 
> 1.9.0
> 
>

Reviewed-by: Jeff Cody <jcody@redhat.com>
diff mbox

Patch

diff --git a/include/block/block.h b/include/block/block.h
index 780f48b..8820735 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -154,6 +154,25 @@  typedef struct BDRVReopenState {
     void *opaque;
 } BDRVReopenState;
 
+/*
+ * Block operation types
+ */
+typedef enum BlockOpType {
+    BLOCK_OP_TYPE_BACKUP_SOURCE,
+    BLOCK_OP_TYPE_BACKUP_TARGET,
+    BLOCK_OP_TYPE_CHANGE,
+    BLOCK_OP_TYPE_COMMIT,
+    BLOCK_OP_TYPE_DATAPLANE,
+    BLOCK_OP_TYPE_DRIVE_DEL,
+    BLOCK_OP_TYPE_EJECT,
+    BLOCK_OP_TYPE_EXTERNAL_SNAPSHOT,
+    BLOCK_OP_TYPE_INTERNAL_SNAPSHOT,
+    BLOCK_OP_TYPE_INTERNAL_SNAPSHOT_DELETE,
+    BLOCK_OP_TYPE_MIRROR,
+    BLOCK_OP_TYPE_RESIZE,
+    BLOCK_OP_TYPE_STREAM,
+    BLOCK_OP_TYPE_MAX,
+} BlockOpType;
 
 void bdrv_iostatus_enable(BlockDriverState *bs);
 void bdrv_iostatus_reset(BlockDriverState *bs);