]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crimson/osd: PG::repair_object() doesn't depend on MOSDOp anymore.
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 23 Mar 2021 20:45:17 +0000 (20:45 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Mon, 10 May 2021 16:01:32 +0000 (18:01 +0200)
commit21e31280cfd1fe2e110b82b7c8a5e4dfde729bd9
treeeafbbfcd1c4cdfaf70042e2f8383341942098288
parentdd6dec306cea6860b284e5e4feafd43f8b4e8854
crimson/osd: PG::repair_object() doesn't depend on MOSDOp anymore.

Before this commit the method was depending on `MOSDOp::get_min_epoch()`
to start an `UrgentRecovery`. However, it seems `PG::get_osdmap_epoch()`
would be sufficient here as the very early stages of the processing
in `ClientRequest` ensure the PG fits the `get_min_epoch()` requirement.

In the classical OSD the counterpart code looks like below:

```
int PrimaryLogPG::rep_repair_primary_object(const hobject_t& soid, OpContext *ctx)
{
  // ...
  queue_peering_event(
      PGPeeringEventRef(
        std::make_shared<PGPeeringEvent>(
        get_osdmap_epoch(),
        get_osdmap_epoch(),
        PeeringState::DoRecovery())));

  return -EAGAIN;
}
```

In addition to the dependency minimalisation, the commits reformats
the code around `PG::repair_object()` to fit our guidelines.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/osd/pg.cc
src/crimson/osd/pg.h