|
|
d1681e |
From 3c8ff0fceb008dca51cebfc9e808f6268548661a Mon Sep 17 00:00:00 2001
|
|
|
d1681e |
From: Ashish Pandey <aspandey@redhat.com>
|
|
|
d1681e |
Date: Wed, 25 Apr 2018 16:48:56 +0530
|
|
|
d1681e |
Subject: [PATCH 247/260] protocol/server : unwind as per op version
|
|
|
d1681e |
|
|
|
d1681e |
>Change-Id: Id6717640ac14881b490e512c4682e45ffffa7f5b
|
|
|
d1681e |
upstream patch -
|
|
|
d1681e |
https://review.gluster.org/#/c/19938/
|
|
|
d1681e |
|
|
|
d1681e |
Change-Id: I43034c2974108c434bd3e4c553ff416339ece870
|
|
|
d1681e |
BUG: 1558948
|
|
|
d1681e |
Signed-off-by: Ashish Pandey <aspandey@redhat.com>
|
|
|
d1681e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/137625
|
|
|
d1681e |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
d1681e |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
d1681e |
---
|
|
|
d1681e |
libglusterfs/src/client_t.h | 1 +
|
|
|
d1681e |
xlators/features/locks/src/posix.c | 8 +++++++-
|
|
|
d1681e |
xlators/protocol/server/src/server-handshake.c | 5 +++--
|
|
|
d1681e |
3 files changed, 11 insertions(+), 3 deletions(-)
|
|
|
d1681e |
|
|
|
d1681e |
diff --git a/libglusterfs/src/client_t.h b/libglusterfs/src/client_t.h
|
|
|
d1681e |
index 530c0a3..088508e 100644
|
|
|
d1681e |
--- a/libglusterfs/src/client_t.h
|
|
|
d1681e |
+++ b/libglusterfs/src/client_t.h
|
|
|
d1681e |
@@ -45,6 +45,7 @@ typedef struct _client {
|
|
|
d1681e |
char *subdir_mount;
|
|
|
d1681e |
inode_t *subdir_inode;
|
|
|
d1681e |
uuid_t subdir_gfid;
|
|
|
d1681e |
+ int32_t opversion;
|
|
|
d1681e |
} client_t;
|
|
|
d1681e |
|
|
|
d1681e |
#define GF_CLIENTCTX_INITIAL_SIZE 8
|
|
|
d1681e |
diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c
|
|
|
d1681e |
index a158227..ef4bebf 100644
|
|
|
d1681e |
--- a/xlators/features/locks/src/posix.c
|
|
|
d1681e |
+++ b/xlators/features/locks/src/posix.c
|
|
|
d1681e |
@@ -1563,7 +1563,13 @@ int
|
|
|
d1681e |
pl_flush_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
d1681e |
int32_t op_ret, int32_t op_errno, dict_t *xdata)
|
|
|
d1681e |
{
|
|
|
d1681e |
- PL_STACK_UNWIND (flush, xdata, frame, op_ret, op_errno, xdata);
|
|
|
d1681e |
+
|
|
|
d1681e |
+ if (frame->root->client &&
|
|
|
d1681e |
+ (frame->root->client->opversion < GD_OP_VERSION_3_12_0)) {
|
|
|
d1681e |
+ STACK_UNWIND_STRICT (flush, frame, op_ret, op_errno, xdata);
|
|
|
d1681e |
+ } else {
|
|
|
d1681e |
+ PL_STACK_UNWIND (flush, xdata, frame, op_ret, op_errno, xdata);
|
|
|
d1681e |
+ }
|
|
|
d1681e |
|
|
|
d1681e |
return 0;
|
|
|
d1681e |
}
|
|
|
d1681e |
diff --git a/xlators/protocol/server/src/server-handshake.c b/xlators/protocol/server/src/server-handshake.c
|
|
|
d1681e |
index fc63f2c..a59bcda 100644
|
|
|
d1681e |
--- a/xlators/protocol/server/src/server-handshake.c
|
|
|
d1681e |
+++ b/xlators/protocol/server/src/server-handshake.c
|
|
|
d1681e |
@@ -778,11 +778,12 @@ server_setvolume (rpcsvc_request_t *req)
|
|
|
d1681e |
}
|
|
|
d1681e |
|
|
|
d1681e |
ret = dict_get_uint32 (params, "opversion", &opversion);
|
|
|
d1681e |
- if (ret)
|
|
|
d1681e |
+ if (ret) {
|
|
|
d1681e |
gf_msg (this->name, GF_LOG_INFO, 0,
|
|
|
d1681e |
PS_MSG_CLIENT_OPVERSION_GET_FAILED,
|
|
|
d1681e |
"Failed to get client opversion");
|
|
|
d1681e |
-
|
|
|
d1681e |
+ }
|
|
|
d1681e |
+ client->opversion = opversion;
|
|
|
d1681e |
/* Assign op-version value to the client */
|
|
|
d1681e |
pthread_mutex_lock (&conf->mutex);
|
|
|
d1681e |
list_for_each_entry (xprt, &conf->xprt_list, list) {
|
|
|
d1681e |
--
|
|
|
d1681e |
1.8.3.1
|
|
|
d1681e |
|