c5d8c8
From ffb4085b3e04878e85bf505a541203aa2ee71e9c Mon Sep 17 00:00:00 2001
c5d8c8
From: l17zhou <cynthia.zhou@nokia-sbell.com>
c5d8c8
Date: Fri, 6 Mar 2020 03:54:02 +0200
c5d8c8
Subject: [PATCH 578/584] protocol/client: fallback to anonymous fd for fsync
c5d8c8
c5d8c8
> Upstream patch: https://review.gluster.org/#/c/glusterfs/+/24203/
c5d8c8
> Change-Id: I32f801206ce7fbd05aa693f44c2f140304f2e275
c5d8c8
> Fixes: bz#1810842
c5d8c8
c5d8c8
BUG: 1689375
c5d8c8
Change-Id: I32f801206ce7fbd05aa693f44c2f140304f2e275
c5d8c8
Signed-off-by: karthik-us <ksubrahm@redhat.com>
c5d8c8
Reviewed-on: https://code.engineering.redhat.com/gerrit/c/rhs-glusterfs/+/245538
c5d8c8
Tested-by: RHGS Build Bot <nigelb@redhat.com>
c5d8c8
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
c5d8c8
---
c5d8c8
 xlators/protocol/client/src/client-common.c | 6 ++++--
c5d8c8
 1 file changed, 4 insertions(+), 2 deletions(-)
c5d8c8
c5d8c8
diff --git a/xlators/protocol/client/src/client-common.c b/xlators/protocol/client/src/client-common.c
c5d8c8
index 64db98d..1417a60 100644
c5d8c8
--- a/xlators/protocol/client/src/client-common.c
c5d8c8
+++ b/xlators/protocol/client/src/client-common.c
c5d8c8
@@ -449,7 +449,8 @@ client_pre_fsync(xlator_t *this, gfs3_fsync_req *req, fd_t *fd, int32_t flags,
c5d8c8
     int64_t remote_fd = -1;
c5d8c8
     int op_errno = 0;
c5d8c8
 
c5d8c8
-    CLIENT_GET_REMOTE_FD(this, fd, DEFAULT_REMOTE_FD, remote_fd, op_errno, out);
c5d8c8
+    CLIENT_GET_REMOTE_FD(this, fd, FALLBACK_TO_ANON_FD, remote_fd, op_errno,
c5d8c8
+                         out);
c5d8c8
 
c5d8c8
     req->fd = remote_fd;
c5d8c8
     req->data = flags;
c5d8c8
@@ -2641,7 +2642,8 @@ client_pre_fsync_v2(xlator_t *this, gfx_fsync_req *req, fd_t *fd, int32_t flags,
c5d8c8
     int64_t remote_fd = -1;
c5d8c8
     int op_errno = 0;
c5d8c8
 
c5d8c8
-    CLIENT_GET_REMOTE_FD(this, fd, DEFAULT_REMOTE_FD, remote_fd, op_errno, out);
c5d8c8
+    CLIENT_GET_REMOTE_FD(this, fd, FALLBACK_TO_ANON_FD, remote_fd, op_errno,
c5d8c8
+                         out);
c5d8c8
 
c5d8c8
     req->fd = remote_fd;
c5d8c8
     req->data = flags;
c5d8c8
-- 
c5d8c8
1.8.3.1
c5d8c8