diff options
Diffstat (limited to 'fs/ceph/super.c')
-rw-r--r-- | fs/ceph/super.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/ceph/super.c b/fs/ceph/super.c index f2f77fd3c14c..d47c5ec7fb1f 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) | |||
73 | */ | 73 | */ |
74 | buf->f_bsize = 1 << CEPH_BLOCK_SHIFT; | 74 | buf->f_bsize = 1 << CEPH_BLOCK_SHIFT; |
75 | buf->f_blocks = le64_to_cpu(st.kb) >> (CEPH_BLOCK_SHIFT-10); | 75 | buf->f_blocks = le64_to_cpu(st.kb) >> (CEPH_BLOCK_SHIFT-10); |
76 | buf->f_bfree = (le64_to_cpu(st.kb) - le64_to_cpu(st.kb_used)) >> | 76 | buf->f_bfree = le64_to_cpu(st.kb_avail) >> (CEPH_BLOCK_SHIFT-10); |
77 | (CEPH_BLOCK_SHIFT-10); | ||
78 | buf->f_bavail = le64_to_cpu(st.kb_avail) >> (CEPH_BLOCK_SHIFT-10); | 77 | buf->f_bavail = le64_to_cpu(st.kb_avail) >> (CEPH_BLOCK_SHIFT-10); |
79 | 78 | ||
80 | buf->f_files = le64_to_cpu(st.num_objects); | 79 | buf->f_files = le64_to_cpu(st.num_objects); |
@@ -780,6 +779,10 @@ static int ceph_register_bdi(struct super_block *sb, | |||
780 | fsc->backing_dev_info.ra_pages = | 779 | fsc->backing_dev_info.ra_pages = |
781 | (fsc->mount_options->rsize + PAGE_CACHE_SIZE - 1) | 780 | (fsc->mount_options->rsize + PAGE_CACHE_SIZE - 1) |
782 | >> PAGE_SHIFT; | 781 | >> PAGE_SHIFT; |
782 | else | ||
783 | fsc->backing_dev_info.ra_pages = | ||
784 | default_backing_dev_info.ra_pages; | ||
785 | |||
783 | err = bdi_register(&fsc->backing_dev_info, NULL, "ceph-%d", | 786 | err = bdi_register(&fsc->backing_dev_info, NULL, "ceph-%d", |
784 | atomic_long_inc_return(&bdi_seq)); | 787 | atomic_long_inc_return(&bdi_seq)); |
785 | if (!err) | 788 | if (!err) |