]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: fix counter of l_bluestore_write_big_bytes
authorxie xingguo <xie.xingguo@zte.com.cn>
Thu, 6 Oct 2016 08:44:30 +0000 (16:44 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Thu, 6 Oct 2016 08:44:30 +0000 (16:44 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/BlueStore.cc

index cff11c5e0f847f0c93c4c5e00e4e3ae9831af07c..6f68436181e4967e5d60f40c78d26d419518a9dc 100644 (file)
@@ -7453,9 +7453,11 @@ void BlueStore::_do_write_big(
     WriteContext *wctx)
 {
   dout(10) << __func__ << " 0x" << std::hex << offset << "~" << length
-          << " target_blob_size 0x" << wctx->target_blob_size
+          << " target_blob_size 0x" << wctx->target_blob_size << std::dec
           << " compress " << (int)wctx->compress
-          << std::dec << dendl;
+          << dendl;
+  logger->inc(l_bluestore_write_big);
+  logger->inc(l_bluestore_write_big_bytes, length);
   while (length > 0) {
     BlobRef b = c->new_blob();
     auto l = MIN(wctx->target_blob_size, length);
@@ -7471,8 +7473,6 @@ void BlueStore::_do_write_big(
     length -= l;
     logger->inc(l_bluestore_write_big_blobs);
   }
-  logger->inc(l_bluestore_write_big);
-  logger->inc(l_bluestore_write_big_bytes, length);
 }
 
 int BlueStore::_do_alloc_write(