]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
src: balance std::hex and std::dec manipulators 22287/head
authorKefu Chai <kchai@redhat.com>
Tue, 29 May 2018 03:01:43 +0000 (11:01 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 29 May 2018 17:50:39 +0000 (01:50 +0800)
we're caching the "t_os.streambuf", so the fmtflags persist across
log entries. to avoid this side effects, we should do the cleanup
before finishing each log entry.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/auth/cephx/CephxClientHandler.cc
src/client/Client.cc
src/mds/Locker.cc
src/mgr/DaemonServer.cc
src/mon/OSDMonitor.cc
src/os/bluestore/BlueStore.cc
src/osd/PrimaryLogPG.cc
src/tools/rbd_nbd/rbd-nbd.cc

index 29d9aeb672ea5e801cfcb43954f77c4e0e43937e..88eec0b2a41bc18c57c1eca1ab1cde631f92f9b4 100644 (file)
@@ -72,7 +72,7 @@ int CephxClientHandler::build_request(bufferlist& bl) const
     encode(req, bl);
 
     ldout(cct, 10) << "get auth session key: client_challenge "
-                  << hex << req.client_challenge << dendl;
+                  << std::hex << req.client_challenge << std::dec << dendl;
     return 0;
   }
 
@@ -120,7 +120,7 @@ int CephxClientHandler::handle_response(int ret, bufferlist::const_iterator& ind
     decode(ch, indata);
     server_challenge = ch.server_challenge;
     ldout(cct, 10) << " got initial server challenge "
-                  << hex << server_challenge << dendl;
+                  << std::hex << server_challenge << std::dec << dendl;
     starting = false;
 
     tickets.invalidate_ticket(CEPH_ENTITY_TYPE_AUTH);
index 7344af071110ff2b2121c7fe6e4c0a73e773fc43..2f1ee6a34d0329c5f3b3a22ecef0de4bb5b54136 100644 (file)
@@ -664,7 +664,8 @@ void Client::trim_cache_for_reconnect(MetaSession *s)
 void Client::trim_dentry(Dentry *dn)
 {
   ldout(cct, 15) << "trim_dentry unlinking dn " << dn->name 
-                << " in dir " << hex << dn->dir->parent_inode->ino 
+                << " in dir "
+                << std::hex << dn->dir->parent_inode->ino << std::dec
                 << dendl;
   if (dn->inode) {
     Inode *diri = dn->dir->parent_inode;
index 798215defa25e48286258339dcd7ad9b2d00a98c..c71ea12bd683dbebc711217bf6b323c10ffbcc97 100644 (file)
@@ -2659,7 +2659,7 @@ void Locker::handle_client_caps(MClientCaps *m)
          << " on " << m->get_ino()
          << " tid " << m->get_client_tid() << " follows " << follows
          << " op " << ceph_cap_op_name(m->get_op())
-         << " flags 0x" << hex << m->flags << dendl;
+         << " flags 0x" << std::hex << m->flags << std::dec << dendl;
 
   Session *session = mds->get_session(m);
   if (!mds->is_clientreplay() && !mds->is_active() && !mds->is_stopping()) {
index 8337b34d90d1fdeb4c735fb907ecfadd3b685180..d976761542bc0e257f26d5a385aef1d4f530f0c0 100644 (file)
@@ -1837,7 +1837,8 @@ void DaemonServer::send_report()
           if (!collector) {
             derr << __func__ << " " << key.first << "." << key.second
                 << " sent me an unknown health metric: "
-                << hex << static_cast<uint8_t>(metric.get_type()) << dendl;
+                << std::hex << static_cast<uint8_t>(metric.get_type())
+                << std::dec << dendl;
             continue;
           }
          dout(20) << " + " << state->key << " "
index f25934cbea2f980977c7f6e6c30cef69946e208a..6eae84302dc165544f73a1f38e683beffd46a47d 100644 (file)
@@ -3362,7 +3362,8 @@ MOSDMap *OSDMonitor::build_latest_full(uint64_t features)
 
 MOSDMap *OSDMonitor::build_incremental(epoch_t from, epoch_t to, uint64_t features)
 {
-  dout(10) << "build_incremental [" << from << ".." << to << "] with features " << std::hex << features << dendl;
+  dout(10) << "build_incremental [" << from << ".." << to << "] with features "
+          << std::hex << features << std::dec << dendl;
   MOSDMap *m = new MOSDMap(mon->monmap->fsid, features);
   m->oldest_map = get_first_committed();
   m->newest_map = osdmap.get_epoch();
index ba766128b44353ef1c638cec1383919813ca649c..3642fe54a5e87cc4b5fce265af318e302dad00ea 100644 (file)
@@ -6119,7 +6119,7 @@ int BlueStore::_fsck(bool deep, bool repair)
        if (i.second & blob.unused) {
          derr << "fsck error: " << oid << " blob claims unused 0x"
               << std::hex << blob.unused
-              << " but extents reference 0x" << i.second
+              << " but extents reference 0x" << i.second << std::dec
               << " on blob " << *i.first << dendl;
          ++errors;
        }
@@ -6603,7 +6603,7 @@ int BlueStore::_fsck(bool deep, bool repair)
              // since we will never allocate this region below min_alloc_size.
              dout(10) << __func__ << " ignoring free extent between SUPER_RESERVED"
                       << " and min_alloc_size, 0x" << std::hex << offset << "~"
-                      << length << dendl;
+                      << length << std::dec << dendl;
            } else {
               intersects = true;
              if (repair) {
index a899de1b4f42e37369558b35ffed696f1d8d23a3..fcb0cdf22a0f09502e80b92b4fc9e897372d4d46 100644 (file)
@@ -1300,7 +1300,8 @@ void PrimaryLogPG::do_pg_op(OpRequestRef op)
          }
 
           dout(10) << " pgnls candidate 0x" << std::hex << candidate.get_hash()
-            << " vs lower bound 0x" << lower_bound.get_hash() << dendl;
+                  << " vs lower bound 0x" << lower_bound.get_hash()
+                  << std::dec << dendl;
 
          if (candidate >= next) {
            break;
index 16e408b4c1d128ff4e65d4df25ae9f5ce2b98687..403136b4a971d5c773dd4cd84a11c9c72b392dc0 100644 (file)
@@ -453,7 +453,7 @@ std::ostream &operator<<(std::ostream &os, const NBDServer::IOContext &ctx) {
   }
 
   os << ctx.request.from << "~" << ctx.request.len << " "
-     << ntohl(ctx.reply.error) << "]";
+     << std::dec << ntohl(ctx.reply.error) << "]";
 
   return os;
 }