From d34dba7cb664f9c39ff06208c748dcfbd6a56eee Mon Sep 17 00:00:00 2001 From: David Zafman Date: Thu, 22 Aug 2019 10:30:01 -0700 Subject: [PATCH] osd: Rename MBackfillReserve::TOOFULL to what it does in particular (revoke) Signed-off-by: David Zafman (cherry picked from commit 7810ee584cc0fe9ca1b819d2a807dfc7cd13d292) Conflicts: src/osd/PeeringState.cc - file does not exist in nautilus due to refactoring: made the changes manually to src/osd/PG.cc --- src/messages/MBackfillReserve.h | 10 +++++----- src/osd/PG.cc | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/messages/MBackfillReserve.h b/src/messages/MBackfillReserve.h index ab571c49f6dd0..1b4e021a9a38b 100644 --- a/src/messages/MBackfillReserve.h +++ b/src/messages/MBackfillReserve.h @@ -32,7 +32,7 @@ public: GRANT = 1, // replica->primary: ok, i reserved it REJECT = 2, // replica->primary: sorry, try again later (*) RELEASE = 3, // primary->replcia: release the slot i reserved before - TOOFULL = 4, // replica->primary: too full, stop backfilling + REVOKE_TOOFULL = 4, // replica->primary: too full, stop backfilling REVOKE = 5, // replica->primary: i'm taking back the slot i gave you // (*) NOTE: prior to luminous, REJECT was overloaded to also mean release }; @@ -78,7 +78,7 @@ public: query_epoch, query_epoch, RemoteReservationCanceled()); - case TOOFULL: + case REVOKE_TOOFULL: return new PGPeeringEvent( query_epoch, query_epoch, @@ -125,8 +125,8 @@ public: case RELEASE: out << "RELEASE"; break; - case TOOFULL: - out << "TOOFULL"; + case REVOKE_TOOFULL: + out << "REVOKE_TOOFULL"; break; case REVOKE: out << "REVOKE"; @@ -159,7 +159,7 @@ public: header.compat_version = 3; encode(pgid.pgid, payload); encode(query_epoch, payload); - encode((type == RELEASE || type == TOOFULL || type == REVOKE) ? + encode((type == RELEASE || type == REVOKE_TOOFULL || type == REVOKE) ? REJECT : type, payload); encode(priority, payload); encode(pgid.shard, payload); diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 2dceb067e6b65..3ea5596fbbe1a 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -8125,7 +8125,7 @@ PG::RecoveryState::RepRecovering::react(const BackfillTooFull &) pg->osd->send_message_osd_cluster( pg->primary.osd, new MBackfillReserve( - MBackfillReserve::TOOFULL, + MBackfillReserve::REVOKE_TOOFULL, spg_t(pg->info.pgid.pgid, pg->primary.shard), pg->get_osdmap_epoch()), pg->get_osdmap_epoch()); -- 2.39.5