summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorPrasanna Kumar Kalever <prasanna.kalever@redhat.com>2017-01-27 23:28:59 +0530
committerPrasanna Kumar Kalever <prasanna.kalever@redhat.com>2017-01-30 19:31:50 +0530
commitf25b4e7326838c73d0a7a71bd64c8658e44f4219 (patch)
tree0be4325936644bfc7be6cec74761fc4beb305642 /rpc
parentaa861a01de2f89aec61dddeba13b929222143a52 (diff)
gluster-blockd: consider spare nodes to satisfy the multipath request
In case if number of block hosts are more than the multipath request, consider that spare nodes to satify the request. Lets say we need multipath of 3, but the admin provides 5 block-hosts. If any of the node fail to configure target from first three, then consider configuring fourth node to satify the HA request. Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Diffstat (limited to 'rpc')
-rw-r--r--rpc/block.h1
-rw-r--r--rpc/block.x1
-rw-r--r--rpc/block_xdr.c2
3 files changed, 4 insertions, 0 deletions
diff --git a/rpc/block.h b/rpc/block.h
index 98ec806..9c3ee9e 100644
--- a/rpc/block.h
+++ b/rpc/block.h
@@ -28,6 +28,7 @@ struct blockCreateCli {
char volume[255];
char volfileserver[255];
u_quad_t size;
+ u_int mpath;
char block_name[255];
char *block_hosts;
};
diff --git a/rpc/block.x b/rpc/block.x
index 21c30aa..a5dce19 100644
--- a/rpc/block.x
+++ b/rpc/block.x
@@ -10,6 +10,7 @@ struct blockCreateCli {
char volume[255];
char volfileserver[255];
u_quad_t size;
+ u_int mpath; /* HA request count */
char block_name[255];
string block_hosts<>;
};
diff --git a/rpc/block_xdr.c b/rpc/block_xdr.c
index 3bc0afc..8d05f3a 100644
--- a/rpc/block_xdr.c
+++ b/rpc/block_xdr.c
@@ -36,6 +36,8 @@ xdr_blockCreateCli (XDR *xdrs, blockCreateCli *objp)
return FALSE;
if (!xdr_u_quad_t (xdrs, &objp->size))
return FALSE;
+ if (!xdr_u_int (xdrs, &objp->mpath))
+ return FALSE;
if (!xdr_vector (xdrs, (char *)objp->block_name, 255,
sizeof (char), (xdrproc_t) xdr_char))
return FALSE;