]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/PGMonitor: move fsid check ahead
authorxie xingguo <xie.xingguo@zte.com.cn>
Tue, 31 May 2016 02:22:18 +0000 (10:22 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Fri, 3 Jun 2016 09:45:51 +0000 (17:45 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/mon/PGMonitor.cc

index 68f8a71e3223a7952910bb9f383b228e34bacd7b..3b88258bd4007affe5dcaca547a7fe916e118713 100644 (file)
@@ -621,17 +621,20 @@ void PGMonitor::handle_statfs(MonOpRequestRef op)
             << session->caps << dendl;
     return;
   }
-  MStatfsReply *reply;
-
-  dout(10) << "handle_statfs " << *statfs << " from " << statfs->get_orig_source() << dendl;
 
   if (statfs->fsid != mon->monmap->fsid) {
-    dout(0) << "handle_statfs on fsid " << statfs->fsid << " != " << mon->monmap->fsid << dendl;
+    dout(0) << "handle_statfs on fsid " << statfs->fsid
+            << " != " << mon->monmap->fsid << dendl;
     return;
   }
 
+
+  dout(10) << "handle_statfs " << *statfs
+           << " from " << statfs->get_orig_source() << dendl;
+
   // fill out stfs
-  reply = new MStatfsReply(mon->monmap->fsid, statfs->get_tid(), get_last_committed());
+  MStatfsReply *reply = new MStatfsReply(mon->monmap->fsid, statfs->get_tid(),
+    get_last_committed());
 
   // these are in KB.
   reply->h.st.kb = pg_map.osd_sum.kb;