summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra G <rgowdapp@redhat.com>2017-10-10 11:29:04 +0530
committerjiffin tony Thottan <jthottan@redhat.com>2018-01-10 06:56:57 +0000
commit4eddf6f003f6a8427b9fb6ba9af9ad7e2058ed02 (patch)
tree3dbdb26c62dfaf4f89b5026abc44b2cb80b73b33
parentc5e4d2c6ff1b2f4451f2c9e79ebc8533a162c8d3 (diff)
Revert "mount/fuse: report ESTALE as ENOENT"
This reverts commit 26d16b90ec7f8acbe07e56e8fe1baf9c9fa1519e. Consider rename (index.new, store.idx) and open (store.idx) being executed in parallel. When we break down operations following sequence is possible. * lookup (store.idx) - as part of open(store.idx) returns gfid1 as the result. * rename (index.new, store.idx) changes gfid of store.idx to gfid2. Note that gfid2 was the nodeid of index.new. Since rename is successful, gfid2 is associated with store.idx. * open (store.idx) resumes and issues open fop to glusterfs with gfid1. open in glusterfs fails as gfid1 doesn't exist and the error returned by glusterfs to kernel-fuse is ENOENT. * kernel passes back the same error to application as a result to open. This error could've been prevented if kernel retries open with gfid2. Interestingly kernel do retry open when it receives ESTALE error. Even though failure to find gfid resulted in ESTALE error, commit 26d16b90ec7f8acb converted that error to ENOENT while sending an error reply to kernel. This prevented kernel from retrying open resulting in error. >Change-Id: I2e752ca60dd8af1b989dd1d29c7b002ee58440b4 >BUG: 1500269 >Signed-off-by: Raghavendra G <rgowdapp@redhat.com> (cherry picked from commit 019a55e708375d2b1e576fcc948a691bcdc5c749) Change-Id: I2e752ca60dd8af1b989dd1d29c7b002ee58440b4 BUG: 1529088 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index a6dfd66adec..03d26eb0143 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -421,9 +421,6 @@ send_fuse_err (xlator_t *this, fuse_in_header_t *finh, int error)
struct iovec iov_out;
inode_t *inode = NULL;
- if (error == ESTALE)
- error = ENOENT;
-
fouh.error = -error;
iov_out.iov_base = &fouh;