From 49a0c12e490f72d94acd6169a33f3f0f855000db Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Wed, 29 Feb 2012 16:06:25 +0530 Subject: cluster/stripe: Send xattr request in lookup even when type is INVAL Change-Id: I6f66b5aa39eaa5eadca2a91b1d4e948490f0aa06 BUG: 798161 Signed-off-by: shishir gowda Reviewed-on: http://review.gluster.com/2837 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi --- xlators/cluster/stripe/src/stripe.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'xlators/cluster/stripe/src') diff --git a/xlators/cluster/stripe/src/stripe.c b/xlators/cluster/stripe/src/stripe.c index c44bac575..227af8c9e 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" -- cgit