diff options
-rw-r--r-- | libglusterfs/src/common-utils.h | 2 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-common.h | 1 | ||||
-rw-r--r-- | xlators/cluster/stripe/src/stripe.c | 2 |
3 files changed, 4 insertions, 1 deletions
diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h index e4d302970..272beee2d 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, diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h index 437e0dff3..c9e4e9261 100644 --- a/xlators/cluster/dht/src/dht-common.h +++ b/xlators/cluster/dht/src/dht-common.h @@ -181,7 +181,6 @@ struct dht_disk_layout { }; typedef struct dht_disk_layout dht_disk_layout_t; -#define WIPE(statp) do { typeof(*statp) z = {0,}; if (statp) *statp = z; } while (0) #define ENTRY_MISSING(op_ret, op_errno) (op_ret == -1 && op_errno == ENOENT) diff --git a/xlators/cluster/stripe/src/stripe.c b/xlators/cluster/stripe/src/stripe.c index d42d88b12..e6175c203 100644 --- a/xlators/cluster/stripe/src/stripe.c +++ b/xlators/cluster/stripe/src/stripe.c @@ -3622,6 +3622,8 @@ stripe_readv_cbk (call_frame_t *frame, void *cookie, xlator_t *this, /* */ GF_FREE (mlocal->replies); tmp_iobref = mlocal->iobref; + /* work around for nfs truncated read. Bug 3774 */ + WIPE (&tmp_stbuf); STRIPE_STACK_UNWIND (readv, mframe, op_ret, op_errno, final_vec, final_count, &tmp_stbuf, tmp_iobref); |