From d548431a388da1130564d710e1f006772934224b Mon Sep 17 00:00:00 2001 From: John Spray Date: Fri, 7 Nov 2014 11:34:43 +0000 Subject: [PATCH] tools: fix MDS journal import 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 (cherry picked from commit fb29e71f9a97c12354045ad2e128156e503be696) --- src/mds/Dumper.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mds/Dumper.cc b/src/mds/Dumper.cc index 4e5f28e47198e..a1b393ec693ea 100644 --- a/src/mds/Dumper.cc +++ b/src/mds/Dumper.cc @@ -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; -- 2.39.5