summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2010-11-16 00:12:58 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-11-15 23:45:55 -0800
commite10f1ec908139d9778406d07274dd390b7f56bc8 (patch)
tree718a59d609b150be97e376f3286d1eb9e7774d73 /xlators
parent961fc917e8e9f13b8cab69b1ba11767d5c41a8ce (diff)
Solaris: df -h returned invalid size
The reason seems to have been multiplying fields with f_bsize, while they are in f_frsize units. On linux both f_bize and f_frbsize seems to have been the same Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1021 (NFS: df -h shows incorrect out put) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1021
Diffstat (limited to 'xlators')
-rw-r--r--xlators/nfs/server/src/nfs3-helpers.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/nfs/server/src/nfs3-helpers.c b/xlators/nfs/server/src/nfs3-helpers.c
index 8e4ca372027..8d7c66f4d13 100644
--- a/xlators/nfs/server/src/nfs3-helpers.c
+++ b/xlators/nfs/server/src/nfs3-helpers.c
@@ -1090,8 +1090,8 @@ nfs3_fill_fsstat3res (fsstat3res *res, nfsstat3 stat, struct statvfs *fsbuf,
nfs3_map_deviceid_to_statdev (postbuf, deviceid);
poa = nfs3_stat_to_post_op_attr (postbuf);
resok.tbytes = (size3)(fsbuf->f_frsize * fsbuf->f_blocks);
- resok.fbytes = (size3)(fsbuf->f_bsize * fsbuf->f_bfree);
- resok.abytes = (size3)(fsbuf->f_bsize * fsbuf->f_bavail);
+ resok.fbytes = (size3)(fsbuf->f_frsize * fsbuf->f_bfree);
+ resok.abytes = (size3)(fsbuf->f_frsize * fsbuf->f_bavail);
resok.tfiles = (size3)(fsbuf->f_files);
resok.ffiles = (size3)(fsbuf->f_ffree);
resok.afiles = (size3)(fsbuf->f_favail);