From: Michal Jarzabek Date: Wed, 10 Aug 2016 20:21:28 +0000 (+0100) Subject: mon/MDSMonitor: move C_Updated class to .cc file X-Git-Tag: v11.0.1~346^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3bdf96c20858628bb71f4425edd558f0188bf692;p=ceph.git mon/MDSMonitor: move C_Updated class to .cc file Signed-off-by: Michal Jarzabek --- diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index c72fd5a05a8..611a84bb7f8 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 2c70aff24fd..ddd0569c026 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();