summaryrefslogtreecommitdiffstats
path: root/xlators/features/gfid-access/src/gfid-access.h
diff options
context:
space:
mode:
authorKotresh H R <khiremat@redhat.com>2014-06-06 03:27:21 +0530
committerVijay Bellur <vbellur@redhat.com>2014-06-20 02:21:58 -0700
commit78e9180ca24f15e1366eb3d51cbb5e4576af91a2 (patch)
tree7b1f706c15a48b14b3f367477ab280210318bdcb /xlators/features/gfid-access/src/gfid-access.h
parent124ba991069099258e4e69ccf3eefae1c88ebb8c (diff)
feautre/gfid-access: Fix EINVAL when stat on .gfid
Problem: Some of the inode operations on '.gfid' virtual directory was resulting in the error EINVAL from dht after failing to find the layout. Solution: Inode operations on '.gfid' virtual directory should not wind further down and should be handled accordingly in the gfid-access translator itself. Change-Id: I156cb10ffea0c46b0d747e26f74538d7fb01a1dd BUG: 1105891 Signed-off-by: Kotresh H R <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/8011 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/features/gfid-access/src/gfid-access.h')
-rw-r--r--xlators/features/gfid-access/src/gfid-access.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/xlators/features/gfid-access/src/gfid-access.h b/xlators/features/gfid-access/src/gfid-access.h
index 9bc4d2dfd2d..11d576191b4 100644
--- a/xlators/features/gfid-access/src/gfid-access.h
+++ b/xlators/features/gfid-access/src/gfid-access.h
@@ -68,7 +68,7 @@
((loc->parent && \
__is_root_gfid (loc->parent->gfid)) || \
__is_root_gfid (loc->pargfid))) { \
- err = EEXIST; \
+ err = ENOTSUP; \
goto lbl; \
} \
\
@@ -82,7 +82,13 @@
} \
} while (0)
-
+#define GFID_ACCESS_INODE_OP_CHECK(loc,err,lbl) do { \
+ /*Check if it is on .gfid*/ \
+ if (__is_gfid_access_dir(loc->gfid)) { \
+ err = ENOTSUP; \
+ goto lbl; \
+ } \
+ } while (0)
typedef struct {
unsigned int uid;
unsigned int gid;