]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tools: fix MDS journal import 2879/head
authorJohn Spray <john.spray@redhat.com>
Fri, 7 Nov 2014 11:34:43 +0000 (11:34 +0000)
committerJohn Spray <john.spray@redhat.com>
Fri, 7 Nov 2014 14:42:54 +0000 (14:42 +0000)
Previously it only worked on fresh filesystems which
hadn't been trimmed yet, and resulted in an invalid
trimmed_pos when expire_pos wasn't on an object
boundary.

Fixes: #10025
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit fb29e71f9a97c12354045ad2e128156e503be696)

src/tools/cephfs/Dumper.cc

index fb9a43f76de86142cbe3b9bc0bc78dd79548ed2d..8ee3cdc0b4358a371bbed8b9410c5c2577d0a832 100644 (file)
@@ -159,7 +159,7 @@ void Dumper::undump(const char *dump_file)
   cout << "start " << start << " len " << len << std::endl;
   
   Journaler::Header h;
-  h.trimmed_pos = start;
+  h.trimmed_pos = start - (start % g_default_file_layout.fl_object_size);
   h.expire_pos = start;
   h.write_pos = write_pos;
   h.stream_format = format;