aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ceph
diff options
context:
space:
mode:
authorDouglas Fuller <dfuller@redhat.com>2017-08-16 10:19:27 -0400
committerIlya Dryomov <idryomov@gmail.com>2017-09-06 13:56:49 -0400
commit06d74376c8af32f5b8d777a943aa4dc99165088b (patch)
treee3a431e2eaae92a5fc64bc8e55853367efb7cc30 /include/linux/ceph
parent92776fd2c230f80be910cf33acd99682345209cd (diff)
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/linux/ceph')
-rw-r--r--include/linux/ceph/ceph_fs.h2
-rw-r--r--include/linux/ceph/mon_client.h4
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 {
167struct ceph_mon_statfs { 167struct ceph_mon_statfs {
168 struct ceph_mon_request_header monhdr; 168 struct ceph_mon_request_header monhdr;
169 struct ceph_fsid fsid; 169 struct ceph_fsid fsid;
170 __u8 contains_data_pool;
171 __le64 data_pool;
170} __attribute__ ((packed)); 172} __attribute__ ((packed));
171 173
172struct ceph_statfs { 174struct 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);
133extern int ceph_monc_wait_osdmap(struct ceph_mon_client *monc, u32 epoch, 133extern int ceph_monc_wait_osdmap(struct ceph_mon_client *monc, u32 epoch,
134 unsigned long timeout); 134 unsigned long timeout);
135 135
136extern int ceph_monc_do_statfs(struct ceph_mon_client *monc, 136int ceph_monc_do_statfs(struct ceph_mon_client *monc, u64 data_pool,
137 struct ceph_statfs *buf); 137 struct ceph_statfs *buf);
138 138
139int ceph_monc_get_version(struct ceph_mon_client *monc, const char *what, 139int ceph_monc_get_version(struct ceph_mon_client *monc, const char *what,
140 u64 *newest); 140 u64 *newest);