Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osd: fix to recover adjacent clone when set_chunk is called #42279

Merged
merged 1 commit into from Jul 14, 2021

Conversation

myoungwon
Copy link
Member

@myoungwon myoungwon commented Jul 12, 2021

set_chunk needs adjacent clones to calculate reference count.
Therefore, check if adjacent clones is unreadable even if
the head object is not manifest object.

fixes: https://tracker.ceph.com/issues/51627

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

src/osd/PrimaryLogPG.cc Outdated Show resolved Hide resolved
Copy link
Contributor

@tchaikov tchaikov left a comment

Choose a reason for hiding this comment

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

@myoungwon thank you for the quick fix.

@@ -3445,7 +3445,18 @@ int PrimaryLogPG::get_manifest_ref_count(ObjectContextRef obc, std::string& fp_o

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

Choose a reason for hiding this comment

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

might want to move the definition of has_manifest_op closer to where it is set.

set_chunk needs adjacent clones to calculate reference count

fixes: https://tracker.ceph.com/issues/51627

Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
@myoungwon
Copy link
Member Author

@tchaikov Thanks for your comment. Done.

@tchaikov tchaikov merged commit 30291c0 into ceph:master Jul 14, 2021
@neha-ojha
Copy link
Member

@myoungwon do we need to backport this fix to pacific?

@myoungwon
Copy link
Member Author

@neha-ojha Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants