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