]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MDSMonitor: rename labels to a better name
authorKefu Chai <kchai@redhat.com>
Wed, 3 Jun 2015 06:20:21 +0000 (23:20 -0700)
committerAbhishek Lekshmanan <abhishek.lekshmanan@ril.com>
Wed, 1 Jul 2015 17:56:51 +0000 (23:26 +0530)
* s/ignore/reply/
* s/out/ignore/

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit f00ecb8b3df73ce6337985bc6d43bce5143ee537)

src/mon/MDSMonitor.cc

index b9e28d284a0ec35f064229638e9f8341f5bc1013..a4f87371b0ce1806f4bfe1bfe2511523e5b2f4a0 100644 (file)
@@ -250,12 +250,12 @@ bool MDSMonitor::preprocess_beacon(MMDSBeacon *m)
   if (!session->is_capable("mds", MON_CAP_X)) {
     dout(0) << "preprocess_beacon got MMDSBeacon from entity with insufficient privileges "
            << session->caps << dendl;
-    goto out;
+    goto ignore;
   }
 
   if (m->get_fsid() != mon->monmap->fsid) {
     dout(0) << "preprocess_beacon on fsid " << m->get_fsid() << " != " << mon->monmap->fsid << dendl;
-    goto out;
+    goto ignore;
   }
 
   dout(12) << "preprocess_beacon " << *m
@@ -266,13 +266,13 @@ bool MDSMonitor::preprocess_beacon(MMDSBeacon *m)
   // make sure the address has a port
   if (m->get_orig_source_addr().get_port() == 0) {
     dout(1) << " ignoring boot message without a port" << dendl;
-    goto out;
+    goto ignore;
   }
 
   // check compat
   if (!m->get_compat().writeable(mdsmap.compat)) {
     dout(1) << " mds " << m->get_source_inst() << " can't write to mdsmap " << mdsmap.compat << dendl;
-    goto out;
+    goto ignore;
   }
 
   // fw to leader?
@@ -281,7 +281,7 @@ bool MDSMonitor::preprocess_beacon(MMDSBeacon *m)
 
   if (pending_mdsmap.test_flag(CEPH_MDSMAP_DOWN)) {
     dout(7) << " mdsmap DOWN flag set, ignoring mds " << m->get_source_inst() << " beacon" << dendl;
-    goto out;
+    goto ignore;
   }
 
   // booted, but not in map?
@@ -300,13 +300,13 @@ bool MDSMonitor::preprocess_beacon(MMDSBeacon *m)
   // old seq?
   if (info.state_seq > seq) {
     dout(7) << "mds_beacon " << *m << " has old seq, ignoring" << dendl;
-    goto out;
+    goto ignore;
   }
 
   if (mdsmap.get_epoch() != m->get_last_epoch_seen()) {
     dout(10) << "mds_beacon " << *m
             << " ignoring requested state, because mds hasn't seen latest map" << dendl;
-    goto ignore;
+    goto reply;
   }
 
   if (info.laggy()) {
@@ -315,7 +315,7 @@ bool MDSMonitor::preprocess_beacon(MMDSBeacon *m)
   }
   if (state == MDSMap::STATE_BOOT) {
     // ignore, already booted.
-    goto out;
+    goto ignore;
   }
   // is there a state change here?
   if (info.state != state) {    
@@ -325,7 +325,7 @@ bool MDSMonitor::preprocess_beacon(MMDSBeacon *m)
         info.state == MDSMap::STATE_ONESHOT_REPLAY) && state > 0) {
       dout(10) << "mds_beacon mds can't activate itself (" << ceph_mds_state_name(info.state)
               << " -> " << ceph_mds_state_name(state) << ")" << dendl;
-      goto ignore;
+      goto reply;
     }
     
     if (info.state == MDSMap::STATE_STANDBY &&
@@ -337,7 +337,7 @@ bool MDSMonitor::preprocess_beacon(MMDSBeacon *m)
       dout(10) << "mds_beacon can't standby-replay mds." << m->get_standby_for_rank() << " at this time (cluster degraded, or mds not active)" << dendl;
       dout(10) << "pending_mdsmap.is_degraded()==" << pending_mdsmap.is_degraded()
           << " rank state: " << ceph_mds_state_name(pending_mdsmap.get_state(m->get_standby_for_rank())) << dendl;
-      goto ignore;
+      goto reply;
     }
     _note_beacon(m);
     return false;  // need to update map
@@ -351,7 +351,7 @@ bool MDSMonitor::preprocess_beacon(MMDSBeacon *m)
     return false;
   }
 
ignore:
reply:
   // note time and reply
   _note_beacon(m);
   mon->send_reply(m,
@@ -360,7 +360,7 @@ bool MDSMonitor::preprocess_beacon(MMDSBeacon *m)
   m->put();
   return true;
 
out:
ignore:
   // I won't reply this beacon, drop it.
   mon->no_reply(m);
   m->put();