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