summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2011-11-07 16:32:10 +0530
committerVijay Bellur <vijay@gluster.com>2011-11-08 22:11:48 -0800
commitd4c61c4fff1c9e8d32d84eb1a552c9070bdc2c6f (patch)
tree6d4afa9e8ebfe3e74fea5daaca14037c4272b12c /libglusterfs/src
parentbff2fe53d51bcf9b3dbf97fc5a0d25ab3d452738 (diff)
stripe read: Wipe stat in reply to prevent truncated error.
If the read request, does not fall to the subvolume with the largest file size set, then we never return the correct size. This leads to clients seeing a truncated file error. The work around is to wipe stat being returned as part of read call. Change-Id: I4e76d09d7919fd0be616fe140e08f89a0dbcc444 BUG: 3774 Reviewed-on: http://review.gluster.com/682 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com>
Diffstat (limited to 'libglusterfs/src')
-rw-r--r--libglusterfs/src/common-utils.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h
index e4d30297002..272beee2d77 100644
--- a/libglusterfs/src/common-utils.h
+++ b/libglusterfs/src/common-utils.h
@@ -70,6 +70,8 @@ void trap (void);
#define GEOREP "geo-replication"
+#define WIPE(statp) do { typeof(*statp) z = {0,}; if (statp) *statp = z; } while (0)
+
enum _gf_boolean
{
_gf_false = 0,