summaryrefslogtreecommitdiffstats
path: root/rpc/xdr/src/glusterd1-xdr.x
diff options
context:
space:
mode:
authorAvra Sengupta <asengupt@redhat.com>2013-09-14 22:46:41 +0530
committerAvra Sengupta <asengupt@redhat.com>2013-10-10 12:43:47 +0530
commite08538a69c42722b0ed9e1c013b06db278c2f263 (patch)
treeab5ef5747705d2bb87a3c53624bcd477a711fee5 /rpc/xdr/src/glusterd1-xdr.x
parentf749fdc1e4631b3cc19b18988ed0fa8afa68a8a4 (diff)
glusterd: Volume locks and transaction specific opinfosmaster_upstream
With this patch we are replacing the existing cluster-wide lock taken on glusterds across the cluster, with volume locks which are also taken on glusterds across the cluster, but are volume specific. So with the volume locks we are able to perform more than one gluster operation at the same time, as long as the operations are being performed on different volumes. We maintain a global list of volume-locks (using a dict for a list) where the key is the volume name, and which saves the uuid of the originator glusterd. These locks are held and released per volume transaction. In order to acheive multiple gluster operations occuring at the same time, we also separate opinfos in the op-state-machine, as a part of this patch. To do so, we generate a unique transaction-id (uuid) per gluster transaction. An opinfo is then associated with this transaction id, which is used throughout the transaction. We maintain a run-time global list(using a dict) of transaction-ids, and their respective opinfos to achieve this. Change-Id: Iaad505a854bac8de8f83beec0357eb6cde3f7ea8 Upstream Review Url: http://review.gluster.org/5994/ BUG: 1011470 Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Diffstat (limited to 'rpc/xdr/src/glusterd1-xdr.x')
-rw-r--r--rpc/xdr/src/glusterd1-xdr.x29
1 files changed, 29 insertions, 0 deletions
diff --git a/rpc/xdr/src/glusterd1-xdr.x b/rpc/xdr/src/glusterd1-xdr.x
index fc1bb58b4..f29a9d214 100644
--- a/rpc/xdr/src/glusterd1-xdr.x
+++ b/rpc/xdr/src/glusterd1-xdr.x
@@ -125,3 +125,32 @@ struct gd1_mgmt_brick_op_rsp {
opaque output<>;
string op_errstr<>;
} ;
+
+struct gd1_mgmt_volume_lock_req {
+ unsigned char uuid[16];
+ unsigned char txn_id[16];
+ int op;
+ opaque dict<>;
+} ;
+
+struct gd1_mgmt_volume_lock_rsp {
+ unsigned char uuid[16];
+ unsigned char txn_id[16];
+ opaque dict<>;
+ int op_ret;
+ int op_errno;
+} ;
+
+struct gd1_mgmt_volume_unlock_req {
+ unsigned char uuid[16];
+ unsigned char txn_id[16];
+ opaque dict<>;
+} ;
+
+struct gd1_mgmt_volume_unlock_rsp {
+ unsigned char uuid[16];
+ unsigned char txn_id[16];
+ opaque dict<>;
+ int op_ret;
+ int op_errno;
+} ;