Skip to content

Commit

Permalink
ceph: report f_bfree based on kb_avail rather than diffing.
Browse files Browse the repository at this point in the history
Reviewed-by: Yehuda Sadeh <[email protected]>
Signed-off-by: Greg Farnum <[email protected]>
  • Loading branch information
gregsfortytwo authored and liewegas committed Jul 26, 2011
1 parent e77dc3e commit 8f04d42
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/ceph/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8f04d42

Please sign in to comment.