Skip to content

osd: recover unreadable snapshot before reading refcount info#40606

Merged
yuriw merged 1 commit intoceph:masterfrom
myoungwon:wip-49427-2
Apr 9, 2021
Merged

osd: recover unreadable snapshot before reading refcount info#40606
yuriw merged 1 commit intoceph:masterfrom
myoungwon:wip-49427-2

Conversation

@myoungwon
Copy link
Member

@myoungwon myoungwon commented Apr 6, 2021

Manifest objects need adjacent clones when incrementing/decrementing
refcount. This commit makes the current code to call get_manifest_ref_count
before reading ref. count info.

fixes: https://tracker.ceph.com/issues/49427#change-189520

Signed-off-by: Myoungwon Oh myoungwon.oh@samsung.com

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@neha-ojha
Copy link
Member

@myoungwon I created https://tracker.ceph.com/issues/50192 to track the issue this PR is fixing. This needs to be backported to pacific, right?

@myoungwon
Copy link
Member Author

@neha-ojha Right.

bool PrimaryLogPG::recover_adjacent_clones(ObjectContextRef obc, OpRequestRef op)
{
if (!obc->obs.oi.manifest.is_chunked() || !obc->ssc || !obc->ssc->snapset.clones.size()) {
if (!obc->obs.oi.manifest.is_chunked() || !obc->ssc || !obc->ssc->snapset.clones.size() || !op) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do any callers pass op as nullptr?

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

Manifest objects needs adjacent clones when incrementing/decrementing
refcount. This commit makes the current code to call get_manifest_ref_count
before reading ref. count info.

Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
@athanatos athanatos self-requested a review April 8, 2021 01:39
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.

5 participants