mirror of
https://github.com/ceph/ceph
synced 2024-12-28 22:43:29 +00:00
Merge pull request #44550 from jdurgin/wip-pool-get-quota
mon/OSDMonitor: avoid null dereference if stats are not available Reviewed-by: Neha Ojha <nojha@redhat.com>
This commit is contained in:
commit
8b1568832d
@ -6578,6 +6578,11 @@ bool OSDMonitor::preprocess_command(MonOpRequestRef op)
|
||||
}
|
||||
const pg_pool_t *p = osdmap.get_pg_pool(poolid);
|
||||
const pool_stat_t* pstat = mon.mgrstatmon()->get_pool_stat(poolid);
|
||||
if (!pstat) {
|
||||
ss << "no stats for pool '" << pool_name << "'";
|
||||
r = -ENOENT;
|
||||
goto reply;
|
||||
}
|
||||
const object_stat_sum_t& sum = pstat->stats.sum;
|
||||
if (f) {
|
||||
f->open_object_section("pool_quotas");
|
||||
|
Loading…
Reference in New Issue
Block a user