From 6ec07190da01ba50443d15ea2b3f8ab36ea5b2fa Mon Sep 17 00:00:00 2001 From: letterwuyu Date: Sun, 5 May 2019 14:24:39 +0800 Subject: [PATCH] osd: using SERVER_OCTOPUS everywhere Signed-off-by: lishuhao --- src/osd/ReplicatedBackend.cc | 8 ++++---- src/osd/osd_types.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/osd/ReplicatedBackend.cc b/src/osd/ReplicatedBackend.cc index 5956750bbd70b..1f8d0d33e3860 100644 --- a/src/osd/ReplicatedBackend.cc +++ b/src/osd/ReplicatedBackend.cc @@ -1143,7 +1143,7 @@ void ReplicatedBackend::calc_head_subsets( if (size) data_subset.insert(0, size); - if (HAVE_FEATURE(parent->min_peer_features(), SERVER_NAUTILUS)) { + if (HAVE_FEATURE(parent->min_peer_features(), SERVER_OCTOPUS)) { const auto it = missing.get_items().find(head); assert(it != missing.get_items().end()); data_subset.intersection_of(it->second.clean_regions.get_dirty_regions()); @@ -1382,7 +1382,7 @@ void ReplicatedBackend::prepare_pull( // pulling head or unversioned object. // always pull the whole thing. recovery_info.copy_subset.insert(0, (uint64_t)-1); - if (HAVE_FEATURE(parent->min_peer_features(), SERVER_NAUTILUS)) + if (HAVE_FEATURE(parent->min_peer_features(), SERVER_OCTOPUS)) recovery_info.copy_subset.intersection_of(missing_iter->second.clean_regions.get_dirty_regions()); recovery_info.size = ((uint64_t)-1); recovery_info.object_exist = missing_iter->second.clean_regions.object_is_exist(); @@ -1397,7 +1397,7 @@ void ReplicatedBackend::prepare_pull( op.recovery_info.version = v; op.recovery_progress.data_complete = false; op.recovery_progress.omap_complete = !missing_iter->second.clean_regions.omap_is_dirty() - && HAVE_FEATURE(parent->min_peer_features(), SERVER_NAUTILUS); + && HAVE_FEATURE(parent->min_peer_features(), SERVER_OCTOPUS); op.recovery_progress.data_recovered_to = 0; op.recovery_progress.first = true; @@ -1525,7 +1525,7 @@ int ReplicatedBackend::prep_push( pi.recovery_info.version = version; pi.recovery_info.object_exist = missing_iter->second.clean_regions.object_is_exist(); pi.recovery_progress.omap_complete = !missing_iter->second.clean_regions.omap_is_dirty() && - HAVE_FEATURE(parent->min_peer_features(), SERVER_NAUTILUS); + HAVE_FEATURE(parent->min_peer_features(), SERVER_OCTOPUS); pi.lock_manager = std::move(lock_manager); ObjectRecoveryProgress new_progress; diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h index 8f42b4c3ecc8f..f115b2f8da029 100644 --- a/src/osd/osd_types.h +++ b/src/osd/osd_types.h @@ -4221,15 +4221,15 @@ struct pg_missing_item { void encode(ceph::buffer::list& bl, uint64_t features) const { using ceph::encode; // encoding a zeroed eversion_t to differentiate between OSD_RECOVERY_DELETES、 - // SERVER_NAUTILUS and legacy unversioned encoding - a need value of 0'0 is not + // SERVER_OCTOPUS and legacy unversioned encoding - a need value of 0'0 is not // possible. This can be replaced with the legacy encoding bool have_recovery_deletes = HAVE_FEATURE(features, OSD_RECOVERY_DELETES); - bool have_server_nautilus = HAVE_FEATURE(features, SERVER_NAUTILUS); + bool have_server_octopus = HAVE_FEATURE(features, SERVER_OCTOPUS); if (have_recovery_deletes) encode(eversion_t(), bl); - if (have_server_nautilus) + if (have_server_octopus) encode(eversion_t(-1, -1), bl); encode(need, bl); @@ -4237,7 +4237,7 @@ struct pg_missing_item { if (have_recovery_deletes) encode(static_cast(flags), bl); - if (have_server_nautilus) + if (have_server_octopus) encode(clean_regions, bl); } void decode(ceph::buffer::list::const_iterator& bl) { -- 2.47.3