summaryrefslogtreecommitdiffstats
path: root/source3/modules
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2015-02-13 18:25:57 +0800
committerIra Cooper <ira@samba.org>2015-02-16 18:14:02 +0100
commit2501afe08b94a514d8e2f3eeb4a2c4edc9764979 (patch)
treeac375cf99ca470508ef94e542c49037787c69681 /source3/modules
parentd1da1f78a5e5cb2778bf0f5483c01edcf178143a (diff)
downloadsamba-2501afe08b94a514d8e2f3eeb4a2c4edc9764979.tar.gz
samba-2501afe08b94a514d8e2f3eeb4a2c4edc9764979.tar.xz
samba-2501afe08b94a514d8e2f3eeb4a2c4edc9764979.zip
vfs_ceph: fix disk_free_fn callback
Free space and available space should be in unit of block size. Besides, we should call disk_norm() to adjust the returned values. Signed-off-by: Yan, Zheng <zyan@redhat.com> Reviewed-by: Ira Cooper <ira@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): Ira Cooper <ira@samba.org> Autobuild-Date(master): Mon Feb 16 18:14:02 CET 2015 on sn-devel-104
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_ceph.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index ec72312ce7..b074e2d2cb 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -167,8 +167,9 @@ static uint64_t cephwrap_disk_free(struct vfs_handle_struct *handle, const char
* Provide all the correct values.
*/
*bsize = statvfs_buf.f_bsize;
- *dfree = statvfs_buf.f_bsize * statvfs_buf.f_bavail;
- *dsize = statvfs_buf.f_bsize * statvfs_buf.f_blocks;
+ *dfree = statvfs_buf.f_bavail;
+ *dsize = statvfs_buf.f_blocks;
+ disk_norm(small_query, bsize, dfree, dsize);
DEBUG(10, ("[CEPH] bsize: %llu, dfree: %llu, dsize: %llu\n",
llu(*bsize), llu(*dfree), llu(*dsize)));
return *dfree;