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 <john.spray@redhat.com>
This commit is contained in:
John Spray 2014-11-07 11:34:43 +00:00
parent 29d7786e03
commit fb29e71f9a

View 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;