From 8f04d42276048b3baff5a5d8fa769f433c62b63e Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Tue, 26 Jul 2011 11:26:54 -0700 Subject: ceph: report f_bfree based on kb_avail rather than diffing. Reviewed-by: Yehuda Sadeh Signed-off-by: Greg Farnum --- fs/ceph/super.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'fs/ceph/super.c') diff --git a/fs/ceph/super.c b/fs/ceph/super.c index f2f77fd3c14..d4757c98ec1 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -73,8 +73,7 @@ static int ceph_statfs(struct dentry *dentry, struct kstatfs *buf) */ buf->f_bsize = 1 << CEPH_BLOCK_SHIFT; buf->f_blocks = le64_to_cpu(st.kb) >> (CEPH_BLOCK_SHIFT-10); - buf->f_bfree = (le64_to_cpu(st.kb) - le64_to_cpu(st.kb_used)) >> - (CEPH_BLOCK_SHIFT-10); + buf->f_bfree = le64_to_cpu(st.kb_avail) >> (CEPH_BLOCK_SHIFT-10); buf->f_bavail = le64_to_cpu(st.kb_avail) >> (CEPH_BLOCK_SHIFT-10); buf->f_files = le64_to_cpu(st.num_objects); -- cgit v1.2.3-70-g09d2 From e9852227431a0ed6ceda064f33e4218757acab6c Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Fri, 22 Jul 2011 11:12:28 -0700 Subject: ceph: set up readahead size when rsize is not passed This should improve the default read performance, as without it readahead is practically disabled. Signed-off-by: Yehuda Sadeh --- fs/ceph/super.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'fs/ceph/super.c') diff --git a/fs/ceph/super.c b/fs/ceph/super.c index d4757c98ec1..d47c5ec7fb1 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -779,6 +779,10 @@ static int ceph_register_bdi(struct super_block *sb, fsc->backing_dev_info.ra_pages = (fsc->mount_options->rsize + PAGE_CACHE_SIZE - 1) >> PAGE_SHIFT; + else + fsc->backing_dev_info.ra_pages = + default_backing_dev_info.ra_pages; + err = bdi_register(&fsc->backing_dev_info, NULL, "ceph-%d", atomic_long_inc_return(&bdi_seq)); if (!err) -- cgit v1.2.3-70-g09d2