From 879c01087d58742515524664e8a193a04a0d4146 Mon Sep 17 00:00:00 2001 From: Brian Foster Date: Thu, 19 Jul 2012 15:01:13 -0400 Subject: cluster/stripe: handle short writes and errors in writev callback cluster/stripe write callback handling is broken in the event of server side errors and short writes due to crudely summing up the return values from each node. This can produce incorrect results or cause an application to rewrite the wrong portions of a buffer in an attempt to handle this condition. Modify cluster/stripe writev handling to record the requested size of each write and use this data to return the number of consecutive bytes written from the original request. This allows an application to retry a write at the point of error (and potentially consume said error). BUG: 809975 Change-Id: Ic35cb1e092c29545205aa32e352485c507534ce0 Signed-off-by: Brian Foster Reviewed-on: http://review.gluster.com/3700 Tested-by: Gluster Build System Reviewed-by: Shishir Gowda Reviewed-by: Amar Tumballi Reviewed-by: Anand Avati --- xlators/cluster/stripe/src/stripe-mem-types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/cluster/stripe/src/stripe-mem-types.h') diff --git a/xlators/cluster/stripe/src/stripe-mem-types.h b/xlators/cluster/stripe/src/stripe-mem-types.h index c8781d7d..e05ba0c2 100644 --- a/xlators/cluster/stripe/src/stripe-mem-types.h +++ b/xlators/cluster/stripe/src/stripe-mem-types.h @@ -16,7 +16,7 @@ enum gf_stripe_mem_types_ { gf_stripe_mt_iovec = gf_common_mt_end + 1, - gf_stripe_mt_readv_replies, + gf_stripe_mt_stripe_replies, gf_stripe_mt_stripe_fd_ctx_t, gf_stripe_mt_char, gf_stripe_mt_int8_t, -- cgit