diff options
author | Dan Lambright <dlambrig@redhat.com> | 2016-05-25 13:54:13 -0400 |
---|---|---|
committer | Dan Lambright <dlambrig@redhat.com> | 2016-07-27 06:03:48 -0700 |
commit | 64ae3907818ad3cdaed1a1454cb44f684c9fcffd (patch) | |
tree | bd6a746f5a48c0463e981b2fd225bbc1956a5ddb /xlators/cluster/dht/src/tier.c | |
parent | dbc8dac5c357a28aeba17894f8b02faa2af2a792 (diff) | |
download | glusterfs-64ae3907818ad3cdaed1a1454cb44f684c9fcffd.tar.gz glusterfs-64ae3907818ad3cdaed1a1454cb44f684c9fcffd.tar.xz glusterfs-64ae3907818ad3cdaed1a1454cb44f684c9fcffd.zip |
cluster/tier: fix statfs for dht/tiered volumes
Return the correct size of the tiered volume in statfs. It should
be the size of the cold tier, not the sum of the hot and cold tier,
because the hot tier is a cache and not an extension of the volume's
capacity. The number of free blocks, etc is the cold tier's capacity
subtracted by the sum of utilization on the hot and cold tiers. Note
if both tiers are part of the same file system this must be accounted
for as well.
The patch also fixes a pre-existing bug in the DHT/tier
translators. If statfs was taken on a file, the code only calculated
free space on the cached subvolume, not all subvolumes in the replica
group. With the fix, this is corrected, except in the case
where quota is used with the deem-statfs option set to "on".
Change-Id: I2b8bcb4511edf83f12130960aad0a609fcf8f513
BUG: 1339689
Signed-off-by: Dan Lambright <dlambrig@redhat.com>
Reviewed-on: http://review.gluster.org/14536
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/cluster/dht/src/tier.c')
-rw-r--r-- | xlators/cluster/dht/src/tier.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/tier.c b/xlators/cluster/dht/src/tier.c index 356af02156..9c8f15bbce 100644 --- a/xlators/cluster/dht/src/tier.c +++ b/xlators/cluster/dht/src/tier.c @@ -2465,7 +2465,7 @@ struct xlator_fops fops = { .mknod = dht_mknod, .open = dht_open, - .statfs = dht_statfs, + .statfs = tier_statfs, .opendir = dht_opendir, .readdir = tier_readdir, .readdirp = tier_readdirp, |