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/os | |
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/os')
-rw-r--r-- | src/os/ObjectStore.h | 2 | ||||
-rw-r--r-- | src/os/bluestore/BitmapFreelistManager.cc | 2 | ||||
-rw-r--r-- | src/os/bluestore/BlueFS.cc | 8 | ||||
-rw-r--r-- | src/os/bluestore/BlueRocksEnv.cc | 2 | ||||
-rw-r--r-- | src/os/bluestore/BlueStore.cc | 38 | ||||
-rw-r--r-- | src/os/bluestore/BlueStore.h | 2 | ||||
-rw-r--r-- | src/os/bluestore/KernelDevice.cc | 8 | ||||
-rw-r--r-- | src/os/bluestore/bluestore_types.cc | 8 | ||||
-rw-r--r-- | src/os/bluestore/bluestore_types.h | 6 | ||||
-rw-r--r-- | src/os/filestore/FileJournal.cc | 8 | ||||
-rw-r--r-- | src/os/filestore/FileStore.cc | 40 | ||||
-rw-r--r-- | src/os/filestore/JournalingObjectStore.cc | 2 | ||||
-rw-r--r-- | src/os/filestore/WBThrottle.cc | 2 | ||||
-rw-r--r-- | src/os/filestore/chain_xattr.cc | 2 | ||||
-rw-r--r-- | src/os/fs/FS.cc | 2 | ||||
-rw-r--r-- | src/os/kstore/KStore.cc | 18 | ||||
-rw-r--r-- | src/os/memstore/MemStore.cc | 12 |
17 files changed, 81 insertions, 81 deletions
diff --git a/src/os/ObjectStore.h b/src/os/ObjectStore.h index 85b4ef329d1..2ef00640f24 100644 --- a/src/os/ObjectStore.h +++ b/src/os/ObjectStore.h @@ -683,7 +683,7 @@ public: break; default: - ceph_assert(0 == "Unknown OP"); + ceph_abort_msg("Unknown OP"); } } void _update_op_bl( diff --git a/src/os/bluestore/BitmapFreelistManager.cc b/src/os/bluestore/BitmapFreelistManager.cc index 2435a0a1944..87066f0942d 100644 --- a/src/os/bluestore/BitmapFreelistManager.cc +++ b/src/os/bluestore/BitmapFreelistManager.cc @@ -452,7 +452,7 @@ void BitmapFreelistManager::_verify_range(uint64_t offset, uint64_t length, } if (errors) { derr << __func__ << " saw " << errors << " errors" << dendl; - ceph_assert(0 == "bitmap freelist errors"); + ceph_abort_msg("bitmap freelist errors"); } } diff --git a/src/os/bluestore/BlueFS.cc b/src/os/bluestore/BlueFS.cc index bf81bfa7357..837282b6311 100644 --- a/src/os/bluestore/BlueFS.cc +++ b/src/os/bluestore/BlueFS.cc @@ -713,7 +713,7 @@ int BlueFS::_replay(bool noop, bool to_stdout) dout(10) << __func__ << " 0x" << std::hex << read_pos << ": stop: failed to skip to " << offset << std::dec << dendl; - ceph_assert(0 == "problem with op_jump"); + ceph_abort_msg("problem with op_jump"); } } } @@ -1663,7 +1663,7 @@ int BlueFS::_flush_range(FileWriter *h, uint64_t offset, uint64_t length) derr << __func__ << " allocated: 0x" << std::hex << allocated << " offset: 0x" << offset << " length: 0x" << length << std::dec << dendl; - ceph_assert(0 == "bluefs enospc"); + ceph_abort_msg("bluefs enospc"); return r; } if (cct->_conf->bluefs_preextend_wal_files && @@ -1900,7 +1900,7 @@ int BlueFS::_truncate(FileWriter *h, uint64_t offset) << " unflushed bytes" << dendl; t.substr_of(h->buffer, 0, offset - h->pos); h->buffer.swap(t); - ceph_assert(0 == "actually this shouldn't happen"); + ceph_abort_msg("actually this shouldn't happen"); } if (h->buffer.length()) { int r = _flush(h, true); @@ -1911,7 +1911,7 @@ int BlueFS::_truncate(FileWriter *h, uint64_t offset) return 0; // no-op! } if (offset > h->file->fnode.size) { - ceph_assert(0 == "truncate up not supported"); + ceph_abort_msg("truncate up not supported"); } ceph_assert(h->file->fnode.size >= offset); h->file->fnode.size = offset; diff --git a/src/os/bluestore/BlueRocksEnv.cc b/src/os/bluestore/BlueRocksEnv.cc index b33005e149b..c384f2ecb09 100644 --- a/src/os/bluestore/BlueRocksEnv.cc +++ b/src/os/bluestore/BlueRocksEnv.cc @@ -23,7 +23,7 @@ rocksdb::Status err_to_status(int r) return rocksdb::Status::IOError(strerror(r)); default: // FIXME :( - ceph_assert(0 == "unrecognized error code"); + ceph_abort_msg("unrecognized error code"); return rocksdb::Status::NotSupported(rocksdb::Status::kNone); } } diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 5f9935d350d..90f2a0e8690 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -777,7 +777,7 @@ BlueStore::Cache *BlueStore::Cache::create(CephContext* cct, string type, else if (type == "2q") c = new TwoQCache(cct); else - ceph_assert(0 == "unrecognized cache type"); + ceph_abort_msg("unrecognized cache type"); c->logger = logger; return c; @@ -925,7 +925,7 @@ void BlueStore::TwoQCache::_add_buffer(Buffer *b, int level, Buffer *near) buffer_hot.insert(buffer_hot.iterator_to(*near), *b); break; default: - ceph_assert(0 == "bad cache_private"); + ceph_abort_msg("bad cache_private"); } } else if (b->cache_private == BUFFER_NEW) { b->cache_private = BUFFER_WARM_IN; @@ -952,7 +952,7 @@ void BlueStore::TwoQCache::_add_buffer(Buffer *b, int level, Buffer *near) buffer_hot.push_front(*b); break; default: - ceph_assert(0 == "bad cache_private"); + ceph_abort_msg("bad cache_private"); } } if (!b->is_empty()) { @@ -981,7 +981,7 @@ void BlueStore::TwoQCache::_rm_buffer(Buffer *b) buffer_hot.erase(buffer_hot.iterator_to(*b)); break; default: - ceph_assert(0 == "bad cache_private"); + ceph_abort_msg("bad cache_private"); } } @@ -1005,7 +1005,7 @@ void BlueStore::TwoQCache::_move_buffer(Cache *srcc, Buffer *b) buffer_hot.push_back(*b); break; default: - ceph_assert(0 == "bad cache_private"); + ceph_abort_msg("bad cache_private"); } if (!b->is_empty()) { buffer_bytes += b->length; @@ -2178,7 +2178,7 @@ bid_t BlueStore::ExtentMap::allocate_spanning_blob_id() if (bid < 0) bid = 0; } } while (bid != begin_bid); - ceph_assert(0 == "no available blob id"); + ceph_abort_msg("no available blob id"); } void BlueStore::ExtentMap::reshard( @@ -2779,7 +2779,7 @@ void BlueStore::ExtentMap::dirty_range( derr << __func__ << "on write 0x" << std::hex << offset << "~" << length << " shard 0x" << p->shard_info->offset << std::dec << " is not loaded, can't mark dirty" << dendl; - ceph_assert(0 == "can't mark unloaded shard dirty"); + ceph_abort_msg("can't mark unloaded shard dirty"); } if (!p->dirty) { dout(20) << __func__ << " mark shard 0x" << std::hex @@ -3252,7 +3252,7 @@ void BlueStore::Collection::load_shared_blob(SharedBlobRef sb) lderr(store->cct) << __func__ << " sbid 0x" << std::hex << sbid << std::dec << " not found at key " << pretty_binary_string(key) << dendl; - ceph_assert(0 == "uh oh, missing shared_blob"); + ceph_abort_msg("uh oh, missing shared_blob"); } sb->loaded = true; @@ -6660,7 +6660,7 @@ int BlueStore::_fsck(bool deep, bool repair) if (r < 0) { derr << __func__ << " failed to read from 0x" << std::hex << e->offset <<"~" << e->length << std::dec << dendl; - ceph_assert(0 == "read failed, wtf"); + ceph_abort_msg("read failed, wtf"); } pext_to_release.push_back(*e); e = pextents.erase(e); @@ -8421,7 +8421,7 @@ int BlueStore::_open_super_meta() freelist_type = std::string(bl.c_str(), bl.length()); dout(10) << __func__ << " freelist_type " << freelist_type << dendl; } else { - ceph_assert("Not Support extent freelist manager" == 0); + ceph_abort_msg("Not Support extent freelist manager"); } } @@ -8732,7 +8732,7 @@ void BlueStore::_txc_state_proc(TransContext *txc) default: derr << __func__ << " unexpected txc " << txc << " state " << txc->get_state_name() << dendl; - ceph_assert(0 == "unexpected txc state"); + ceph_abort_msg("unexpected txc state"); return; } } @@ -9845,7 +9845,7 @@ void BlueStore::_txc_add_transaction(TransContext *txc, Transaction *t) break; case Transaction::OP_SPLIT_COLLECTION: - ceph_assert(0 == "deprecated"); + ceph_abort_msg("deprecated"); break; case Transaction::OP_SPLIT_COLLECTION2: @@ -9889,7 +9889,7 @@ void BlueStore::_txc_add_transaction(TransContext *txc, Transaction *t) break; case Transaction::OP_COLL_RENAME: - ceph_assert(0 == "not implemented"); + ceph_abort_msg("not implemented"); break; } if (r < 0) { @@ -9897,7 +9897,7 @@ void BlueStore::_txc_add_transaction(TransContext *txc, Transaction *t) << " not handled on operation " << op->op << " (op " << pos << ", counting from 0)" << dendl; _dump_transaction<0>(t); - ceph_assert(0 == "unexpected error"); + ceph_abort_msg("unexpected error"); } // these operations implicity create the object @@ -10007,7 +10007,7 @@ void BlueStore::_txc_add_transaction(TransContext *txc, Transaction *t) break; case Transaction::OP_CLONERANGE: - ceph_assert(0 == "deprecated"); + ceph_abort_msg("deprecated"); break; case Transaction::OP_CLONERANGE2: @@ -10025,15 +10025,15 @@ void BlueStore::_txc_add_transaction(TransContext *txc, Transaction *t) break; case Transaction::OP_COLL_ADD: - ceph_assert(0 == "not implemented"); + ceph_abort_msg("not implemented"); break; case Transaction::OP_COLL_REMOVE: - ceph_assert(0 == "not implemented"); + ceph_abort_msg("not implemented"); break; case Transaction::OP_COLL_MOVE: - ceph_assert(0 == "deprecated"); + ceph_abort_msg("deprecated"); break; case Transaction::OP_COLL_MOVE_RENAME: @@ -10141,7 +10141,7 @@ void BlueStore::_txc_add_transaction(TransContext *txc, Transaction *t) << dendl; derr << msg << dendl; _dump_transaction<0>(t); - ceph_assert(0 == "unexpected error"); + ceph_abort_msg("unexpected error"); } } } diff --git a/src/os/bluestore/BlueStore.h b/src/os/bluestore/BlueStore.h index ae776a099e0..ff814de5e5c 100644 --- a/src/os/bluestore/BlueStore.h +++ b/src/os/bluestore/BlueStore.h @@ -1279,7 +1279,7 @@ public: break; case BUFFER_WARM_OUT: // move from warm_out to hot LRU - ceph_assert(0 == "this happens via discard hint"); + ceph_abort_msg("this happens via discard hint"); break; case BUFFER_HOT: // move to front of hot LRU diff --git a/src/os/bluestore/KernelDevice.cc b/src/os/bluestore/KernelDevice.cc index e3c075bbaf2..1d6148bdcad 100644 --- a/src/os/bluestore/KernelDevice.cc +++ b/src/os/bluestore/KernelDevice.cc @@ -83,7 +83,7 @@ int KernelDevice::open(const string& p) dio = true; aio = cct->_conf->bdev_aio; if (!aio) { - ceph_assert(0 == "non-aio not supported"); + ceph_abort_msg("non-aio not supported"); } // disable readahead as it will wreak havoc on our mix of @@ -430,7 +430,7 @@ void KernelDevice::_aio_thread() aio, max); if (r < 0) { derr << __func__ << " got " << cpp_strerror(r) << dendl; - ceph_assert(0 == "got unexpected error from io_getevents"); + ceph_abort_msg("got unexpected error from io_getevents"); } if (r > 0) { dout(30) << __func__ << " got " << r << " completed aios" << dendl; @@ -465,7 +465,7 @@ void KernelDevice::_aio_thread() } else if (aio[i]->length != (uint64_t)r) { derr << "aio to " << aio[i]->offset << "~" << aio[i]->length << " but returned: " << r << dendl; - ceph_assert(0 == "unexpected aio error"); + ceph_abort_msg("unexpected aio error"); } dout(10) << __func__ << " finished aio " << aio[i] << " r " << r @@ -499,7 +499,7 @@ void KernelDevice::_aio_thread() << " since " << debug_stall_since << ", timeout is " << cct->_conf->bdev_debug_aio_suicide_timeout << "s, suicide" << dendl; - ceph_assert(0 == "stalled aio... buggy kernel or bad device?"); + ceph_abort_msg("stalled aio... buggy kernel or bad device?"); } } } diff --git a/src/os/bluestore/bluestore_types.cc b/src/os/bluestore/bluestore_types.cc index 8597c750221..93dbe41de29 100644 --- a/src/os/bluestore/bluestore_types.cc +++ b/src/os/bluestore/bluestore_types.cc @@ -107,9 +107,9 @@ void bluestore_extent_ref_map_t::_check() const unsigned refs = 0; for (const auto &p : ref_map) { if (p.first < pos) - ceph_assert(0 == "overlap"); + ceph_abort_msg("overlap"); if (p.first == pos && p.second.refs == refs) - ceph_assert(0 == "unmerged"); + ceph_abort_msg("unmerged"); pos = p.first + p.second.length; refs = p.second.refs; } @@ -197,11 +197,11 @@ void bluestore_extent_ref_map_t::put( auto p = ref_map.lower_bound(offset); if (p == ref_map.end() || p->first > offset) { if (p == ref_map.begin()) { - ceph_assert(0 == "put on missing extent (nothing before)"); + ceph_abort_msg("put on missing extent (nothing before)"); } --p; if (p->first + p->second.length <= offset) { - ceph_assert(0 == "put on missing extent (gap)"); + ceph_abort_msg("put on missing extent (gap)"); } } if (p->first < offset) { diff --git a/src/os/bluestore/bluestore_types.h b/src/os/bluestore/bluestore_types.h index 405a33bcaaa..e83d32622fc 100644 --- a/src/os/bluestore/bluestore_types.h +++ b/src/os/bluestore/bluestore_types.h @@ -601,7 +601,7 @@ public: b_len -= p->length; ++p; } - ceph_assert(0 == "we should not get here"); + ceph_abort_msg("we should not get here"); return false; } @@ -743,7 +743,7 @@ public: const char *p = csum_data.c_str(); switch (cs) { case 0: - ceph_assert(0 == "no csum data, bad index"); + ceph_abort_msg("no csum data, bad index"); case 1: return reinterpret_cast<const uint8_t*>(p)[i]; case 2: @@ -753,7 +753,7 @@ public: case 8: return reinterpret_cast<const __le64*>(p)[i]; default: - ceph_assert(0 == "unrecognized csum word size"); + ceph_abort_msg("unrecognized csum word size"); } } const char *get_csum_item_ptr(unsigned i) const { diff --git a/src/os/filestore/FileJournal.cc b/src/os/filestore/FileJournal.cc index 3006cfc28ca..cfb1692cf35 100644 --- a/src/os/filestore/FileJournal.cc +++ b/src/os/filestore/FileJournal.cc @@ -983,7 +983,7 @@ void FileJournal::check_align(off64_t pos, bufferlist& bl) if (directio && !bl.is_aligned_size_and_memory(block_size, CEPH_DIRECTIO_ALIGNMENT)) { ceph_assert((bl.length() & (CEPH_DIRECTIO_ALIGNMENT - 1)) == 0); ceph_assert((pos & (CEPH_DIRECTIO_ALIGNMENT - 1)) == 0); - ceph_assert(0 == "bl was not aligned"); + ceph_abort_msg("bl was not aligned"); } } @@ -1421,7 +1421,7 @@ int FileJournal::write_aio_bl(off64_t& pos, bufferlist& bl, uint64_t seq) continue; } check_align(pos, tbl); - ceph_assert(0 == "io_submit got unexpected error"); + ceph_abort_msg("io_submit got unexpected error"); } else { break; } @@ -1460,7 +1460,7 @@ void FileJournal::write_finish_thread_entry() continue; } derr << "io_getevents got " << cpp_strerror(r) << dendl; - ceph_assert(0 == "got unexpected error from io_getevents"); + ceph_abort_msg("got unexpected error from io_getevents"); } { @@ -1470,7 +1470,7 @@ void FileJournal::write_finish_thread_entry() if (event[i].res != ai->len) { derr << "aio to " << ai->off << "~" << ai->len << " returned: " << (int)event[i].res << dendl; - ceph_assert(0 == "unexpected aio error"); + ceph_abort_msg("unexpected aio error"); } dout(10) << __func__ << " aio " << ai->off << "~" << ai->len << " done" << dendl; diff --git a/src/os/filestore/FileStore.cc b/src/os/filestore/FileStore.cc index 3755e4807ff..43f05f44499 100644 --- a/src/os/filestore/FileStore.cc +++ b/src/os/filestore/FileStore.cc @@ -2447,12 +2447,12 @@ void FileStore::_set_global_replay_guard(const coll_t& cid, int ret = object_map->sync(); if (ret < 0) { derr << __FUNC__ << ": omap sync error " << cpp_strerror(ret) << dendl; - ceph_assert(0 == "_set_global_replay_guard failed"); + ceph_abort_msg("_set_global_replay_guard failed"); } ret = sync_filesystem(basedir_fd); if (ret < 0) { derr << __FUNC__ << ": sync_filesystem error " << cpp_strerror(ret) << dendl; - ceph_assert(0 == "_set_global_replay_guard failed"); + ceph_abort_msg("_set_global_replay_guard failed"); } char fn[PATH_MAX]; @@ -2461,7 +2461,7 @@ void FileStore::_set_global_replay_guard(const coll_t& cid, if (fd < 0) { int err = errno; derr << __FUNC__ << ": " << cid << " error " << cpp_strerror(err) << dendl; - ceph_assert(0 == "_set_global_replay_guard failed"); + ceph_abort_msg("_set_global_replay_guard failed"); } _inject_failure(); @@ -2474,7 +2474,7 @@ void FileStore::_set_global_replay_guard(const coll_t& cid, if (r < 0) { derr << __FUNC__ << ": fsetxattr " << GLOBAL_REPLAY_GUARD_XATTR << " got " << cpp_strerror(r) << dendl; - ceph_assert(0 == "fsetxattr failed"); + ceph_abort_msg("fsetxattr failed"); } // and make sure our xattr is durable. @@ -2527,7 +2527,7 @@ void FileStore::_set_replay_guard(const coll_t& cid, if (fd < 0) { int err = errno; derr << __FUNC__ << ": " << cid << " error " << cpp_strerror(err) << dendl; - ceph_assert(0 == "_set_replay_guard failed"); + ceph_abort_msg("_set_replay_guard failed"); } _set_replay_guard(fd, spos, 0, in_progress); VOID_TEMP_FAILURE_RETRY(::close(fd)); @@ -2566,7 +2566,7 @@ void FileStore::_set_replay_guard(int fd, fd, REPLAY_GUARD_XATTR, v.c_str(), v.length()); if (r < 0) { derr << "fsetxattr " << REPLAY_GUARD_XATTR << " got " << cpp_strerror(r) << dendl; - ceph_assert(0 == "fsetxattr failed"); + ceph_abort_msg("fsetxattr failed"); } // and make sure our xattr is durable. @@ -2586,7 +2586,7 @@ void FileStore::_close_replay_guard(const coll_t& cid, if (fd < 0) { int err = errno; derr << __FUNC__ << ": " << cid << " error " << cpp_strerror(err) << dendl; - ceph_assert(0 == "_close_replay_guard failed"); + ceph_abort_msg("_close_replay_guard failed"); } _close_replay_guard(fd, spos); VOID_TEMP_FAILURE_RETRY(::close(fd)); @@ -2616,7 +2616,7 @@ void FileStore::_close_replay_guard(int fd, const SequencerPosition& spos, fd, REPLAY_GUARD_XATTR, v.c_str(), v.length()); if (r < 0) { derr << "fsetxattr " << REPLAY_GUARD_XATTR << " got " << cpp_strerror(r) << dendl; - ceph_assert(0 == "fsetxattr failed"); + ceph_abort_msg("fsetxattr failed"); } // and make sure our xattr is durable. @@ -3049,7 +3049,7 @@ void FileStore::_do_transaction( case Transaction::OP_COLL_SETATTR: case Transaction::OP_COLL_RMATTR: - ceph_assert(0 == "collection attr methods no longer implemented"); + ceph_abort_msg("collection attr methods no longer implemented"); break; case Transaction::OP_COLL_RENAME: @@ -3129,7 +3129,7 @@ void FileStore::_do_transaction( break; case Transaction::OP_SPLIT_COLLECTION: { - ceph_assert(0 == "not legacy journal; upgrade to firefly first"); + ceph_abort_msg("not legacy journal; upgrade to firefly first"); } break; case Transaction::OP_SPLIT_COLLECTION2: @@ -3248,7 +3248,7 @@ void FileStore::_do_transaction( dump_open_fds(cct); } - ceph_assert(0 == "unexpected error"); + ceph_abort_msg("unexpected error"); } } @@ -3373,7 +3373,7 @@ int FileStore::read( if (errors != 0) { dout(0) << __FUNC__ << ": " << cid << "/" << oid << " " << offset << "~" << got << " ... BAD CRC:\n" << ss.str() << dendl; - ceph_assert(0 == "bad crc on read"); + ceph_abort_msg("bad crc on read"); } } @@ -4127,7 +4127,7 @@ void FileStore::sync_entry() int err = write_op_seq(op_fd, cp); if (err < 0) { derr << "Error during write_op_seq: " << cpp_strerror(err) << dendl; - ceph_assert(0 == "error during write_op_seq"); + ceph_abort_msg("error during write_op_seq"); } char s[NAME_MAX]; @@ -4149,7 +4149,7 @@ void FileStore::sync_entry() err = backend->sync_checkpoint(cid); if (err < 0) { derr << "ioctl WAIT_SYNC got " << cpp_strerror(err) << dendl; - ceph_assert(0 == "wait_sync got error"); + ceph_abort_msg("wait_sync got error"); } dout(20) << " done waiting for checkpoint " << cid << " to complete" << dendl; } @@ -4160,24 +4160,24 @@ void FileStore::sync_entry() int err = object_map->sync(); if (err < 0) { derr << "object_map sync got " << cpp_strerror(err) << dendl; - ceph_assert(0 == "object_map sync returned error"); + ceph_abort_msg("object_map sync returned error"); } err = backend->syncfs(); if (err < 0) { derr << "syncfs got " << cpp_strerror(err) << dendl; - ceph_assert(0 == "syncfs returned error"); + ceph_abort_msg("syncfs returned error"); } err = write_op_seq(op_fd, cp); if (err < 0) { derr << "Error during write_op_seq: " << cpp_strerror(err) << dendl; - ceph_assert(0 == "error during write_op_seq"); + ceph_abort_msg("error during write_op_seq"); } err = ::fsync(op_fd); if (err < 0) { derr << "Error during fsync of op_seq: " << cpp_strerror(err) << dendl; - ceph_assert(0 == "error during fsync of op_seq"); + ceph_abort_msg("error during fsync of op_seq"); } } @@ -4912,7 +4912,7 @@ int FileStore::list_collections(vector<coll_t>& ls, bool include_temp) if (int n = snprintf(filename, sizeof(filename), "%s/%s", fn, de->d_name); n >= static_cast<int>(sizeof(filename))) { derr << __func__ << " path length overrun: " << n << dendl; - ceph_assert(false); + ceph_abort(); } r = ::stat(filename, &sb); @@ -5536,7 +5536,7 @@ int FileStore::_collection_move_rename(const coll_t& oldcid, const ghobject_t& o << oldcid << "/" << oldoid << " (dne, ignoring enoent)" << dendl; } else { - ceph_assert(0 == "ERROR: source must exist"); + ceph_abort_msg("ERROR: source must exist"); } if (!replaying) { diff --git a/src/os/filestore/JournalingObjectStore.cc b/src/os/filestore/JournalingObjectStore.cc index 7e2b5728c57..714d0935608 100644 --- a/src/os/filestore/JournalingObjectStore.cc +++ b/src/os/filestore/JournalingObjectStore.cc @@ -170,7 +170,7 @@ void JournalingObjectStore::SubmitManager::op_submit_finish(uint64_t op) if (op != op_submitted + 1) { dout(0) << "op_submit_finish " << op << " expected " << (op_submitted + 1) << ", OUT OF ORDER" << dendl; - ceph_assert(0 == "out of order op_submit_finish"); + ceph_abort_msg("out of order op_submit_finish"); } op_submitted = op; lock.Unlock(); diff --git a/src/os/filestore/WBThrottle.cc b/src/os/filestore/WBThrottle.cc index e2a5d36c723..4ce5256ab7d 100644 --- a/src/os/filestore/WBThrottle.cc +++ b/src/os/filestore/WBThrottle.cc @@ -113,7 +113,7 @@ void WBThrottle::set_from_conf() fd_limits.second = cct->_conf->filestore_wbthrottle_xfs_inodes_hard_limit; } else { - ceph_assert(0 == "invalid value for fs"); + ceph_abort_msg("invalid value for fs"); } cond.Signal(); } diff --git a/src/os/filestore/chain_xattr.cc b/src/os/filestore/chain_xattr.cc index aa9ce2502fb..8d63f1d37ad 100644 --- a/src/os/filestore/chain_xattr.cc +++ b/src/os/filestore/chain_xattr.cc @@ -188,7 +188,7 @@ int chain_getxattr_buf(const char *fn, const char *name, bufferptr *bp) } } } - ceph_assert(0 == "unreachable"); + ceph_abort_msg("unreachable"); return 0; } diff --git a/src/os/fs/FS.cc b/src/os/fs/FS.cc index a530b54ab11..c40fd0deda3 100644 --- a/src/os/fs/FS.cc +++ b/src/os/fs/FS.cc @@ -113,7 +113,7 @@ int FS::copy_file_range(int to_fd, uint64_t to_offset, int from_fd, uint64_t from_offset, uint64_t from_len) { - ceph_assert(0 == "write me"); + ceph_abort_msg("write me"); } int FS::zero(int fd, uint64_t offset, uint64_t length) diff --git a/src/os/kstore/KStore.cc b/src/os/kstore/KStore.cc index ba1a3127adf..b9d7c121d21 100644 --- a/src/os/kstore/KStore.cc +++ b/src/os/kstore/KStore.cc @@ -1970,7 +1970,7 @@ void KStore::_txc_state_proc(TransContext *txc) default: derr << __func__ << " unexpected txc " << txc << " state " << txc->get_state_name() << dendl; - ceph_assert(0 == "unexpected txc state"); + ceph_abort_msg("unexpected txc state"); return; } } @@ -2231,7 +2231,7 @@ void KStore::_txc_add_transaction(TransContext *txc, Transaction *t) break; case Transaction::OP_SPLIT_COLLECTION: - ceph_assert(0 == "deprecated"); + ceph_abort_msg("deprecated"); break; case Transaction::OP_SPLIT_COLLECTION2: @@ -2275,7 +2275,7 @@ void KStore::_txc_add_transaction(TransContext *txc, Transaction *t) break; case Transaction::OP_COLL_RENAME: - ceph_assert(0 == "not implemented"); + ceph_abort_msg("not implemented"); break; } if (r < 0) { @@ -2289,7 +2289,7 @@ void KStore::_txc_add_transaction(TransContext *txc, Transaction *t) f.close_section(); f.flush(*_dout); *_dout << dendl; - ceph_assert(0 == "unexpected error"); + ceph_abort_msg("unexpected error"); } // object operations @@ -2397,7 +2397,7 @@ void KStore::_txc_add_transaction(TransContext *txc, Transaction *t) break; case Transaction::OP_CLONERANGE: - ceph_assert(0 == "deprecated"); + ceph_abort_msg("deprecated"); break; case Transaction::OP_CLONERANGE2: @@ -2412,15 +2412,15 @@ void KStore::_txc_add_transaction(TransContext *txc, Transaction *t) break; case Transaction::OP_COLL_ADD: - ceph_assert(0 == "not implemented"); + ceph_abort_msg("not implemented"); break; case Transaction::OP_COLL_REMOVE: - ceph_assert(0 == "not implemented"); + ceph_abort_msg("not implemented"); break; case Transaction::OP_COLL_MOVE: - ceph_assert(0 == "deprecated"); + ceph_abort_msg("deprecated"); break; case Transaction::OP_COLL_MOVE_RENAME: @@ -2536,7 +2536,7 @@ void KStore::_txc_add_transaction(TransContext *txc, Transaction *t) f.close_section(); f.flush(*_dout); *_dout << dendl; - ceph_assert(0 == "unexpected error"); + ceph_abort_msg("unexpected error"); } } } diff --git a/src/os/memstore/MemStore.cc b/src/os/memstore/MemStore.cc index ca384b8c760..199af45ab6a 100644 --- a/src/os/memstore/MemStore.cc +++ b/src/os/memstore/MemStore.cc @@ -840,7 +840,7 @@ void MemStore::_do_transaction(Transaction& t) break; case Transaction::OP_COLL_MOVE: - ceph_assert(0 == "deprecated"); + ceph_abort_msg("deprecated"); break; case Transaction::OP_COLL_MOVE_RENAME: @@ -868,19 +868,19 @@ void MemStore::_do_transaction(Transaction& t) case Transaction::OP_COLL_SETATTR: { - ceph_assert(0 == "not implemented"); + ceph_abort_msg("not implemented"); } break; case Transaction::OP_COLL_RMATTR: { - ceph_assert(0 == "not implemented"); + ceph_abort_msg("not implemented"); } break; case Transaction::OP_COLL_RENAME: { - ceph_assert(0 == "not implemented"); + ceph_abort_msg("not implemented"); } break; @@ -929,7 +929,7 @@ void MemStore::_do_transaction(Transaction& t) } break; case Transaction::OP_SPLIT_COLLECTION: - ceph_assert(0 == "deprecated"); + ceph_abort_msg("deprecated"); break; case Transaction::OP_SPLIT_COLLECTION2: { @@ -992,7 +992,7 @@ void MemStore::_do_transaction(Transaction& t) f.close_section(); f.flush(*_dout); *_dout << dendl; - ceph_assert(0 == "unexpected error"); + ceph_abort_msg("unexpected error"); } } |