]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cephfs-journal-tool: get and check layout info during dump/undump 24033/head
authorGu Zhongyan <guzhongyan@360.cn>
Wed, 23 May 2018 10:41:34 +0000 (18:41 +0800)
committerNathan Cutler <ncutler@suse.com>
Tue, 11 Sep 2018 15:46:26 +0000 (17:46 +0200)
commitc030fe26f5519a86176139195bfdef6abd09fa76
tree38ba237ea047806a6a42aab8d646e30943e10fb0
parent45d17396a438b4036cecbd8b9b6f46dcc03e8c22
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
(cherry picked from commit 989ecf234a24c53884cf202de588692a17ccec2a)
src/tools/cephfs/Dumper.cc