|
|
a3470f |
From b777482ac36960537be213c54490aec9e1077a1f Mon Sep 17 00:00:00 2001
|
|
|
a3470f |
From: Raghavendra G <rgowdapp@redhat.com>
|
|
|
a3470f |
Date: Fri, 13 Oct 2017 20:00:47 +0530
|
|
|
a3470f |
Subject: [PATCH 109/128] mount/fuse: never fail open(dir) with ENOENT
|
|
|
a3470f |
|
|
|
a3470f |
open(dir) being an operation on inode should never fail with
|
|
|
a3470f |
ENOENT. If gfid is not present, the appropriate error is ESTALE. This
|
|
|
a3470f |
will enable kernel to retry open after a revalidate lookup.
|
|
|
a3470f |
|
|
|
a3470f |
Change-Id: I8d07d2ebb5a0da6c3ea478317442cb42f1797a4b
|
|
|
a3470f |
BUG: 1492591
|
|
|
a3470f |
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
|
|
|
a3470f |
upstream patch: https://review.gluster.org/#/c/18521/
|
|
|
a3470f |
Reviewed-on: https://code.engineering.redhat.com/gerrit/126510
|
|
|
a3470f |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
a3470f |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
a3470f |
---
|
|
|
a3470f |
xlators/mount/fuse/src/fuse-bridge.c | 7 +++++++
|
|
|
a3470f |
1 file changed, 7 insertions(+)
|
|
|
a3470f |
|
|
|
a3470f |
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
|
|
|
a3470f |
index 74b59b8..a6dfd66 100644
|
|
|
a3470f |
--- a/xlators/mount/fuse/src/fuse-bridge.c
|
|
|
a3470f |
+++ b/xlators/mount/fuse/src/fuse-bridge.c
|
|
|
a3470f |
@@ -1069,6 +1069,13 @@ fuse_fd_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
|
|
|
a3470f |
fd_bind (fd);
|
|
|
a3470f |
} else {
|
|
|
a3470f |
err:
|
|
|
a3470f |
+ /* OPEN(DIR) being an operation on inode should never fail with
|
|
|
a3470f |
+ * ENOENT. If gfid is not present, the appropriate error is
|
|
|
a3470f |
+ * ESTALE.
|
|
|
a3470f |
+ */
|
|
|
a3470f |
+ if (op_errno == ENOENT)
|
|
|
a3470f |
+ op_errno = ESTALE;
|
|
|
a3470f |
+
|
|
|
a3470f |
gf_log ("glusterfs-fuse", GF_LOG_WARNING,
|
|
|
a3470f |
"%"PRIu64": %s() %s => -1 (%s)", frame->root->unique,
|
|
|
a3470f |
gf_fop_list[frame->root->op], state->loc.path,
|
|
|
a3470f |
--
|
|
|
a3470f |
1.8.3.1
|
|
|
a3470f |
|