From 443806fcfa6332163e08a63620e54d2f6be3996e Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Thu, 19 Apr 2012 13:18:33 +0530 Subject: stripe: make sure we have complete set of subvolumes before making fop Change-Id: Ifc3b05183945a7ce3e25f8c777daaf3fd4aecff3 BUG: 810450 Signed-off-by: shishir gowda Reviewed-on: http://review.gluster.com/3190 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi --- xlators/cluster/stripe/src/stripe.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'xlators/cluster/stripe/src/stripe.c') diff --git a/xlators/cluster/stripe/src/stripe.c b/xlators/cluster/stripe/src/stripe.c index 44a00ee12..86cc66f59 100644 --- a/xlators/cluster/stripe/src/stripe.c +++ b/xlators/cluster/stripe/src/stripe.c @@ -3314,6 +3314,8 @@ stripe_readv (call_frame_t *frame, xlator_t *this, fd_t *fd, fctx = (stripe_fd_ctx_t *)(long)tmp_fctx; stripe_size = fctx->stripe_size; + STRIPE_VALIDATE_FCTX (fctx, err); + if (!stripe_size) { gf_log (this->name, GF_LOG_DEBUG, "Wrong stripe size for the file"); @@ -3459,6 +3461,8 @@ stripe_writev (call_frame_t *frame, xlator_t *this, fd_t *fd, fctx = (stripe_fd_ctx_t *)(long)tmp_fctx; stripe_size = fctx->stripe_size; + STRIPE_VALIDATE_FCTX (fctx, err); + /* File has to be stripped across the child nodes */ for (idx = 0; idx< count; idx ++) { total_size += vector[idx].iov_len; -- cgit