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/PG: fix possible overflow on unfound objects #12669

Merged
merged 1 commit into from May 2, 2017

Conversation

Projects
None yet
5 participants
@hjwsm1989
Contributor

hjwsm1989 commented Dec 26, 2016

Signed-off-by: huangjun hjwsm1989@gmail.com

@@ -596,11 +596,12 @@ bool PG::MissingLoc::add_source_info(
void PG::discover_all_missing(map<int, map<spg_t,pg_query_t> > &query_map)
{
auto &missing = pg_log.get_missing();
assert(have_unfound());
uint64_t unfound = get_num_unfound();
assert(unfound > 0);

This comment has been minimized.

@liewegas

liewegas Dec 26, 2016

Member

the assert isn't needed if it's unsigned

This comment has been minimized.

@xiexingguo

xiexingguo Dec 27, 2016

Member

It seems the original logic will confirm we have at least one unfound object here..

This comment has been minimized.

@hjwsm1989

hjwsm1989 Dec 27, 2016

Contributor

yes, there must at least one unfound object.
and dont need to call get_num_unfound() again in next dout()

This comment has been minimized.

@hjwsm1989

hjwsm1989 Dec 28, 2016

Contributor

@xiexingguo did this change the origin logic?

This comment has been minimized.

@xiexingguo

xiexingguo Dec 28, 2016

Member

Don't think so. looks good.

This comment has been minimized.

@liewegas

liewegas May 1, 2017

Member

nevermind; i was thinking this was >= 0.

@liewegas

otherwise lgtm!

@badone badone changed the title from osd/PG: fix possiable overflow on unfound objects to osd/PG: fix possible overflow on unfound objects Dec 26, 2016

@badone

This comment has been minimized.

Contributor

badone commented Dec 26, 2016

s/possiable/possible/ in your commit message?

osd/PG: fix possible overflow on unfound objects
  Signed-off-by: huangjun <hjwsm1989@gmail.com>
@hjwsm1989

This comment has been minimized.

Contributor

hjwsm1989 commented Dec 28, 2016

@badone updated

@hjwsm1989

This comment has been minimized.

Contributor

hjwsm1989 commented Dec 29, 2016

retest this please

@tchaikov tchaikov added the needs-qa label Apr 29, 2017

@liewegas liewegas changed the title from osd/PG: fix possible overflow on unfound objects to osd/PG: fix possible overflow on unfound objects May 2, 2017

@liewegas liewegas merged commit 94a8730 into ceph:master May 2, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment