]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
PG: set epoch_created and parent_split_bits for child pg 8552/head
authorKefu Chai <kchai@redhat.com>
Tue, 12 Apr 2016 09:31:27 +0000 (17:31 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 12 Apr 2016 11:43:11 +0000 (19:43 +0800)
commit8b985561ba08d4ed2d7751a8e09f9d9067c5fbd3
treeb883bb6859a17c6d4d4df78fef249716cb21db56
parent5f9c77bd108ea7924b3964aa3dba4aaa09042ea7
PG: set epoch_created and parent_split_bits for child pg

if we have a wrong "created", OSD receiving an osd_pg_create message
could fail to project its history and crash. a bad split_bits could
mislead the monitor and osd, and hence cause problems.
* set child.info.history.epoch_created to osdmap.get_epoch() instead of
  using the parent's epoch_created
* set child.info.stats.parent_split_bits to the calculated split_bits
  instead using the parent's split_bits

Fixes: http://tracker.ceph.com/issues/15426
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/osd/PG.cc