]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cephfs-journal-tool: Fix purging when importing an zero-length journal. 22980/head
authorchenyupeng360 <chenyupeng-it@360.cn>
Tue, 22 May 2018 04:34:51 +0000 (12:34 +0800)
committerJos Collin <jcollin@redhat.com>
Wed, 11 Jul 2018 06:08:45 +0000 (11:38 +0530)
commitc99f8b722e22093a8284afb4ed7dee5236d56e7e
tree65bbc5ee0dd928549dd2d987996cb67a8fa54263
parent7d38e15317b840f1c245357fa0395108a0ef5f5d
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>
(cherry picked from commit b6c68dd55272f9066d7b5cf2fa30ea44f7c36533)
src/tools/cephfs/Dumper.cc