mirror of
https://github.com/ceph/ceph
synced 2024-12-18 01:16:55 +00:00
mon: it's no need to get pg action_primary osd twice in pg scrub
Signed-off-by: linbing <linbing@t2cloud.net>
This commit is contained in:
parent
e3319da51d
commit
730781afec
@ -1000,12 +1000,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