]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/osd, osd: build and link ECCommon
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 17 Jul 2025 14:25:28 +0000 (14:25 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Mon, 26 Jan 2026 23:56:47 +0000 (23:56 +0000)
The modifications of the code shared with the classical OSD boil
down to just adding some `WITH_CRIMSON` guards; nothing more.

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

index 4fdcb4bba32ab5bc90448938c12dab6391129609..7cecc53c36e8e2cde602fbe640160db3995839a4 100644 (file)
@@ -46,6 +46,8 @@ add_executable(crimson-osd
   objclass.cc
   ${PROJECT_SOURCE_DIR}/src/objclass/class_api.cc
   ${PROJECT_SOURCE_DIR}/src/osd/ClassHandler.cc
+  ${PROJECT_SOURCE_DIR}/src/osd/ECCommon.cc
+  ${PROJECT_SOURCE_DIR}/src/osd/ECExtentCache.cc
   ${PROJECT_SOURCE_DIR}/src/osd/ECUtil.cc
   ${PROJECT_SOURCE_DIR}/src/osd/ECUtilL.cc
   ${PROJECT_SOURCE_DIR}/src/osd/osd_op_util.cc
index c2782b2dc42f406c42cedddca141bc2454706e2b..5baa3f4c1097e5df12f19d705f4c2cab214b2729 100644 (file)
@@ -158,11 +158,13 @@ void ECCommon::ReadPipeline::get_all_avail_shards(
       continue;
     }
     const shard_id_t &shard = pg_shard.shard;
+#ifndef WITH_CRIMSON
     if (cct->_conf->bluestore_debug_inject_read_err &&
       ECInject::test_read_error1(ghobject_t(hoid, ghobject_t::NO_GEN, shard))) {
       dout(0) << __func__ << " Error inject - Missing shard " << shard << dendl;
       continue;
     }
+#endif
     if (!missing.is_missing(hoid)) {
       ceph_assert(!have.contains(shard));
       have.insert(shard);
@@ -923,12 +925,14 @@ void ECCommon::RMWPipeline::cache_ready(Op &op) {
     if (pg_shard == get_parent()->whoami_shard()) {
       should_write_local = true;
       local_write_op.claim(sop);
+#ifndef WITH_CRIMSON
     } else if (cct->_conf->bluestore_debug_inject_read_err &&
       ECInject::test_write_error1(ghobject_t(op.hoid,
                                              ghobject_t::NO_GEN,
                                              pg_shard.shard))) {
       dout(0) << " Error inject - Dropping write message to shard " <<
           pg_shard.shard << dendl;
+#endif
     } else {
       auto *r = new MOSDECSubOpWrite(sop);
       r->pgid = spg_t(get_parent()->primary_spg_t().pgid, pg_shard.shard);
index d98ac2cb49995c9eb4a29ab412c978e02328a0a6..71ba102289da8ca84d5ab239d240e138bf85853a 100644 (file)
@@ -788,7 +788,11 @@ struct ECCommon {
             << " missing_on_shards=" << missing_on_shards
             << " recovery_info=" << recovery_info
             << " recovery_progress=" << recovery_progress
+#ifndef WITH_CRIMSON
             << " obc refcount=" << obc.use_count()
+#else
+            << " obc refcount=" << obc->get_use_count()
+#endif
             << " state=" << ECCommon::RecoveryBackend::RecoveryOp::tostr(state)
             << " waiting_on_pushes=" << waiting_on_pushes
             << ")";