ceph: make f_bsize always equal to f_frsize
[sfrench/cifs-2.6.git] / fs / ceph / super.c
index 5539f6c87a45e3a8923bb7632e3cb1c9743f1545..3fc48b43cab0a2c5bccfe16445f09a9ecdd55761 100644 (file)
@@ -72,15 +72,9 @@ static int ceph_statfs(struct dentry *dentry, struct kstatfs *buf)
        buf->f_type = CEPH_SUPER_MAGIC;  /* ?? */
 
        /*
-        * express utilization in terms of large blocks to avoid
+        * Express utilization in terms of large blocks to avoid
         * overflow on 32-bit machines.
-        *
-        * NOTE: for the time being, we make bsize == frsize to humor
-        * not-yet-ancient versions of glibc that are broken.
-        * Someday, we will probably want to report a real block
-        * size...  whatever that may mean for a network file system!
         */
-       buf->f_bsize = 1 << CEPH_BLOCK_SHIFT;
        buf->f_frsize = 1 << CEPH_BLOCK_SHIFT;
 
        /*
@@ -95,6 +89,14 @@ static int ceph_statfs(struct dentry *dentry, struct kstatfs *buf)
                buf->f_bavail = le64_to_cpu(st.kb_avail) >> (CEPH_BLOCK_SHIFT-10);
        }
 
+       /*
+        * NOTE: for the time being, we make bsize == frsize to humor
+        * not-yet-ancient versions of glibc that are broken.
+        * Someday, we will probably want to report a real block
+        * size...  whatever that may mean for a network file system!
+        */
+       buf->f_bsize = buf->f_frsize;
+
        buf->f_files = le64_to_cpu(st.num_objects);
        buf->f_ffree = -1;
        buf->f_namelen = NAME_MAX;