[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 03/12] qorum: Create BDRVQorumState and BlkDriver and
From: |
Benoît Canet |
Subject: |
[Qemu-devel] [RFC 03/12] qorum: Create BDRVQorumState and BlkDriver and do init. |
Date: |
Thu, 2 Aug 2012 12:16:35 +0200 |
Signed-off-by: Benoit Canet <address@hidden>
---
block/qorum.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/block/qorum.c b/block/qorum.c
index 5b4f031..ea2a720 100644
--- a/block/qorum.c
+++ b/block/qorum.c
@@ -15,6 +15,10 @@
#include "block_int.h"
+typedef struct {
+ BlockDriverState * bs[3];
+} BDRVQorumState;
+
typedef struct QorumAIOCB QorumAIOCB;
typedef struct QorumSingleAIOCB {
@@ -43,3 +47,17 @@ struct QorumAIOCB {
void (*vote)(QorumAIOCB *acb);
int vote_ret;
};
+
+static BlockDriver bdrv_qorum = {
+ .format_name = "qorum",
+ .protocol_name = "qorum",
+
+ .instance_size = sizeof(BDRVQorumState),
+};
+
+static void bdrv_qorum_init(void)
+{
+ bdrv_register(&bdrv_qorum);
+}
+
+block_init(bdrv_qorum_init);
--
1.7.9.5
- [Qemu-devel] [RFC 00/12] Qorum disk image corruption resiliency, Benoît Canet, 2012/08/02
- [Qemu-devel] [RFC 04/12] qorum: Add qorum_open()., Benoît Canet, 2012/08/02
- [Qemu-devel] [RFC 01/12] qorum: Add GPL v2+ heade r file., Benoît Canet, 2012/08/02
- [Qemu-devel] [RFC 06/12] qorum: Add qorum_getlength()., Benoît Canet, 2012/08/02
- [Qemu-devel] [RFC 03/12] qorum: Create BDRVQorumState and BlkDriver and do init.,
Benoît Canet <=
- [Qemu-devel] [RFC 05/12] qorum: Add qorum_close()., Benoît Canet, 2012/08/02
- [Qemu-devel] [RFC 02/12] qorum: Add QorumSingleAIOCB and QorumAIOCB., Benoît Canet, 2012/08/02
- [Qemu-devel] [RFC 10/12] qorum: Add qorum_aio_readv., Benoît Canet, 2012/08/02
- [Qemu-devel] [RFC 07/12] qorum: Add qorum_aio_writev and its dependencies., Benoît Canet, 2012/08/02
- [Qemu-devel] [RFC 12/12] qorum: build feature into QEMU., Benoît Canet, 2012/08/02
- [Qemu-devel] [RFC 08/12] blkverify: Make blkverify_iovec_clone() and blkverify_iovec_compare() public, Benoît Canet, 2012/08/02
- [Qemu-devel] [RFC 09/12] qorum: Add qorum_co_flush()., Benoît Canet, 2012/08/02
- [Qemu-devel] [RFC 11/12] qorum: Add qorum mechanism., Benoît Canet, 2012/08/02
- Re: [Qemu-devel] [RFC 00/12] Qorum disk image corruption resiliency, Eric Blake, 2012/08/02