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/PrimaryLogPG: maybe_handle_manifest_detail - sanity check obc existence #17298

Merged
merged 1 commit into from Sep 9, 2017

Conversation

xiexingguo
Copy link
Member

@xiexingguo xiexingguo commented Aug 28, 2017

Signed-off-by: xie xingguo xie.xingguo@zte.com.cn

@@ -2371,6 +2371,11 @@ PrimaryLogPG::cache_result_t PrimaryLogPG::maybe_handle_manifest_detail(
}
}

if (!obc || !obc->obs.oi.has_manifest()) {

Choose a reason for hiding this comment

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

How good it would be place this check at start of PrimaryLogPG::maybe_handle_manifest_detail

dout(10) << __func__ << " obc DNE or has no manifest" << dendl;
return cache_result_t::NOOP;
}

Copy link
Member

Choose a reason for hiding this comment

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

The caller only calls into handle_manifest of obc && obc->obs.oi.has_manifest(). Can we instead make this an assert at the top of the function, and remove teh various conditional checks for !obc? It will be simpler (this code was originally copy pasted from the cache case, which has to handle a missing object.. the manifest case does not!).

Thanks!

@xiexingguo xiexingguo force-pushed the wip-pg-null-obc-access branch 2 times, most recently from a46e9c8 to 56105b8 Compare August 30, 2017 06:15
…stence

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
@xiexingguo
Copy link
Member Author

retest this please

@liewegas liewegas merged commit f34821c into ceph:master Sep 9, 2017
@xiexingguo xiexingguo deleted the wip-pg-null-obc-access branch September 10, 2017 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants