[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC V2 02/10] quorum: Create BDRVQuorumState and BlkDriver
From: |
Benoît Canet |
Subject: |
[Qemu-devel] [RFC V2 02/10] quorum: Create BDRVQuorumState and BlkDriver and do init. |
Date: |
Tue, 7 Aug 2012 15:44:25 +0200 |
Signed-off-by: Benoit Canet <address@hidden>
---
block/quorum.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/block/quorum.c b/block/quorum.c
index 046b183..e0405b6 100644
--- a/block/quorum.c
+++ b/block/quorum.c
@@ -15,6 +15,10 @@
#include "block_int.h"
+typedef struct {
+ BlockDriverState * bs[3];
+} BDRVQuorumState;
+
typedef struct QuorumAIOCB QuorumAIOCB;
typedef struct QuorumSingleAIOCB {
@@ -42,3 +46,17 @@ struct QuorumAIOCB {
void (*vote)(QuorumAIOCB *acb);
int vote_ret;
};
+
+static BlockDriver bdrv_quorum = {
+ .format_name = "quorum",
+ .protocol_name = "quorum",
+
+ .instance_size = sizeof(BDRVQuorumState),
+};
+
+static void bdrv_quorum_init(void)
+{
+ bdrv_register(&bdrv_quorum);
+}
+
+block_init(bdrv_quorum_init);
--
1.7.9.5
- [Qemu-devel] [PATCH 00/10] Quorum disk image corruption resiliency, Benoît Canet, 2012/08/07
- [Qemu-devel] [RFC V2 02/10] quorum: Create BDRVQuorumState and BlkDriver and do init.,
Benoît Canet <=
- [Qemu-devel] [RFC V2 01/10] quorum: Create quorum .c, add QuorumSingleAIOCB and QuorumAIOCB., Benoît Canet, 2012/08/07
- [Qemu-devel] [RFC V2 03/10] quorum: Add quorum_open()., Benoît Canet, 2012/08/07
- Re: [Qemu-devel] [RFC V2 03/10] quorum: Add quorum_open()., Blue Swirl, 2012/08/07
- Re: [Qemu-devel] [RFC V2 03/10] quorum: Add quorum_open()., Eric Blake, 2012/08/07
- Re: [Qemu-devel] [RFC V2 03/10] quorum: Add quorum_open()., Benoît Canet, 2012/08/10
- Re: [Qemu-devel] [RFC V2 03/10] quorum: Add quorum_open()., Kevin Wolf, 2012/08/13
- Re: [Qemu-devel] [RFC V2 03/10] quorum: Add quorum_open()., Benoît Canet, 2012/08/14
- Re: [Qemu-devel] [RFC V2 03/10] quorum: Add quorum_open()., Kevin Wolf, 2012/08/15
Re: [Qemu-devel] [RFC V2 03/10] quorum: Add quorum_open()., Stefan Hajnoczi, 2012/08/08