]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_filestore_dump: Improve debug output by showing actual offset
authorDavid Zafman <david.zafman@inktank.com>
Sat, 17 May 2014 01:20:11 +0000 (18:20 -0700)
committerDavid Zafman <dzafman@redhat.com>
Tue, 3 Mar 2015 17:51:29 +0000 (09:51 -0800)
Signed-off-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit 44b261d5d1b36528bfbcb37dbd866b615e14be99)

src/tools/ceph_filestore_dump.cc

index 6e0124b00ad90308bc21f7521b14116a61d863c3..a5ae6971de6fdc2b6fe169248580fe69680c8787 100644 (file)
@@ -620,12 +620,12 @@ int export_file(ObjectStore *store, coll_t cid, ghobject_t &obj)
       return -EINVAL;
 
     data_section dblock(offset, len, rawdatabl);
-    total -= ret;
-    offset += ret;
-
     if (debug)
       cerr << "data section offset=" << offset << " len=" << len << std::endl;
 
+    total -= ret;
+    offset += ret;
+
     ret = write_section(TYPE_DATA, dblock, file_fd);
     if (ret) return ret;
   }