summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2012-02-29 16:06:25 +0530
committerVijay Bellur <vijay@gluster.com>2012-02-29 19:36:16 -0800
commit49a0c12e490f72d94acd6169a33f3f0f855000db (patch)
treea74bc0c79133e4891c22a31f59dce828d0890dde /xlators/cluster
parent0054807e5288727599bc264e64f83e9fb526732f (diff)
cluster/stripe: Send xattr request in lookup even when type is INVAL
Change-Id: I6f66b5aa39eaa5eadca2a91b1d4e948490f0aa06 BUG: 798161 Signed-off-by: shishir gowda <shishirng@gluster.com> Reviewed-on: http://review.gluster.com/2837 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'xlators/cluster')
-rw-r--r--xlators/cluster/stripe/src/stripe.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/xlators/cluster/stripe/src/stripe.c b/xlators/cluster/stripe/src/stripe.c
index c44bac57525..227af8c9e33 100644
--- a/xlators/cluster/stripe/src/stripe.c
+++ b/xlators/cluster/stripe/src/stripe.c
@@ -595,8 +595,11 @@ stripe_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc,
dict_del (xattr_req, GF_CONTENT_KEY);
}
- /* get stripe-size xattr on lookup for pathinfo string */
- if (xattr_req && IA_ISREG (loc->inode->ia_type)) {
+ /* get stripe-size xattr on lookup. This would be required for
+ * open/read/write/pathinfo calls. Hence we send down the request
+ * even when type == IA_INVAL */
+ if (xattr_req && (IA_ISREG (loc->inode->ia_type) ||
+ (loc->inode->ia_type == IA_INVAL))) {
ret = stripe_xattr_request_build (this, xattr_req, 8, 4, 4);
if (ret)
gf_log (this->name , GF_LOG_ERROR, "Failed to build"