path: root/rpc/rpc-lib
diff options
authorAvra Sengupta <>2014-02-06 13:03:58 +0530
committerVijay Bellur <>2014-02-10 23:25:40 -0800
commit97ce783de326b51fcba65737f07db2c314d1e218 (patch)
tree70ee9d9c1a4abd4c28a236920121d1bfbc56912b /rpc/rpc-lib
parentb000b934aff4b452cf1c35c42272482a7738506e (diff)
glusterd: Volume locks and transaction specific opinfos
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. Upstream Feature Page: Change-Id: Iaad505a854bac8de8f83beec0357eb6cde3f7ea8 BUG: 1011470 Signed-off-by: Avra Sengupta <> Reviewed-on: Tested-by: Gluster Build System <> Reviewed-by: Vijay Bellur <>
Diffstat (limited to 'rpc/rpc-lib')
1 files changed, 10 insertions, 0 deletions
diff --git a/rpc/rpc-lib/src/protocol-common.h b/rpc/rpc-lib/src/protocol-common.h
index 5876a500bdf..6d28ed90ed5 100644
--- a/rpc/rpc-lib/src/protocol-common.h
+++ b/rpc/rpc-lib/src/protocol-common.h
@@ -236,6 +236,13 @@ struct gf_gsync_detailed_status_ {
char total_files_skipped[NAME_MAX];
+enum glusterd_mgmt_v3_procnum {
typedef struct gf_gsync_detailed_status_ gf_gsync_status_t;
#define GLUSTER_HNDSK_PROGRAM 14398633 /* Completely random */
@@ -268,6 +275,9 @@ typedef struct gf_gsync_detailed_status_ gf_gsync_status_t;
#define GD_BRICK_PROGRAM 4867634 /*Completely random*/
+/* Third version */
+#define GD_MGMT_V3_VERSION 3
/* OP-VERSION handshake */
#define GD_MGMT_HNDSK_PROGRAM 1239873 /* Completely random */