diff options
-rw-r--r-- | src/messages/MClientCaps.h | 2 | ||||
-rw-r--r-- | src/messages/MClientQuota.h | 2 | ||||
-rw-r--r-- | src/messages/MClientReply.h | 2 | ||||
-rw-r--r-- | src/messages/MClientRequest.h | 4 | ||||
-rw-r--r-- | src/messages/MClientRequestForward.h | 2 | ||||
-rw-r--r-- | src/messages/MClientSnap.h | 2 | ||||
-rw-r--r-- | src/messages/MForward.h | 2 | ||||
-rw-r--r-- | src/messages/MMDSBeacon.h | 4 | ||||
-rw-r--r-- | src/messages/MMonGetOSDMap.h | 4 | ||||
-rw-r--r-- | src/messages/MMonQuorumService.h | 4 | ||||
-rw-r--r-- | src/messages/MMonScrub.h | 2 | ||||
-rw-r--r-- | src/messages/MMonSync.h | 2 | ||||
-rw-r--r-- | src/messages/MOSDOp.h | 34 | ||||
-rw-r--r-- | src/messages/MOSDOpReply.h | 2 | ||||
-rw-r--r-- | src/messages/MRemoveSnaps.h | 2 |
15 files changed, 35 insertions, 35 deletions
diff --git a/src/messages/MClientCaps.h b/src/messages/MClientCaps.h index c48c478f0f1..56762641a0b 100644 --- a/src/messages/MClientCaps.h +++ b/src/messages/MClientCaps.h @@ -222,7 +222,7 @@ public: } decode_nohead(head.snap_trace_len, snapbl, p); - assert(middle.length() == head.xattr_len); + ceph_assert(middle.length() == head.xattr_len); if (head.xattr_len) xattrbl = middle; diff --git a/src/messages/MClientQuota.h b/src/messages/MClientQuota.h index bced9f1a033..2c58c2fc762 100644 --- a/src/messages/MClientQuota.h +++ b/src/messages/MClientQuota.h @@ -45,7 +45,7 @@ public: decode(rstat.rfiles, p); decode(rstat.rsubdirs, p); decode(quota, p); - assert(p.end()); + ceph_assert(p.end()); } }; diff --git a/src/messages/MClientReply.h b/src/messages/MClientReply.h index cdcc8a615bf..3da3256d956 100644 --- a/src/messages/MClientReply.h +++ b/src/messages/MClientReply.h @@ -314,7 +314,7 @@ public: decode(trace_bl, p); decode(extra_bl, p); decode(snapbl, p); - assert(p.end()); + ceph_assert(p.end()); } void encode_payload(uint64_t features) override { using ceph::encode; diff --git a/src/messages/MClientRequest.h b/src/messages/MClientRequest.h index d109ca59b5b..f7be533d1ce 100644 --- a/src/messages/MClientRequest.h +++ b/src/messages/MClientRequest.h @@ -103,14 +103,14 @@ public: void set_mdsmap_epoch(epoch_t e) { head.mdsmap_epoch = e; } epoch_t get_mdsmap_epoch() const { return head.mdsmap_epoch; } epoch_t get_osdmap_epoch() const { - assert(head.op == CEPH_MDS_OP_SETXATTR); + ceph_assert(head.op == CEPH_MDS_OP_SETXATTR); if (header.version >= 3) return head.args.setxattr.osdmap_epoch; else return 0; } void set_osdmap_epoch(epoch_t e) { - assert(head.op == CEPH_MDS_OP_SETXATTR); + ceph_assert(head.op == CEPH_MDS_OP_SETXATTR); head.args.setxattr.osdmap_epoch = e; } diff --git a/src/messages/MClientRequestForward.h b/src/messages/MClientRequestForward.h index 31381849171..ed88617ed96 100644 --- a/src/messages/MClientRequestForward.h +++ b/src/messages/MClientRequestForward.h @@ -33,7 +33,7 @@ protected: MClientRequestForward(ceph_tid_t t, int dm, int nf, bool cmr) : MessageInstance(CEPH_MSG_CLIENT_REQUEST_FORWARD), dest_mds(dm), num_fwd(nf), client_must_resend(cmr) { - assert(client_must_resend); + ceph_assert(client_must_resend); header.tid = t; } ~MClientRequestForward() override {} diff --git a/src/messages/MClientSnap.h b/src/messages/MClientSnap.h index 9c7927576e6..8e2d958f2b5 100644 --- a/src/messages/MClientSnap.h +++ b/src/messages/MClientSnap.h @@ -62,7 +62,7 @@ public: decode_nohead(head.num_split_inos, split_inos, p); decode_nohead(head.num_split_realms, split_realms, p); decode_nohead(head.trace_len, bl, p); - assert(p.end()); + ceph_assert(p.end()); } }; diff --git a/src/messages/MForward.h b/src/messages/MForward.h index 2067d52a193..61ea6692445 100644 --- a/src/messages/MForward.h +++ b/src/messages/MForward.h @@ -147,7 +147,7 @@ public: PaxosServiceMessage *claim_message() { // let whoever is claiming the message deal with putting it. - assert(msg); + ceph_assert(msg); msg_desc = stringify(*msg); PaxosServiceMessage *m = msg; msg = NULL; diff --git a/src/messages/MMDSBeacon.h b/src/messages/MMDSBeacon.h index 6e1433d614c..1d1436ad363 100644 --- a/src/messages/MMDSBeacon.h +++ b/src/messages/MMDSBeacon.h @@ -121,7 +121,7 @@ struct MDSHealthMetric void encode(bufferlist& bl) const { ENCODE_START(1, 1, bl); - assert(type != MDS_HEALTH_NULL); + ceph_assert(type != MDS_HEALTH_NULL); encode((uint16_t)type, bl); encode((uint8_t)sev, bl); encode(message, bl); @@ -132,7 +132,7 @@ struct MDSHealthMetric void decode(bufferlist::const_iterator& bl) { DECODE_START(1, bl); decode((uint16_t&)type, bl); - assert(type != MDS_HEALTH_NULL); + ceph_assert(type != MDS_HEALTH_NULL); decode((uint8_t&)sev, bl); decode(message, bl); decode(metadata, bl); diff --git a/src/messages/MMonGetOSDMap.h b/src/messages/MMonGetOSDMap.h index 851b70fb645..93a4d475655 100644 --- a/src/messages/MMonGetOSDMap.h +++ b/src/messages/MMonGetOSDMap.h @@ -39,12 +39,12 @@ private: public: void request_full(epoch_t first, epoch_t last) { - assert(last >= first); + ceph_assert(last >= first); full_first = first; full_last = last; } void request_inc(epoch_t first, epoch_t last) { - assert(last >= first); + ceph_assert(last >= first); inc_first = first; inc_last = last; } diff --git a/src/messages/MMonQuorumService.h b/src/messages/MMonQuorumService.h index 068849875b7..c97b371982f 100644 --- a/src/messages/MMonQuorumService.h +++ b/src/messages/MMonQuorumService.h @@ -57,11 +57,11 @@ public: } void encode_payload(uint64_t features) override { - assert(0 == "MMonQuorumService message must always be a base class"); + ceph_assert(0 == "MMonQuorumService message must always be a base class"); } void decode_payload() override { - assert(0 == "MMonQuorumService message must always be a base class"); + ceph_assert(0 == "MMonQuorumService message must always be a base class"); } const char *get_type_name() const override { return "quorum_service"; } diff --git a/src/messages/MMonScrub.h b/src/messages/MMonScrub.h index cb04ac2e85e..b105be624ee 100644 --- a/src/messages/MMonScrub.h +++ b/src/messages/MMonScrub.h @@ -33,7 +33,7 @@ public: switch (op) { case OP_SCRUB: return "scrub"; case OP_RESULT: return "result"; - default: assert(0 == "unknown op type"); return NULL; + default: ceph_assert(0 == "unknown op type"); return NULL; } } diff --git a/src/messages/MMonSync.h b/src/messages/MMonSync.h index 0f2f3486230..8ccc2cdbc3f 100644 --- a/src/messages/MMonSync.h +++ b/src/messages/MMonSync.h @@ -51,7 +51,7 @@ public: case OP_CHUNK: return "chunk"; case OP_LAST_CHUNK: return "last_chunk"; case OP_NO_COOKIE: return "no_cookie"; - default: assert(0 == "unknown op type"); return NULL; + default: ceph_assert(0 == "unknown op type"); return NULL; } } diff --git a/src/messages/MOSDOp.h b/src/messages/MOSDOp.h index e8b1d024d25..bfd0b8a506f 100644 --- a/src/messages/MOSDOp.h +++ b/src/messages/MOSDOp.h @@ -84,32 +84,32 @@ public: // Fields decoded in partial decoding pg_t get_pg() const { - assert(!partial_decode_needed); + ceph_assert(!partial_decode_needed); return pgid.pgid; } spg_t get_spg() const override { - assert(!partial_decode_needed); + ceph_assert(!partial_decode_needed); return pgid; } pg_t get_raw_pg() const { - assert(!partial_decode_needed); + ceph_assert(!partial_decode_needed); return pg_t(hobj.get_hash(), pgid.pgid.pool()); } epoch_t get_map_epoch() const override { - assert(!partial_decode_needed); + ceph_assert(!partial_decode_needed); return osdmap_epoch; } int get_flags() const { - assert(!partial_decode_needed); + ceph_assert(!partial_decode_needed); return flags; } osd_reqid_t get_reqid() const { - assert(!partial_decode_needed); + ceph_assert(!partial_decode_needed); if (reqid.name != entity_name_t() || reqid.tid != 0) { return reqid; } else { if (!final_decode_needed) - assert(reqid.inc == (int32_t)client_inc); // decode() should have done this + ceph_assert(reqid.inc == (int32_t)client_inc); // decode() should have done this return osd_reqid_t(get_orig_source(), reqid.inc, header.tid); @@ -118,37 +118,37 @@ public: // Fields decoded in final decoding int get_client_inc() const { - assert(!final_decode_needed); + ceph_assert(!final_decode_needed); return client_inc; } utime_t get_mtime() const { - assert(!final_decode_needed); + ceph_assert(!final_decode_needed); return mtime; } object_locator_t get_object_locator() const { - assert(!final_decode_needed); + ceph_assert(!final_decode_needed); if (hobj.oid.name.empty()) return object_locator_t(hobj.pool, hobj.nspace, hobj.get_hash()); else return object_locator_t(hobj); } const object_t& get_oid() const { - assert(!final_decode_needed); + ceph_assert(!final_decode_needed); return hobj.oid; } const hobject_t &get_hobj() const { return hobj; } snapid_t get_snapid() const { - assert(!final_decode_needed); + ceph_assert(!final_decode_needed); return hobj.snap; } const snapid_t& get_snap_seq() const { - assert(!final_decode_needed); + ceph_assert(!final_decode_needed); return snap_seq; } const vector<snapid_t> &get_snaps() const { - assert(!final_decode_needed); + ceph_assert(!final_decode_needed); return snaps; } @@ -393,7 +393,7 @@ struct ceph_osd_request_head { } void decode_payload() override { - assert(partial_decode_needed && final_decode_needed); + ceph_assert(partial_decode_needed && final_decode_needed); p = std::cbegin(payload); // Always keep here the newest version of decoding order/rule @@ -531,10 +531,10 @@ struct ceph_osd_request_head { } bool finish_decode() { - assert(!partial_decode_needed); // partial decoding required + ceph_assert(!partial_decode_needed); // partial decoding required if (!final_decode_needed) return false; // Message is already final decoded - assert(header.version >= 7); + ceph_assert(header.version >= 7); decode(client_inc, p); decode(mtime, p); diff --git a/src/messages/MOSDOpReply.h b/src/messages/MOSDOpReply.h index 1e5edd4b42c..625a0f74052 100644 --- a/src/messages/MOSDOpReply.h +++ b/src/messages/MOSDOpReply.h @@ -100,7 +100,7 @@ public: void add_flags(int f) { flags |= f; } void claim_op_out_data(vector<OSDOp>& o) { - assert(ops.size() == o.size()); + ceph_assert(ops.size() == o.size()); for (unsigned i = 0; i < o.size(); i++) { ops[i].outdata.claim(o[i].outdata); } diff --git a/src/messages/MRemoveSnaps.h b/src/messages/MRemoveSnaps.h index 9d983d5edb6..849ef55f87b 100644 --- a/src/messages/MRemoveSnaps.h +++ b/src/messages/MRemoveSnaps.h @@ -47,7 +47,7 @@ public: auto p = payload.cbegin(); paxos_decode(p); decode(snaps, p); - assert(p.end()); + ceph_assert(p.end()); } }; |