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: add new have_unfound() function in MissingLoc #12668

Merged
merged 1 commit into from Dec 27, 2016

Conversation

Projects
None yet
3 participants
@hjwsm1989
Contributor

hjwsm1989 commented Dec 26, 2016

      No need to lookup all objects in needs_recovery_map if only want to
      know whether if there are unfound objects.

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

osd/PG: add new have_unfound() function in MissingLoc
          No need to lookup all objects in needs_recovery_map if only want to
          know whether if there are unfound objects.

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

@liewegas liewegas added the needs-qa label Dec 26, 2016

@@ -376,6 +376,16 @@ class PG : protected DoutPrefixProvider {
return ret;
}
bool have_unfound() const {
for (map<hobject_t, pg_missing_item, hobject_t::BitwiseComparator>::const_iterator i =

This comment has been minimized.

@tchaikov

tchaikov Dec 27, 2016

Contributor

could also use range-based loop and auto , like

for (const auto& i : needs_recovery_map) {
  if (is_unfound(i.first))
    return true;
}
return false;

@liewegas liewegas changed the title from osd/PG: add new have_unfound() function in MissingLoc to osd/PG: add new have_unfound() function in MissingLoc Dec 27, 2016

@liewegas liewegas merged commit 56b0496 into ceph:master Dec 27, 2016

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

@hjwsm1989 hjwsm1989 deleted the hjwsm1989:pg-unfound branch Dec 28, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment