|
|
d1681e |
From fbc5dae0c743d97d3f753f1c6a9635db6feba137 Mon Sep 17 00:00:00 2001
|
|
|
d1681e |
From: Pranith Kumar K <pkarampu@redhat.com>
|
|
|
d1681e |
Date: Mon, 27 Nov 2017 09:50:32 +0530
|
|
|
d1681e |
Subject: [PATCH 236/236] cluster-syncop: Address comments in
|
|
|
d1681e |
3ad68df725ac32f83b5ea7c0976e2327e7037c8c
|
|
|
d1681e |
|
|
|
d1681e |
Upstream-patch: https://review.gluster.org/18857
|
|
|
d1681e |
BUG: 1562744
|
|
|
d1681e |
Change-Id: I325f718c6c440076c9d9dcd5ad1a0c6bde5393b1
|
|
|
d1681e |
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
|
|
|
d1681e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/134279
|
|
|
d1681e |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
d1681e |
Reviewed-by: Ashish Pandey <aspandey@redhat.com>
|
|
|
d1681e |
---
|
|
|
d1681e |
libglusterfs/src/cluster-syncop.c | 6 ++++--
|
|
|
d1681e |
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
d1681e |
|
|
|
d1681e |
diff --git a/libglusterfs/src/cluster-syncop.c b/libglusterfs/src/cluster-syncop.c
|
|
|
d1681e |
index 75ba640..50542eb 100644
|
|
|
d1681e |
--- a/libglusterfs/src/cluster-syncop.c
|
|
|
d1681e |
+++ b/libglusterfs/src/cluster-syncop.c
|
|
|
d1681e |
@@ -1220,6 +1220,10 @@ cluster_tiebreaker_inodelk (xlator_t **subvols, unsigned char *on,
|
|
|
d1681e |
num_success++;
|
|
|
d1681e |
continue;
|
|
|
d1681e |
}
|
|
|
d1681e |
+
|
|
|
d1681e |
+ /* TODO: If earlier subvols fail with an error other
|
|
|
d1681e |
+ * than EAGAIN, we could still have 2 clients competing
|
|
|
d1681e |
+ * for the lock*/
|
|
|
d1681e |
if (replies[i].op_ret == -1 && replies[i].op_errno == EAGAIN) {
|
|
|
d1681e |
cluster_fop_success_fill (replies, numsubvols,
|
|
|
d1681e |
locked_on);
|
|
|
d1681e |
@@ -1231,8 +1235,6 @@ cluster_tiebreaker_inodelk (xlator_t **subvols, unsigned char *on,
|
|
|
d1681e |
FOP_SEQ (subvols, on, numsubvols, replies,
|
|
|
d1681e |
locked_on, frame, inodelk, dom, &loc,
|
|
|
d1681e |
F_SETLKW, &flock, NULL);
|
|
|
d1681e |
- } else {
|
|
|
d1681e |
- memset (locked_on, 0, numsubvols);
|
|
|
d1681e |
}
|
|
|
d1681e |
break;
|
|
|
d1681e |
}
|
|
|
d1681e |
--
|
|
|
d1681e |
1.8.3.1
|
|
|
d1681e |
|