]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cephfs-journal-tool: Fix purging when importing an zero-length journal. 22144/head
authorchenyupeng360 <chenyupeng-it@360.cn>
Tue, 22 May 2018 04:34:51 +0000 (12:34 +0800)
committerchenyupeng360 <chenyupeng-it@360.cn>
Wed, 23 May 2018 02:41:10 +0000 (10:41 +0800)
commitb6c68dd55272f9066d7b5cf2fa30ea44f7c36533
treeeedae80443dad05a8f35845b777126577742fb28
parent46904a8025cd79d98d059b3041759246bbdb91e0
cephfs-journal-tool: Fix purging when importing an zero-length journal.

When importing a zero-length purge_queue journal exported previously, the last object and
the following one are now being purged for removing potential junks. In this case,
there will be no writing performed actually, so the purged last object get lost permanently.

This can be fixed by purging the object following the last object, and by zeroing the last object
starting from the offset determined by the write_pos.

Fixes: https://tracker.ceph.com/issues/24239
Signed-off-by: yupeng chen <chenyupeng-it@360.cn>
Signed-off-by: zhongyan gu <guzhongyan@360.cn>
src/tools/cephfs/Dumper.cc