summaryrefslogtreecommitdiffstats
path: root/tests/volume.rc
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2014-03-25 11:07:31 +0530
committerAnand Avati <avati@redhat.com>2014-03-26 22:43:14 -0700
commit21c282ef311d3d7385bba37ddb0a26fb12178409 (patch)
tree4393f28e1802a08852dbd467a793feaad6790bd9 /tests/volume.rc
parent00802b3a484499267af2e4474d75d3f75887ad07 (diff)
cluster/afr: Sparse file self-heal canges
- Fix boundary condition for offset - Honour data-self-heal-algorithm option - Added tests for sparse file self-healing Change-Id: I14bb1c9d04118a3df4072f962fc8f2f197391d95 BUG: 1080707 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/7339 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'tests/volume.rc')
-rw-r--r--tests/volume.rc10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/volume.rc b/tests/volume.rc
index 9a06687cd..9e4843e06 100644
--- a/tests/volume.rc
+++ b/tests/volume.rc
@@ -300,5 +300,11 @@ function data_written_count {
echo "$1" | grep "Data Written:$2bytes" | wc -l
}
-
-
+function has_holes {
+ if [ $((`stat -c '%b*%B-%s' -- $1`)) -lt 0 ];
+ then
+ echo "1"
+ else
+ echo "0"
+ fi
+}