diff options
author | Raghavendra G <rgowdapp@redhat.com> | 2016-03-23 13:47:27 +0530 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2016-04-18 22:23:46 -0700 |
commit | 26d16b90ec7f8acbe07e56e8fe1baf9c9fa1519e (patch) | |
tree | 4b640d94079866fc4c6ff42f111171519d278549 /xlators/mount/fuse/src | |
parent | c530506845c5e86ab745fd5753620f2ca48d36e5 (diff) |
mount/fuse: report ESTALE as ENOENT
When the inode/gfid is missing, brick report back as an ESTALE
error. However, most of the applications don't accept ESTALE as an
error for a file-system object missing, changing their behaviour.
For eg., rm -rf ignores ENOENT errors during unlink of
files/directories. But with ESTALE error it doesn't send rmdir on a
directory if unlink had failed with ESTALE for any of the files or
directories within it.
Thanks to Ravishankar N <ravishankar@redhat.com>, here is a link as to
why we split up ENOENT into ESTALE and ENOENT.
http://review.gluster.org/#/c/6318/
Change-Id: I467df0fdf22734a8ef20c79ac52606410fad04d1
BUG: 1245065
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-on: http://review.gluster.org/13816
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: N Balachandran <nbalacha@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: N Balachandran <nbalacha@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/mount/fuse/src')
-rw-r--r-- | xlators/mount/fuse/src/fuse-bridge.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index aca1b3d14fd..ee93aa3291f 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -349,6 +349,9 @@ 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; |