diff options
author | Ravishankar N <ravishankar@redhat.com> | 2015-10-21 21:05:46 +0530 |
---|---|---|
committer | Jeff Darcy <jdarcy@redhat.com> | 2015-10-28 06:39:42 -0700 |
commit | 641b3a9164227db52df1aab05795c90d06b315f2 (patch) | |
tree | e2a55cb4aed7e6376f6a6da55c6493247d99c366 /xlators/cluster/afr/src/afr.h | |
parent | 8e5a7632edd040031e4942134331172805bc8eff (diff) |
afr: write zeros to sink for non-sparse files
Problem: If a file is created with zeroes ('dd', 'fallocate' etc.) when
a brick is down, the self-heal does not write the zeroes to the sink
after it comes up. Consequenty, there is a mismatch in disk-usage
amongst the bricks of the replica.
Fix: If we definitely know that the file is not sparse, then write the
zeroes to the sink even if the checksums match.
Change-Id: Ic739b3da5dbf47d99801c0e1743bb13aeb3af864
BUG: 1272460
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/12371
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr.h')
-rw-r--r-- | xlators/cluster/afr/src/afr.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h index bd4ff655546..28147e00579 100644 --- a/xlators/cluster/afr/src/afr.h +++ b/xlators/cluster/afr/src/afr.h @@ -265,7 +265,9 @@ struct afr_reply { struct iatt preparent; struct iatt preparent2; struct iatt postparent2; + /* For rchecksum */ uint8_t checksum[MD5_DIGEST_LENGTH]; + gf_boolean_t buf_has_zeroes; }; typedef enum { |