Skip to content

cephfs-journal-tool: Fix purging when importing an zero-length journal. - #22144

Merged
batrick merged 1 commit into
ceph:masterfrom
chenyupeng360:fix_cephfs_journal_tool
Jul 10, 2018
Merged

batrick merged 1 commit into
ceph:masterfrom
chenyupeng360:fix_cephfs_journal_tool

Conversation

@chenyupeng360

@chenyupeng360 chenyupeng360 commented May 22, 2018 •

Copy link
Copy Markdown
Contributor

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 [email protected]
Signed-off-by: zhongyan gu [email protected]

@batrick batrick added cephfs Ceph File System needs-review labels May 22, 2018

@batrick batrick left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please create an issue in the Ceph tracker (tracker.ceph.com) so this can be backported. Then annotate your commit message that it Fixes: https://tracker.ceph.com/....

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 <[email protected]>
Signed-off-by: zhongyan gu <[email protected]>
@chenyupeng360
chenyupeng360 force-pushed the fix_cephfs_journal_tool branch from 00ed2f5 to b6c68dd Compare May 23, 2018 02:41
@chenyupeng360

Copy link
Copy Markdown
Contributor Author

@batrick Done.

@batrick

batrick commented Jun 29, 2018

Copy link
Copy Markdown
Member

retest this please

@batrick
batrick merged commit b6c68dd into ceph:master Jul 10, 2018
batrick added a commit that referenced this pull request Jul 10, 2018
* refs/pull/22144/head:
	cephfs-journal-tool: Fix purging when importing an zero-length journal.

Reviewed-by: Patrick Donnelly <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants