From 3bdf96c20858628bb71f4425edd558f0188bf692 Mon Sep 17 00:00:00 2001 From: Michal Jarzabek Date: Wed, 10 Aug 2016 21:21:28 +0100 Subject: [PATCH] mon/MDSMonitor: move C_Updated class to .cc file Signed-off-by: Michal Jarzabek --- src/mon/MDSMonitor.cc | 18 ++++++++++++++++++ src/mon/MDSMonitor.h | 18 ------------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index c72fd5a05a82..611a84bb7f85 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -480,6 +480,24 @@ bool MDSMonitor::prepare_update(MonOpRequestRef op) } +namespace { +class C_Updated : public Context { + MDSMonitor *mm; + MonOpRequestRef op; +public: + C_Updated(MDSMonitor *a, MonOpRequestRef c) : + mm(a), op(c) {} + void finish(int r) { + if (r >= 0) + mm->_updated(op); // success + else if (r == -ECANCELED) { + mm->mon->no_reply(op); + } else { + mm->dispatch(op); // try again + } + } +}; +} bool MDSMonitor::prepare_beacon(MonOpRequestRef op) { diff --git a/src/mon/MDSMonitor.h b/src/mon/MDSMonitor.h index 2c70aff24fda..ddd0569c026e 100644 --- a/src/mon/MDSMonitor.h +++ b/src/mon/MDSMonitor.h @@ -46,24 +46,6 @@ class MDSMonitor : public PaxosService { // my helpers void print_map(FSMap &m, int dbl=7); - - class C_Updated : public Context { - MDSMonitor *mm; - MonOpRequestRef op; - public: - C_Updated(MDSMonitor *a, MonOpRequestRef c) : - mm(a), op(c) {} - void finish(int r) { - if (r >= 0) - mm->_updated(op); // success - else if (r == -ECANCELED) { - mm->mon->no_reply(op); - } else { - mm->dispatch(op); // try again - } - } - }; - void create_new_fs(FSMap &m, const std::string &name, int metadata_pool, int data_pool); version_t get_trim_to(); -- 2.47.3