]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tools: fix MDS journal import 2880/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:43:38 +0000 (14:43 +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/mds/Dumper.cc

index 4e5f28e47198e837f22e9e3d47e9e56cc7d5ec63..a1b393ec693ea17a623ca228fb896bdd2c77fa82 100644 (file)
@@ -160,7 +160,7 @@ void Dumper::undump(const char *dump_file)
   inodeno_t ino = MDS_INO_LOG_OFFSET + rank;
 
   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 = start+len;
   h.magic = CEPH_FS_ONDISK_MAGIC;