mirror of
https://github.com/ceph/ceph
synced 2025-03-25 11:48:05 +00:00
features,osd/: deprecate CEPH_FEATURE_OSD_REPOP feature bit
This allows us to rip out the code for supporting the old repop format. We can't actually reuse this bit until all 4 1<<46 bits are deprecated for one release. Signed-off-by: Samuel Just <sjust@redhat.com>
This commit is contained in:
parent
b0ba592986
commit
333e988627
@ -61,7 +61,7 @@
|
||||
#define CEPH_FEATURE_ERASURE_CODE_PLUGINS_V2 (1ULL<<44)
|
||||
#define DEPRECATED_CEPH_FEATURE_OSD_SET_ALLOC_HINT (1ULL<<45) // DEPRECATED: JEWEL
|
||||
#define CEPH_FEATURE_OSD_FADVISE_FLAGS (1ULL<<46)
|
||||
#define CEPH_FEATURE_OSD_REPOP (1ULL<<46) /* overlap with fadvise */
|
||||
#define DEPRECATED_CEPH_FEATURE_OSD_REPOP (1ULL<<46) // DEPRECATED: JEWEL (can't remove until all 1<<46 are ready)
|
||||
#define CEPH_FEATURE_OSD_OBJECT_DIGEST (1ULL<<46) /* overlap with fadvise */
|
||||
#define CEPH_FEATURE_OSD_TRANSACTION_MAY_LAYOUT (1ULL<<46) /* overlap w/ fadvise */
|
||||
#define CEPH_FEATURE_MDS_QUOTA (1ULL<<47)
|
||||
@ -162,7 +162,7 @@ static inline unsigned long long ceph_sanitize_features(unsigned long long f) {
|
||||
CEPH_FEATURE_ERASURE_CODE_PLUGINS_V2 | \
|
||||
DEPRECATED_CEPH_FEATURE_OSD_SET_ALLOC_HINT | \
|
||||
CEPH_FEATURE_OSD_FADVISE_FLAGS | \
|
||||
CEPH_FEATURE_OSD_REPOP | \
|
||||
DEPRECATED_CEPH_FEATURE_OSD_REPOP | \
|
||||
CEPH_FEATURE_OSD_OBJECT_DIGEST | \
|
||||
CEPH_FEATURE_OSD_TRANSACTION_MAY_LAYOUT | \
|
||||
CEPH_FEATURE_MDS_QUOTA | \
|
||||
|
@ -209,15 +209,11 @@ bool ReplicatedBackend::handle_message(
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
sub_op_modify_reply<MOSDSubOpReply, MSG_OSD_SUBOPREPLY>(op);
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case MSG_OSD_REPOPREPLY: {
|
||||
sub_op_modify_reply<MOSDRepOpReply, MSG_OSD_REPOPREPLY>(op);
|
||||
sub_op_modify_reply(op);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -668,13 +664,11 @@ void ReplicatedBackend::op_commit(
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T, int MSGTYPE>
|
||||
void ReplicatedBackend::sub_op_modify_reply(OpRequestRef op)
|
||||
{
|
||||
T *r = static_cast<T *>(op->get_req());
|
||||
MOSDRepOpReply *r = static_cast<MOSDRepOpReply *>(op->get_req());
|
||||
r->finish_decode();
|
||||
assert(r->get_header().type == MSGTYPE);
|
||||
assert(MSGTYPE == MSG_OSD_SUBOPREPLY || MSGTYPE == MSG_OSD_REPOPREPLY);
|
||||
assert(r->get_header().type == MSG_OSD_REPOPREPLY);
|
||||
|
||||
op->mark_started();
|
||||
|
||||
@ -982,7 +976,6 @@ void ReplicatedBackend::do_push_reply(OpRequestRef op)
|
||||
send_pushes(m->get_priority(), _replies);
|
||||
}
|
||||
|
||||
template<typename T, int MSGTYPE>
|
||||
Message * ReplicatedBackend::generate_subop(
|
||||
const hobject_t &soid,
|
||||
const eversion_t &at_version,
|
||||
@ -1000,9 +993,8 @@ Message * ReplicatedBackend::generate_subop(
|
||||
const pg_info_t &pinfo)
|
||||
{
|
||||
int acks_wanted = CEPH_OSD_FLAG_ACK | CEPH_OSD_FLAG_ONDISK;
|
||||
assert(MSGTYPE == MSG_OSD_SUBOP || MSGTYPE == MSG_OSD_REPOP);
|
||||
// forward the write/update/whatever
|
||||
T *wr = new T(
|
||||
MOSDRepOp *wr = new MOSDRepOp(
|
||||
reqid, parent->whoami_shard(),
|
||||
spg_t(get_info().pgid.pgid, peer.shard),
|
||||
soid, acks_wanted,
|
||||
@ -1071,41 +1063,21 @@ void ReplicatedBackend::issue_op(
|
||||
const pg_info_t &pinfo = parent->get_shard_info().find(peer)->second;
|
||||
|
||||
Message *wr;
|
||||
uint64_t min_features = parent->min_peer_features();
|
||||
if (!(min_features & CEPH_FEATURE_OSD_REPOP)) {
|
||||
dout(20) << "Talking to old version of OSD, doesn't support RepOp, fall back to SubOp" << dendl;
|
||||
wr = generate_subop<MOSDSubOp, MSG_OSD_SUBOP>(
|
||||
soid,
|
||||
at_version,
|
||||
tid,
|
||||
reqid,
|
||||
pg_trim_to,
|
||||
pg_trim_rollback_to,
|
||||
new_temp_oid,
|
||||
discard_temp_oid,
|
||||
log_entries,
|
||||
hset_hist,
|
||||
op,
|
||||
op_t,
|
||||
peer,
|
||||
pinfo);
|
||||
} else {
|
||||
wr = generate_subop<MOSDRepOp, MSG_OSD_REPOP>(
|
||||
soid,
|
||||
at_version,
|
||||
tid,
|
||||
reqid,
|
||||
pg_trim_to,
|
||||
pg_trim_rollback_to,
|
||||
new_temp_oid,
|
||||
discard_temp_oid,
|
||||
log_entries,
|
||||
hset_hist,
|
||||
op,
|
||||
op_t,
|
||||
peer,
|
||||
pinfo);
|
||||
}
|
||||
wr = generate_subop(
|
||||
soid,
|
||||
at_version,
|
||||
tid,
|
||||
reqid,
|
||||
pg_trim_to,
|
||||
pg_trim_rollback_to,
|
||||
new_temp_oid,
|
||||
discard_temp_oid,
|
||||
log_entries,
|
||||
hset_hist,
|
||||
op,
|
||||
op_t,
|
||||
peer,
|
||||
pinfo);
|
||||
|
||||
get_parent()->send_message_osd_cluster(
|
||||
peer.osd, wr, get_osdmap()->get_epoch());
|
||||
@ -1113,26 +1085,12 @@ void ReplicatedBackend::issue_op(
|
||||
}
|
||||
|
||||
// sub op modify
|
||||
void ReplicatedBackend::sub_op_modify(OpRequestRef op) {
|
||||
Message *m = op->get_req();
|
||||
int msg_type = m->get_type();
|
||||
if (msg_type == MSG_OSD_SUBOP) {
|
||||
sub_op_modify_impl<MOSDSubOp, MSG_OSD_SUBOP>(op);
|
||||
} else if (msg_type == MSG_OSD_REPOP) {
|
||||
sub_op_modify_impl<MOSDRepOp, MSG_OSD_REPOP>(op);
|
||||
} else {
|
||||
assert(0);
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T, int MSGTYPE>
|
||||
void ReplicatedBackend::sub_op_modify_impl(OpRequestRef op)
|
||||
void ReplicatedBackend::sub_op_modify(OpRequestRef op)
|
||||
{
|
||||
T *m = static_cast<T *>(op->get_req());
|
||||
MOSDRepOp *m = static_cast<MOSDRepOp *>(op->get_req());
|
||||
m->finish_decode();
|
||||
int msg_type = m->get_type();
|
||||
assert(MSGTYPE == msg_type);
|
||||
assert(msg_type == MSG_OSD_SUBOP || msg_type == MSG_OSD_REPOP);
|
||||
assert(MSG_OSD_REPOP == msg_type);
|
||||
|
||||
const hobject_t& soid = m->poid;
|
||||
|
||||
|
@ -361,7 +361,6 @@ public:
|
||||
);
|
||||
|
||||
private:
|
||||
template<typename T, int MSGTYPE>
|
||||
Message * generate_subop(
|
||||
const hobject_t &soid,
|
||||
const eversion_t &at_version,
|
||||
@ -392,11 +391,8 @@ private:
|
||||
ObjectStore::Transaction &op_t);
|
||||
void op_applied(InProgressOp *op);
|
||||
void op_commit(InProgressOp *op);
|
||||
template<typename T, int MSGTYPE>
|
||||
void sub_op_modify_reply(OpRequestRef op);
|
||||
void sub_op_modify(OpRequestRef op);
|
||||
template<typename T, int MSGTYPE>
|
||||
void sub_op_modify_impl(OpRequestRef op);
|
||||
|
||||
struct RepModify {
|
||||
OpRequestRef op;
|
||||
|
Loading…
Reference in New Issue
Block a user