mirror of
https://github.com/ceph/ceph
synced 2025-03-05 15:58:41 +00:00
Merge pull request #15313 from Linbing/wip-pg-scrub-code-optimize
mon: it's no need to get pg action_primary osd twice in pg scrub Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
commit
43a58ec2a2
@ -990,12 +990,12 @@ bool PGMonitor::preprocess_command(MonOpRequestRef op)
|
||||
r = -ENOENT;
|
||||
goto reply;
|
||||
}
|
||||
if (pg_map.pg_stat[pgid].acting_primary == -1) {
|
||||
int osd = pg_map.pg_stat[pgid].acting_primary;
|
||||
if (osd == -1) {
|
||||
ss << "pg " << pgid << " has no primary osd";
|
||||
r = -EAGAIN;
|
||||
goto reply;
|
||||
}
|
||||
int osd = pg_map.pg_stat[pgid].acting_primary;
|
||||
if (!mon->osdmon()->osdmap.is_up(osd)) {
|
||||
ss << "pg " << pgid << " primary osd." << osd << " not up";
|
||||
r = -EAGAIN;
|
||||
|
Loading…
Reference in New Issue
Block a user