]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
cephfs-journal-tool: get and check layout info during dump/undump
authorGu Zhongyan <guzhongyan@360.cn>
Wed, 23 May 2018 10:41:34 +0000 (18:41 +0800)
committerGu Zhongyan <guzhongyan@360.cn>
Mon, 2 Jul 2018 04:15:00 +0000 (12:15 +0800)
commit989ecf234a24c53884cf202de588692a17ccec2a
tree9cc222114e241bd6ad1200d0cc33f96209d0ae36
parent505e29c07251528dfe4dff0e72f9dd2318ab657f
cephfs-journal-tool: get and check layout info during dump/undump

when cephfs-journal-tool import journal, it uses default layout
to get object_size, this is wrong. Because default objetct_size
can be changed by Config option change mds_log_segment_size when
cluster initialized.

The fix is save the layout info to header during journal export,
When improt journal, first try to get layout from cluster, if failed,
then get layout info from dumped journal file, if still failed, set
layout to default.

Fixes: http://tracker.ceph.com/issues/24644
Signed-off-by: Gu Zhongyan <guzhongyan@360.cn>
Signed-off-by: yupeng chen chenyupeng-it@360.cn
src/tools/cephfs/Dumper.cc