diff options
author | Raghavendra G <rgowdapp@redhat.com> | 2016-03-23 13:47:27 +0530 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2016-04-20 19:56:11 -0700 |
commit | adc8aeb16cdee8d2f58aa8f2fce1dd637f264e51 (patch) | |
tree | 424135c27f346c84deac8ec3c417f4e59d9a6b8f | |
parent | c55da44b49f0183948f464dae4a5e11d9ed63a24 (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.
BUG: 1257894
Change-Id: I5e56bc0c53f52179940b4691acf6b3db853965df
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-on: http://review.gluster.org/14027
Tested-by: N Balachandran <nbalacha@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: N Balachandran <nbalacha@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
-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 85b212af951..2fbea1383d8 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -348,6 +348,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; |