diff options
author | Brian Foster <bfoster@redhat.com> | 2012-07-19 15:01:13 -0400 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-07-30 11:39:03 -0700 |
commit | 879c01087d58742515524664e8a193a04a0d4146 (patch) | |
tree | 9c824d09ea4a814e085f9df6b2ff292a767c6868 /xlators/cluster/stripe/src/stripe.h | |
parent | b3025cb8dd79751c12b7bb375ec701b532688cbc (diff) |
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 <bfoster@redhat.com>
Reviewed-on: http://review.gluster.com/3700
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Shishir Gowda <sgowda@redhat.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/cluster/stripe/src/stripe.h')
-rw-r--r-- | xlators/cluster/stripe/src/stripe.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xlators/cluster/stripe/src/stripe.h b/xlators/cluster/stripe/src/stripe.h index 1b9e660c126..a440f87ba1f 100644 --- a/xlators/cluster/stripe/src/stripe.h +++ b/xlators/cluster/stripe/src/stripe.h @@ -106,9 +106,9 @@ struct stripe_private { }; /** - * Used to keep info about the replies received from fops->readv calls + * Used to keep info about the replies received from readv/writev calls */ -struct readv_replies { +struct stripe_replies { struct iovec *vector; int32_t count; //count of vector int32_t op_ret; //op_ret of readv @@ -156,7 +156,7 @@ struct stripe_local { blkcnt_t preparent_blocks; blkcnt_t postparent_blocks; - struct readv_replies *replies; + struct stripe_replies *replies; struct statvfs statvfs_buf; dir_entry_t *entry; |