]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/: eliminate unnecessary pg_hit_set_history_t::current_info 6120/head
authorSamuel Just <sjust@redhat.com>
Mon, 21 Sep 2015 22:56:35 +0000 (15:56 -0700)
committerSamuel Just <sjust@redhat.com>
Wed, 23 Sep 2015 23:20:08 +0000 (16:20 -0700)
commitc053499011eab0e7ce43fc8847c0c5cd5dbd6f2e
tree6933f712a9941373b19dbb1f34a3201e4c5da5dd
parent66a9bfdb32a5a3d82c2edf60db713f4fec9c24ae
osd/: eliminate unnecessary pg_hit_set_history_t::current_info

The only field actually relevant from this structure is .begin, which
duplicates the information in hit_set_start_stamp less well.  The problem
is that the starting point of the currently open hit set is ephemeral
state which shouldn't go into the pg_info_t structure.

This also caused 13185  since pg_info_t.hit_set.current_info gets default
constructed with use_gmt = true regardless of the pool setting.  This
becomes a problem in hit_set_persist since the oid is generated using
the pool setting, rather than the use_gmt value in current_info which
is placed into the history list.  That discrepancy then causes a crash
in hit set trim.  There would also be a related bug if the pool setting
is changed between when current_info is constructed and when it is
written out.

Since current_info isn't actually useful, I'm removing it so that we
don't later rely on invalid fields.

Fixes: 13185
Signed-off-by: Samuel Just <sjust@redhat.com>
src/osd/ReplicatedPG.cc
src/osd/osd_types.cc
src/osd/osd_types.h