diff options
author | Adam C. Emerson <aemerson@redhat.com> | 2018-08-23 22:27:11 +0200 |
---|---|---|
committer | Adam C. Emerson <aemerson@redhat.com> | 2018-08-27 16:27:22 +0200 |
commit | eb59c69674eb5de18f8054c7ddc3cd76d795512c (patch) | |
tree | 03c54784a1be0ce909db1258fb2f0fb2e99dbaf5 /src/mds | |
parent | include/assert: Smarten up ceph_assert (diff) | |
download | ceph-eb59c69674eb5de18f8054c7ddc3cd76d795512c.tar.xz ceph-eb59c69674eb5de18f8054c7ddc3cd76d795512c.zip |
cleanup: Replace always-false assertions with abort
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Diffstat (limited to 'src/mds')
-rw-r--r-- | src/mds/Locker.cc | 4 | ||||
-rw-r--r-- | src/mds/MDBalancer.cc | 2 | ||||
-rw-r--r-- | src/mds/MDCache.cc | 4 | ||||
-rw-r--r-- | src/mds/MDSTableClient.cc | 2 | ||||
-rw-r--r-- | src/mds/MDSTableServer.cc | 2 | ||||
-rw-r--r-- | src/mds/Migrator.cc | 8 | ||||
-rw-r--r-- | src/mds/OpenFileTable.cc | 4 | ||||
-rw-r--r-- | src/mds/Server.cc | 4 | ||||
-rw-r--r-- | src/mds/SessionMap.cc | 2 | ||||
-rw-r--r-- | src/mds/SnapServer.h | 2 | ||||
-rw-r--r-- | src/mds/StrayManager.cc | 2 | ||||
-rw-r--r-- | src/mds/journal.cc | 2 |
12 files changed, 19 insertions, 19 deletions
diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc index e0950815e8f..d70d77453d9 100644 --- a/src/mds/Locker.cc +++ b/src/mds/Locker.cc @@ -113,7 +113,7 @@ void Locker::dispatch(const Message::const_ref &m) break; default: derr << "locker unknown message " << m->get_type() << dendl; - ceph_assert(0 == "locker unknown message"); + ceph_abort_msg("locker unknown message"); } } @@ -4699,7 +4699,7 @@ void Locker::scatter_tempsync(ScatterLock *lock, bool *need_issue) ceph_assert(lock->get_parent()->is_auth()); ceph_assert(lock->is_stable()); - ceph_assert(0 == "not fully implemented, at least not for filelock"); + ceph_abort_msg("not fully implemented, at least not for filelock"); CInode *in = static_cast<CInode *>(lock->get_parent()); diff --git a/src/mds/MDBalancer.cc b/src/mds/MDBalancer.cc index 26c3177deac..1a029135dc6 100644 --- a/src/mds/MDBalancer.cc +++ b/src/mds/MDBalancer.cc @@ -69,7 +69,7 @@ int MDBalancer::proc_message(const Message::const_ref &m) default: derr << " balancer unknown message " << m->get_type() << dendl_impl; - ceph_assert(0 == "balancer unknown message"); + ceph_abort_msg("balancer unknown message"); } return 0; diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 28ac5a41a39..a115fdbdb0e 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -5791,7 +5791,7 @@ void MDCache::do_cap_import(Session *session, CInode *in, Capability *cap, reap->set_cap_peer(p_cap_id, p_seq, p_mseq, peer, p_flags); mds->send_message_client_counted(reap, session); } else { - ceph_assert(0); + ceph_abort(); } } @@ -7968,7 +7968,7 @@ void MDCache::dispatch(const Message::const_ref &m) default: derr << "cache unknown message " << m->get_type() << dendl; - ceph_assert(0 == "cache unknown message"); + ceph_abort_msg("cache unknown message"); } } diff --git a/src/mds/MDSTableClient.cc b/src/mds/MDSTableClient.cc index af0fe5b3841..4187fee082f 100644 --- a/src/mds/MDSTableClient.cc +++ b/src/mds/MDSTableClient.cc @@ -139,7 +139,7 @@ void MDSTableClient::handle_request(const MMDSTableRequest::const_ref &m) break; default: - ceph_assert(0 == "unrecognized mds_table_client request op"); + ceph_abort_msg("unrecognized mds_table_client request op"); } } diff --git a/src/mds/MDSTableServer.cc b/src/mds/MDSTableServer.cc index 138c0d669fa..ffba78c0ef2 100644 --- a/src/mds/MDSTableServer.cc +++ b/src/mds/MDSTableServer.cc @@ -33,7 +33,7 @@ void MDSTableServer::handle_request(const MMDSTableRequest::const_ref &req) case TABLESERVER_OP_COMMIT: return handle_commit(req); case TABLESERVER_OP_ROLLBACK: return handle_rollback(req); case TABLESERVER_OP_NOTIFY_ACK: return handle_notify_ack(req); - default: ceph_assert(0 == "unrecognized mds_table_server request op"); + default: ceph_abort_msg("unrecognized mds_table_server request op"); } } diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc index b4dfe090405..3c6473def58 100644 --- a/src/mds/Migrator.cc +++ b/src/mds/Migrator.cc @@ -148,7 +148,7 @@ void Migrator::dispatch(const Message::const_ref &m) default: derr << "migrator unknown message " << m->get_type() << dendl; - ceph_assert(0 == "migrator unknown message"); + ceph_abort_msg("migrator unknown message"); } } @@ -2432,7 +2432,7 @@ void Migrator::handle_export_cancel(const MExportDirCancel::const_ref &m) dirfrag_t df = m->get_dirfrag(); map<dirfrag_t,import_state_t>::iterator it = import_state.find(df); if (it == import_state.end()) { - ceph_assert(0 == "got export_cancel in weird state"); + ceph_abort_msg("got export_cancel in weird state"); } else if (it->second.state == IMPORT_DISCOVERING) { import_reverse_discovering(df); } else if (it->second.state == IMPORT_DISCOVERED) { @@ -2453,7 +2453,7 @@ void Migrator::handle_export_cancel(const MExportDirCancel::const_ref &m) cache->adjust_subtree_auth(dir, it->second.peer); import_reverse_unfreeze(dir); } else { - ceph_assert(0 == "got export_cancel in weird state"); + ceph_abort_msg("got export_cancel in weird state"); } } @@ -2566,7 +2566,7 @@ void Migrator::handle_export_prep(const MExportDirPrep::const_ref &m, bool did_a } else if (start == '-') { // nothing } else - ceph_assert(0 == "unrecognized start char"); + ceph_abort_msg("unrecognized start char"); while (!q.end()) { CDentry *dn = cache->add_replica_dentry(q, cur, finished); diff --git a/src/mds/OpenFileTable.cc b/src/mds/OpenFileTable.cc index a8795d2ade8..d9777581f0a 100644 --- a/src/mds/OpenFileTable.cc +++ b/src/mds/OpenFileTable.cc @@ -1010,7 +1010,7 @@ void OpenFileTable::_open_ino_finish(inodeno_t ino, int r) finish_contexts(g_ceph_context, waiting_for_prefetch); waiting_for_prefetch.clear(); } else { - ceph_assert(0); + ceph_abort(); } } } @@ -1093,7 +1093,7 @@ void OpenFileTable::_prefetch_inodes() else if (prefetch_state == FILE_INODES) pool = mds->mdsmap->get_first_data_pool(); else - ceph_assert(0); + ceph_abort(); MDCache *mdcache = mds->mdcache; diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 5728f11f1c1..72efb1752cd 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -264,7 +264,7 @@ void Server::dispatch(const Message::const_ref &m) return; default: derr << "server unknown message " << m->get_type() << dendl; - ceph_assert(0 == "server unknown message"); + ceph_abort_msg("server unknown message"); } } @@ -1380,7 +1380,7 @@ void Server::respond_to_request(MDRequestRef& mdr, int r) } else if (mdr->internal_op > -1) { dout(10) << "respond_to_request on internal request " << mdr << dendl; if (!mdr->internal_op_finish) - ceph_assert(0 == "trying to respond to internal op without finisher"); + ceph_abort_msg("trying to respond to internal op without finisher"); mdr->internal_op_finish->complete(r); mdcache->request_finish(mdr); } diff --git a/src/mds/SessionMap.cc b/src/mds/SessionMap.cc index afe37fe7a6b..429238b7b8b 100644 --- a/src/mds/SessionMap.cc +++ b/src/mds/SessionMap.cc @@ -324,7 +324,7 @@ void SessionMap::_load_legacy_finish(int r, bufferlist &bl) auto blp = bl.cbegin(); if (r < 0) { derr << "_load_finish got " << cpp_strerror(r) << dendl; - ceph_assert(0 == "failed to load sessionmap"); + ceph_abort_msg("failed to load sessionmap"); } dump(); decode_legacy(blp); // note: this sets last_cap_renew = now() diff --git a/src/mds/SnapServer.h b/src/mds/SnapServer.h index 0a21a756e56..7c4262fc51e 100644 --- a/src/mds/SnapServer.h +++ b/src/mds/SnapServer.h @@ -123,7 +123,7 @@ public: else if (ino == MDS_INO_MDSDIR(rank)) mdsdir_scrubbed = true; else - ceph_assert(0); + ceph_abort(); } bool can_allow_multimds_snaps() const { return (root_scrubbed && mdsdir_scrubbed) || diff --git a/src/mds/StrayManager.cc b/src/mds/StrayManager.cc index 0ace8b8c089..145e962e3ae 100644 --- a/src/mds/StrayManager.cc +++ b/src/mds/StrayManager.cc @@ -203,7 +203,7 @@ void StrayManager::_purge_stray_purged( // is being purged (aside from it were derr << "Rogue reference after purge to " << *dn << dendl; - ceph_assert(0 == "rogue reference to purging inode"); + ceph_abort_msg("rogue reference to purging inode"); } // kill dentry. diff --git a/src/mds/journal.cc b/src/mds/journal.cc index ed256e55e5e..86054158ae2 100644 --- a/src/mds/journal.cc +++ b/src/mds/journal.cc @@ -311,7 +311,7 @@ void EMetaBlob::add_dir_context(CDir *dir, int mode) !dir->state_test(CDir::STATE_AUXSUBTREE) && !diri->state_test(CInode::STATE_AMBIGUOUSAUTH)) { dout(0) << "EMetaBlob::add_dir_context unexpected subtree " << *dir << dendl; - ceph_assert(0); + ceph_abort(); } dout(20) << "EMetaBlob::add_dir_context(" << dir << ") ambiguous or transient subtree " << dendl; } else { |