]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: use get_osdmap_epoch()
authorKefu Chai <kchai@redhat.com>
Tue, 25 Jun 2019 16:15:53 +0000 (00:15 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 25 Jun 2019 16:18:48 +0000 (00:18 +0800)
would be better to use the interfaces of the PG class, instead of
relying on its implementation.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/osd/pg.cc
src/crimson/osd/pg.h

index d78f94403d95240db8057d65d202e59f0e9ecb95..ac276c23a71e526426b9aeca099896e4e6a0c40b 100644 (file)
@@ -111,7 +111,7 @@ bool PG::try_flush_or_schedule_async() {
   shard_services.get_store().do_transaction(
     coll_ref,
     ObjectStore::Transaction()).then(
-      [this, epoch=peering_state.get_osdmap()->get_epoch()]() {
+      [this, epoch=get_osdmap_epoch()]() {
        return shard_services.start_operation<LocalPeeringEvent>(
          this,
          shard_services,
index 4af2424963e773b216ffd4b946d923c13d859450..2e847a83c3681bbedd80972f5539ed9b2edc6978 100644 (file)
@@ -114,7 +114,7 @@ public:
       int ret = prepare_info_keymap(
        shard_services.get_cct(),
        &km,
-       peering_state.get_osdmap()->get_epoch(),
+       get_osdmap_epoch(),
        info,
        last_written_info,
        past_intervals,