]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crimson/{mgr,osd}: add WithStats::update_stats()
authorKefu Chai <kchai@redhat.com>
Fri, 3 Jul 2020 07:59:11 +0000 (15:59 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 3 Jul 2020 08:09:38 +0000 (16:09 +0800)
commitd5e1d104ffcfd8d29454042bc73b96b690cdae9b
tree122eeb1088e95c468f70231222d8583c8063e1db
parent99067b8dc6422fdef08f8d29d1a0307306baae99
crimson/{mgr,osd}: add WithStats::update_stats()

because we need to implement a tell command which forces osd to
send the latest pg stats to mgr, and the command returns the user with
the sequence id of the report, and `mgr::Client::report()` does not
return a future, so we have to update the seq id before sending
the report. the solution is to update the seq id in a separated
method, so in this change:

* add `const` to `WithStats::get_stats()
* add a dedicated method of `WithStats::update_stats()` to update
  the stats to be collected by mgr::Client.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/mgr/client.cc
src/crimson/mgr/client.h
src/crimson/osd/osd.cc
src/crimson/osd/osd.h