diff options
author | Douglas Fuller <dfuller@redhat.com> | 2017-08-16 16:19:27 +0200 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2017-09-06 19:56:49 +0200 |
commit | 06d74376c8af32f5b8d777a943aa4dc99165088b (patch) | |
tree | e3a431e2eaae92a5fc64bc8e55853367efb7cc30 /include | |
parent | ceph: properly set snap follows for cap reconnect (diff) | |
download | linux-06d74376c8af32f5b8d777a943aa4dc99165088b.tar.xz linux-06d74376c8af32f5b8d777a943aa4dc99165088b.zip |
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 <dfuller@redhat.com>
Reviewed-by: Yan, Zheng <zyan@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ceph/ceph_fs.h | 2 | ||||
-rw-r--r-- | include/linux/ceph/mon_client.h | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/ceph/ceph_fs.h b/include/linux/ceph/ceph_fs.h index d1642a4b4c5e..b422170b791a 100644 --- a/include/linux/ceph/ceph_fs.h +++ b/include/linux/ceph/ceph_fs.h @@ -167,6 +167,8 @@ struct ceph_mon_request_header { struct ceph_mon_statfs { struct ceph_mon_request_header monhdr; struct ceph_fsid fsid; + __u8 contains_data_pool; + __le64 data_pool; } __attribute__ ((packed)); struct ceph_statfs { diff --git a/include/linux/ceph/mon_client.h b/include/linux/ceph/mon_client.h index d5a3ecea578d..0fa990bf867a 100644 --- a/include/linux/ceph/mon_client.h +++ b/include/linux/ceph/mon_client.h @@ -133,8 +133,8 @@ void ceph_monc_renew_subs(struct ceph_mon_client *monc); extern int ceph_monc_wait_osdmap(struct ceph_mon_client *monc, u32 epoch, unsigned long timeout); -extern int ceph_monc_do_statfs(struct ceph_mon_client *monc, - struct ceph_statfs *buf); +int ceph_monc_do_statfs(struct ceph_mon_client *monc, u64 data_pool, + struct ceph_statfs *buf); int ceph_monc_get_version(struct ceph_mon_client *monc, const char *what, u64 *newest); |