mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
ceph: more accurate statfs
Improve accuracy of statfs reporting for Ceph filesystems comprising exactly one data pool. In this case, the Ceph monitor can now report the space usage for the single data pool instead of the global data for the entire Ceph cluster. Include support for this message in mon_client and leverage it in ceph/super. Signed-off-by: Douglas Fuller <[email protected]> Reviewed-by: Yan, Zheng <[email protected]> Reviewed-by: Ilya Dryomov <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
This commit is contained in:
parent
92776fd2c2
commit
06d74376c8
4 changed files with 17 additions and 4 deletions
|
|
@ -49,9 +49,16 @@ static int ceph_statfs(struct dentry *dentry, struct kstatfs *buf)
|
|||
struct ceph_statfs st;
|
||||
u64 fsid;
|
||||
int err;
|
||||
u64 data_pool;
|
||||
|
||||
if (fsc->mdsc->mdsmap->m_num_data_pg_pools == 1) {
|
||||
data_pool = fsc->mdsc->mdsmap->m_data_pg_pools[0];
|
||||
} else {
|
||||
data_pool = CEPH_NOPOOL;
|
||||
}
|
||||
|
||||
dout("statfs\n");
|
||||
err = ceph_monc_do_statfs(&fsc->client->monc, &st);
|
||||
err = ceph_monc_do_statfs(&fsc->client->monc, data_pool, &st);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue