Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ceph: make f_bsize always equal to f_frsize

The f_frsize maybe changed in the quota size is less than the defualt
4MB.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>

authored by

Xiubo Li and committed by
Ilya Dryomov
0c04a117 e027ddb6

+9 -7
+9 -7
fs/ceph/super.c
··· 72 72 buf->f_type = CEPH_SUPER_MAGIC; /* ?? */ 73 73 74 74 /* 75 - * express utilization in terms of large blocks to avoid 75 + * Express utilization in terms of large blocks to avoid 76 76 * overflow on 32-bit machines. 77 - * 78 - * NOTE: for the time being, we make bsize == frsize to humor 79 - * not-yet-ancient versions of glibc that are broken. 80 - * Someday, we will probably want to report a real block 81 - * size... whatever that may mean for a network file system! 82 77 */ 83 - buf->f_bsize = 1 << CEPH_BLOCK_SHIFT; 84 78 buf->f_frsize = 1 << CEPH_BLOCK_SHIFT; 85 79 86 80 /* ··· 88 94 buf->f_bfree = le64_to_cpu(st.kb_avail) >> (CEPH_BLOCK_SHIFT-10); 89 95 buf->f_bavail = le64_to_cpu(st.kb_avail) >> (CEPH_BLOCK_SHIFT-10); 90 96 } 97 + 98 + /* 99 + * NOTE: for the time being, we make bsize == frsize to humor 100 + * not-yet-ancient versions of glibc that are broken. 101 + * Someday, we will probably want to report a real block 102 + * size... whatever that may mean for a network file system! 103 + */ 104 + buf->f_bsize = buf->f_frsize; 91 105 92 106 buf->f_files = le64_to_cpu(st.num_objects); 93 107 buf->f_ffree = -1;