|
|
d1681e |
From de1ee9800f8e20d0c0a8adb1994f208d2dc8ae09 Mon Sep 17 00:00:00 2001
|
|
|
d1681e |
From: Raghavendra G <rgowdapp@redhat.com>
|
|
|
d1681e |
Date: Tue, 10 Oct 2017 11:29:04 +0530
|
|
|
d1681e |
Subject: [PATCH 110/128] Revert "mount/fuse: report ESTALE as ENOENT"
|
|
|
d1681e |
|
|
|
d1681e |
This reverts commit 26d16b90ec7f8acbe07e56e8fe1baf9c9fa1519e.
|
|
|
d1681e |
|
|
|
d1681e |
Consider rename (index.new, store.idx) and open (store.idx) being
|
|
|
d1681e |
executed in parallel. When we break down operations following sequence
|
|
|
d1681e |
is possible.
|
|
|
d1681e |
|
|
|
d1681e |
* lookup (store.idx) - as part of open(store.idx) returns gfid1 as the
|
|
|
d1681e |
result.
|
|
|
d1681e |
* rename (index.new, store.idx) changes gfid of store.idx to
|
|
|
d1681e |
gfid2. Note that gfid2 was the nodeid of index.new. Since rename is
|
|
|
d1681e |
successful, gfid2 is associated with store.idx.
|
|
|
d1681e |
* open (store.idx) resumes and issues open fop to glusterfs with
|
|
|
d1681e |
gfid1. open in glusterfs fails as gfid1 doesn't exist and the error
|
|
|
d1681e |
returned by glusterfs to kernel-fuse is ENOENT.
|
|
|
d1681e |
* kernel passes back the same error to application as a result to
|
|
|
d1681e |
open.
|
|
|
d1681e |
|
|
|
d1681e |
This error could've been prevented if kernel retries open with
|
|
|
d1681e |
gfid2. Interestingly kernel do retry open when it receives ESTALE
|
|
|
d1681e |
error. Even though failure to find gfid resulted in ESTALE error,
|
|
|
d1681e |
commit 26d16b90ec7f8acb converted that error to ENOENT while sending
|
|
|
d1681e |
an error reply to kernel. This prevented kernel from retrying open
|
|
|
d1681e |
resulting in error.
|
|
|
d1681e |
|
|
|
d1681e |
Change-Id: I2e752ca60dd8af1b989dd1d29c7b002ee58440b4
|
|
|
d1681e |
BUG: 1492591
|
|
|
d1681e |
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
|
|
|
d1681e |
upstream patch: https://review.gluster.org/#/c/18463/
|
|
|
d1681e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/126509
|
|
|
d1681e |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
d1681e |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
d1681e |
---
|
|
|
d1681e |
xlators/mount/fuse/src/fuse-bridge.c | 3 ---
|
|
|
d1681e |
1 file changed, 3 deletions(-)
|
|
|
d1681e |
|
|
|
d1681e |
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
|
|
|
d1681e |
index a6dfd66..03d26eb 100644
|
|
|
d1681e |
--- a/xlators/mount/fuse/src/fuse-bridge.c
|
|
|
d1681e |
+++ b/xlators/mount/fuse/src/fuse-bridge.c
|
|
|
d1681e |
@@ -421,9 +421,6 @@ send_fuse_err (xlator_t *this, fuse_in_header_t *finh, int error)
|
|
|
d1681e |
struct iovec iov_out;
|
|
|
d1681e |
inode_t *inode = NULL;
|
|
|
d1681e |
|
|
|
d1681e |
- if (error == ESTALE)
|
|
|
d1681e |
- error = ENOENT;
|
|
|
d1681e |
-
|
|
|
d1681e |
fouh.error = -error;
|
|
|
d1681e |
iov_out.iov_base = &fou;;
|
|
|
d1681e |
|
|
|
d1681e |
--
|
|
|
d1681e |
1.8.3.1
|
|
|
d1681e |
|