summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libglusterfs/src/client_t.h1
-rw-r--r--xlators/features/locks/src/posix.c8
-rw-r--r--xlators/protocol/server/src/server-handshake.c5
3 files changed, 11 insertions, 3 deletions
diff --git a/libglusterfs/src/client_t.h b/libglusterfs/src/client_t.h
index dff812b0602..66db3e86499 100644
--- a/libglusterfs/src/client_t.h
+++ b/libglusterfs/src/client_t.h
@@ -46,6 +46,7 @@ typedef struct _client {
char *subdir_mount;
inode_t *subdir_inode;
uuid_t subdir_gfid;
+ int32_t opversion;
} client_t;
#define GF_CLIENTCTX_INITIAL_SIZE 8
diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c
index 1e1d9e5ae30..57753dac588 100644
--- a/xlators/features/locks/src/posix.c
+++ b/xlators/features/locks/src/posix.c
@@ -1562,7 +1562,13 @@ int
pl_flush_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
- PL_STACK_UNWIND (flush, xdata, frame, op_ret, op_errno, xdata);
+
+ if (frame->root->client &&
+ (frame->root->client->opversion < GD_OP_VERSION_3_10_0)) {
+ STACK_UNWIND_STRICT (flush, frame, op_ret, op_errno, xdata);
+ } else {
+ PL_STACK_UNWIND (flush, xdata, frame, op_ret, op_errno, xdata);
+ }
return 0;
}
diff --git a/xlators/protocol/server/src/server-handshake.c b/xlators/protocol/server/src/server-handshake.c
index af63a0f15d9..ca167ce2dfa 100644
--- a/xlators/protocol/server/src/server-handshake.c
+++ b/xlators/protocol/server/src/server-handshake.c
@@ -747,11 +747,12 @@ server_setvolume (rpcsvc_request_t *req)
}
ret = dict_get_uint32 (params, "opversion", &opversion);
- if (ret)
+ if (ret) {
gf_msg (this->name, GF_LOG_INFO, 0,
PS_MSG_CLIENT_OPVERSION_GET_FAILED,
"Failed to get client opversion");
-
+ }
+ client->opversion = opversion;
/* Assign op-version value to the client */
pthread_mutex_lock (&conf->mutex);
list_for_each_entry (xprt, &conf->xprt_list, list) {