]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon/PGMap: fix stored_raw calculation
authorSage Weil <sage@redhat.com>
Wed, 24 Jul 2019 14:43:59 +0000 (09:43 -0500)
committerSage Weil <sage@redhat.com>
Tue, 6 Aug 2019 14:24:14 +0000 (09:24 -0500)
commit5a6ede0ec1d52f061db9e7e2425d905ce250c2e2
tree1fd8ccd1e47ceadc402987e81a8e0705dd955d72
parentb207973ae998e67c3f00a6cbd6dba92aa45dc7b2
mon/PGMap: fix stored_raw calculation

The get_user_bytes() helper is a bit weird because it uses the
raw_used_rate (replication/EC factor) so that it can work *backwards*
from raw usage to normalized user usage.  However, the legacy case that
works from PG stats does not use this factor... and the stored_raw value
(in the JSON output only) was incorrectly passing in a factor of 1.0,
which meant that for legacy mode it was a bogus value.

Fix by calculating stored_raw as stored_normalized * raw_used_rate.

Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/PGMap.cc
src/osd/osd_types.h