]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
PGStateUtils: remove PG*, move into PGStateHistory into PeeringState
authorSamuel Just <sjust@redhat.com>
Thu, 21 Mar 2019 23:25:17 +0000 (16:25 -0700)
committersjust@redhat.com <sjust@redhat.com>
Wed, 1 May 2019 18:22:12 +0000 (11:22 -0700)
commitd96c9072b72c7e8cf3757dc3f28afeebdce1cf66
treecc1ab06aa1efa1e9f7c63f2fa21626477d87e093
parent1e4166a049be19975c5bfd3710c1bcd49093843d
PGStateUtils: remove PG*, move into PGStateHistory into PeeringState

I don't think there's any need to worry about the pg locking from
PGStateHistory.  NamedState::begin/exit and dump_pgstate_history are the
only users, so the only calls should be under the peering event handler,
the asok command, or the PG constructor and destructor.  The first two
already have the lock.  The last should be safe as well as long as
the state machine states are constructed and destructed after and
before the PGStateHistory instance. As such, this patch removes most
of that state leaving the epoch generation as an interface
implemented by PG.

The snap trimming state machine was already excluded, so that this
patch leaves it disabled.

Signed-off-by: Samuel Just <sjust@redhat.com>
src/osd/PG.cc
src/osd/PG.h
src/osd/PGStateUtils.cc
src/osd/PGStateUtils.h
src/osd/PeeringState.cc
src/osd/PeeringState.h
src/osd/PrimaryLogPG.cc
src/osd/PrimaryLogPG.h