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

mon/OSDMonitor: remove trivial PGMap dependency for 'osd primary-temp' command #13616

Merged
merged 1 commit into from Feb 23, 2017

Conversation

Projects
None yet
2 participants
@liewegas
Member

liewegas commented Feb 23, 2017

Signed-off-by: Sage Weil sage@redhat.com

mon/OSDMonitor: remove trivial PGMap dependency for 'osd primary-temp…
…' command

Signed-off-by: Sage Weil <sage@redhat.com>

@liewegas liewegas requested a review from gregsfortytwo Feb 23, 2017

@@ -6813,8 +6813,7 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op,
err = -EINVAL;
goto reply;
}
PGMap& pg_map = mon->pgmon()->pg_map;
if (!pg_map.pg_stat.count(pgid)) {
if (!osdmap.pg_exists(pgid)) {

This comment has been minimized.

@gregsfortytwo

gregsfortytwo Feb 23, 2017

Member

These function differently — pg_exists just check's whether it's logically present based on pool and pg_num, but pg_stat looks at whether it's been included in a pgstat message.
I presume that's okay and won't bust something if it's run while the PG is being created?

@liewegas

This comment has been minimized.

Member

liewegas commented Feb 23, 2017

@gregsfortytwo

Reviewed-by: Greg Farnum gfarnum@redhat.com

@liewegas liewegas added the needs-qa label Feb 23, 2017

@gregsfortytwo gregsfortytwo merged commit 8827efa into ceph:master Feb 23, 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