From: Kefu Chai Date: Sun, 7 Feb 2021 04:24:21 +0000 (+0800) Subject: crimson/osd: rename PG::rep_repair_primary_object() to repair_object() X-Git-Tag: v17.1.0~3020^2~10 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=28712f215dc6db97c6927cd4e51c39e3b3159962;p=ceph.git crimson/osd: rename PG::rep_repair_primary_object() to repair_object() as we should expose the internals using the name of interface, and there is no need to differentiate rep_repair_primary_object() from another repair method. Signed-off-by: Kefu Chai --- diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc index 353db16da567..145293565b38 100644 --- a/src/crimson/osd/pg.cc +++ b/src/crimson/osd/pg.cc @@ -683,11 +683,12 @@ seastar::future> PG::handle_failed_op( }, load_obc_ertr::assert_all{ "can't live with object state messed up" }); } -seastar::future<> PG::rep_repair_primary_object( +seastar::future<> PG::repair_object( Ref m, const hobject_t& oid, eversion_t& v) { + // see also PrimaryLogPG::rep_repair_primary_object() assert(is_primary()); logger().debug("{}: {} peers osd.{}", __func__, oid, get_acting_recovery_backfill()); // Add object to PG's missing set if it isn't there already @@ -777,7 +778,7 @@ PG::do_osd_ops( }, crimson::ct_error::object_corrupted::handle([m, obc, this] () { - return rep_repair_primary_object(m, obc->obs.oi.soid, obc->obs.oi.version).then([]() -> PG::do_osd_ops_ertr::future> { + return repair_object(m, obc->obs.oi.soid, obc->obs.oi.version).then([]() -> PG::do_osd_ops_ertr::future> { return crimson::ct_error::eagain::make(); }); }), OpsExecuter::osd_op_errorator::all_same_way([ox = std::move(ox), diff --git a/src/crimson/osd/pg.h b/src/crimson/osd/pg.h index 4fa5c27380c7..38fb3613aecc 100644 --- a/src/crimson/osd/pg.h +++ b/src/crimson/osd/pg.h @@ -539,7 +539,7 @@ private: ObjectContextRef&& obc, ceph::os::Transaction&& txn, const osd_op_params_t& oop); - seastar::future<> rep_repair_primary_object(Ref m, + seastar::future<> repair_object(Ref m, const hobject_t& oid, eversion_t& v);