|
|
887953 |
From 3a392704f61915217f4f8210e1dd94901d6938bb Mon Sep 17 00:00:00 2001
|
|
|
887953 |
From: Raghavendra G <rgowdapp@redhat.com>
|
|
|
887953 |
Date: Tue, 11 Sep 2018 10:31:27 +0530
|
|
|
887953 |
Subject: [PATCH 368/385] mount/fuse: convert ENOENT to ESTALE in
|
|
|
887953 |
open(dir)_resume
|
|
|
887953 |
|
|
|
887953 |
This patch is continuation of commit
|
|
|
887953 |
fb4b914ce84bc83a5f418719c5ba7c25689a9251.
|
|
|
887953 |
|
|
|
887953 |
<snip>
|
|
|
887953 |
mount/fuse: never fail open(dir) with ENOENT
|
|
|
887953 |
|
|
|
887953 |
open(dir) being an operation on inode should never fail with
|
|
|
887953 |
ENOENT. If gfid is not present, the appropriate error is
|
|
|
887953 |
ESTALE. This will enable kernel to retry open after a revalidate
|
|
|
887953 |
lookup.
|
|
|
887953 |
</snip>
|
|
|
887953 |
|
|
|
887953 |
Earlier commit failed to fix codepath where error response is sent
|
|
|
887953 |
back on gfid resolution failures in fuse_open(dir)_resume. Current
|
|
|
887953 |
patch completes that work
|
|
|
887953 |
|
|
|
887953 |
>Change-Id: Ia07e3cece404811703c8cfbac9b402ca5fe98c1e
|
|
|
887953 |
>Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
|
|
|
887953 |
>updates: bz#1627620
|
|
|
887953 |
|
|
|
887953 |
Change-Id: Ia07e3cece404811703c8cfbac9b402ca5fe98c1e
|
|
|
887953 |
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
|
|
|
887953 |
BUG: 1627617
|
|
|
887953 |
upstream patch: https://review.gluster.org/#/c/glusterfs/+/21146/
|
|
|
887953 |
Reviewed-on: https://code.engineering.redhat.com/gerrit/150109
|
|
|
887953 |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
887953 |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
887953 |
---
|
|
|
887953 |
xlators/mount/fuse/src/fuse-bridge.c | 9 +++++++++
|
|
|
887953 |
1 file changed, 9 insertions(+)
|
|
|
887953 |
|
|
|
887953 |
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
|
|
|
887953 |
index b767ea4..85cee73 100644
|
|
|
887953 |
--- a/xlators/mount/fuse/src/fuse-bridge.c
|
|
|
887953 |
+++ b/xlators/mount/fuse/src/fuse-bridge.c
|
|
|
887953 |
@@ -2235,6 +2235,10 @@ fuse_open_resume (fuse_state_t *state)
|
|
|
887953 |
"%"PRIu64": OPEN %s resolution failed",
|
|
|
887953 |
state->finh->unique, uuid_utoa (state->resolve.gfid));
|
|
|
887953 |
|
|
|
887953 |
+ /* facilitate retry from VFS */
|
|
|
887953 |
+ if (state->resolve.op_errno == ENOENT)
|
|
|
887953 |
+ state->resolve.op_errno = ESTALE;
|
|
|
887953 |
+
|
|
|
887953 |
send_fuse_err (state->this, state->finh,
|
|
|
887953 |
state->resolve.op_errno);
|
|
|
887953 |
free_fuse_state (state);
|
|
|
887953 |
@@ -2687,6 +2691,11 @@ fuse_opendir_resume (fuse_state_t *state)
|
|
|
887953 |
gf_log ("glusterfs-fuse", GF_LOG_WARNING,
|
|
|
887953 |
"%"PRIu64": OPENDIR (%s) resolution failed",
|
|
|
887953 |
state->finh->unique, uuid_utoa (state->resolve.gfid));
|
|
|
887953 |
+
|
|
|
887953 |
+ /* facilitate retry from VFS */
|
|
|
887953 |
+ if (state->resolve.op_errno == ENOENT)
|
|
|
887953 |
+ state->resolve.op_errno = ESTALE;
|
|
|
887953 |
+
|
|
|
887953 |
send_fuse_err (state->this, state->finh,
|
|
|
887953 |
state->resolve.op_errno);
|
|
|
887953 |
free_fuse_state (state);
|
|
|
887953 |
--
|
|
|
887953 |
1.8.3.1
|
|
|
887953 |
|