diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2014-05-21 17:47:03 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-06-02 03:56:46 -0700 |
commit | db022ef7ecca77cbecbcc4c046b6d3aafd2cb86f (patch) | |
tree | 0abb9a8bfb99ef814d1f994a60826d2a1c63b64c /tests/dht.rc | |
parent | 0d26de1b0a4a0fbf7e33dab8bc46c38c179e8645 (diff) |
cluster/dht: Fix min-free-disk calculations when quota-deem-statfs is on
PROBLEM:
As part of file creation, DHT sends a statfs call to all of its
sub-volumes and expects in return the local space consumption and
availability on each one of them. This information is used by DHT to
ensure that atleast min-free-disk amount of space is left on each
sub-volume in the event that there ARE other sub-volumes with more
space available.
But when quota-deem-statfs is enabled, quota xlator on every brick
unwinds the statfs call with volume-wide consumption of disk space.
This leads to miscalculation in min-free-disk algo, thereby misleading
DHT at some point, into thinking all sub-volumes have equal available
space, in which case DHT keeps sending new file creates to subvol-0,
causing it to become 100% full at some point although there ARE other
subvols with ample space available.
FIX:
The fix is to make quota_statfs() behave as if quota xlator weren't
enabled, thereby making every brick return only its local consumption
and disk space availability.
Change-Id: I211371a1eddb220037bd36a128973938ea8124c2
BUG: 1099890
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/7845
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'tests/dht.rc')
-rw-r--r-- | tests/dht.rc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/dht.rc b/tests/dht.rc index a11bbfd8a97..50c4532617e 100644 --- a/tests/dht.rc +++ b/tests/dht.rc @@ -91,3 +91,22 @@ function remove_brick_completed() echo $val return $val } + +function dht_get_linkto_target() +{ + local path=$1; + echo `getfattr -d -m . -e text --only-values --absolute-names --name=trusted.glusterfs.dht.linkto $path` +} + +function is_dht_linkfile() +{ + local path=$1 + retval=0 + local output=`stat --format=%a $path` + if [ $output -eq 1000 ]; then + retval=1 + fi + + echo $retval + return $retval +} |