From a5f352cc2242214312ae12d9dc7c4749f0113412 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 3 May 2011 14:01:42 -0700 Subject: [PATCH] osd: leave recovery hooks in PG Signed-off-by: Sage Weil --- src/osd/PG.h | 40 +++++++++++++++++++++++++++++----------- src/osd/ReplicatedPG.h | 28 ---------------------------- 2 files changed, 29 insertions(+), 39 deletions(-) diff --git a/src/osd/PG.h b/src/osd/PG.h index 90f611b475a59..803633badf8f5 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -1389,18 +1389,36 @@ public: bool acting_up_affected(OSDMap &osdmap, const OSDMap &lastmap); + // recovery bits + void handle_notify(int from, PG::Info& i, RecoveryCtx *rctx) { + recovery_state.handle_notify(from, i, rctx); + } + void handle_info(int from, PG::Info& i, RecoveryCtx *rctx) { + recovery_state.handle_info(from, i, rctx); + } + void handle_log(int from, + MOSDPGLog *msg, + RecoveryCtx *rctx) { + recovery_state.handle_log(from, msg, rctx); + } + void handle_query(int from, const PG::Query& q, RecoveryCtx *rctx) { + recovery_state.handle_query(from, q, rctx); + } + void handle_advance_map(OSDMap &osdmap, OSDMap &lastmap, + RecoveryCtx *rctx) { + recovery_state.handle_advance_map(osdmap, lastmap, rctx); + } + void handle_activate_map(RecoveryCtx *rctx) { + recovery_state.handle_activate_map(rctx); + } + void handle_backlog_generated(RecoveryCtx *rctx) { + recovery_state.handle_backlog_generated(rctx); + } + void handle_create(RecoveryCtx *rctx) { + recovery_state.handle_create(rctx); + } + // abstract bits - virtual void handle_notify(int from, PG::Info& i, RecoveryCtx *ctx) = 0; - virtual void handle_info(int from, PG::Info& i, RecoveryCtx *ctx) = 0; - virtual void handle_log(int from, - MOSDPGLog *msg, - RecoveryCtx *ctx) = 0; - virtual void handle_query(int from, const PG::Query& q, RecoveryCtx *ctx) = 0; - virtual void handle_advance_map(OSDMap &osdmap, OSDMap &lastmap, - RecoveryCtx *ctx) = 0; - virtual void handle_activate_map(RecoveryCtx *ctx) = 0; - virtual void handle_backlog_generated(RecoveryCtx *ctx) = 0; - virtual void handle_create(RecoveryCtx *ctx) = 0; virtual void do_op(MOSDOp *op) = 0; virtual void do_sub_op(MOSDSubOp *op) = 0; virtual void do_sub_op_reply(MOSDSubOpReply *op) = 0; diff --git a/src/osd/ReplicatedPG.h b/src/osd/ReplicatedPG.h index ef83da2331e09..cd60e4bf3adea 100644 --- a/src/osd/ReplicatedPG.h +++ b/src/osd/ReplicatedPG.h @@ -663,34 +663,6 @@ public: ~ReplicatedPG() {} - void handle_notify(int from, PG::Info& i, RecoveryCtx *rctx) { - recovery_state.handle_notify(from, i, rctx); - } - void handle_info(int from, PG::Info& i, RecoveryCtx *rctx) { - recovery_state.handle_info(from, i, rctx); - } - void handle_log(int from, - MOSDPGLog *msg, - RecoveryCtx *rctx) { - recovery_state.handle_log(from, msg, rctx); - } - void handle_query(int from, const PG::Query& q, RecoveryCtx *rctx) { - recovery_state.handle_query(from, q, rctx); - } - void handle_advance_map(OSDMap &osdmap, OSDMap &lastmap, - RecoveryCtx *rctx) { - recovery_state.handle_advance_map(osdmap, lastmap, rctx); - } - void handle_activate_map(RecoveryCtx *rctx) { - recovery_state.handle_activate_map(rctx); - } - void handle_backlog_generated(RecoveryCtx *rctx) { - recovery_state.handle_backlog_generated(rctx); - } - void handle_create(RecoveryCtx *rctx) { - recovery_state.handle_create(rctx); - } - void do_op(MOSDOp *op); void do_pg_op(MOSDOp *op); void do_sub_op(MOSDSubOp *op); -- 2.39.5