Skip to content

Commit 344cbd5

Browse files
committed
crimson: switch to ceph_abort_msg
ceph_abort doesn't print a message. Use ceph_abort_msg instead. Most of the instances are not printing useful information but some are: ceph_abort_msg("seastore device size setting is too small"); ``` ::ceph::__ceph_abort( __FILE__, __LINE__, __CEPH_ASSERT_FUNCTION, "abort() called") ::ceph::__ceph_abort( __FILE__, __LINE__, __CEPH_ASSERT_FUNCTION, msg) ``` Signed-off-by: Matan Breizman <[email protected]>
1 parent 5aeaa10 commit 344cbd5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+157
-157
lines changed

src/crimson/net/FrameAssemblerV2.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ FrameAssemblerV2::read_frame_payload()
427427
// and abort after putting entire data field on wire. This will be used by
428428
// the kernel client to avoid unnecessary buffering.
429429
if (!ok) {
430-
ceph_abort("TODO");
430+
ceph_abort_msg("TODO");
431431
}
432432
return &rx_segments_data;
433433
});

src/crimson/net/Interceptor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class socket_blocker {
7979
return seastar::sleep_abortable(
8080
std::chrono::seconds(10), *p_unblocked
8181
).then([] {
82-
ceph_abort("Timeout (10s) in socket_blocker::block()");
82+
ceph_abort_msg("Timeout (10s) in socket_blocker::block()");
8383
}).handle_exception_type([] (const seastar::sleep_aborted& e) {
8484
// wait done!
8585
});

src/crimson/net/ProtocolV2.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ void ProtocolV2::execute_connecting()
908908
logger().info("[Test] got BLOCK");
909909
return conn.interceptor->blocker.block();
910910
default:
911-
ceph_abort("unexpected action from trap");
911+
ceph_abort_msg("unexpected action from trap");
912912
return seastar::now();
913913
}
914914
});;
@@ -1041,7 +1041,7 @@ void ProtocolV2::execute_connecting()
10411041
return seastar::now();
10421042
}
10431043
default: {
1044-
ceph_abort("impossible next step");
1044+
ceph_abort_msg("impossible next step");
10451045
}
10461046
}
10471047
}).handle_exception([this](std::exception_ptr eptr) {
@@ -1693,7 +1693,7 @@ void ProtocolV2::execute_accepting()
16931693
execute_server_wait();
16941694
break;
16951695
default:
1696-
ceph_abort("impossible next step");
1696+
ceph_abort_msg("impossible next step");
16971697
}
16981698
}).handle_exception([this](std::exception_ptr eptr) {
16991699
const char *e_what;

src/crimson/net/Socket.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ Socket::try_trap_pre(bp_action_t& trap) {
332332
trap = action;
333333
break;
334334
default:
335-
ceph_abort("unexpected action from trap");
335+
ceph_abort_msg("unexpected action from trap");
336336
}
337337
return seastar::make_ready_future<>();
338338
}
@@ -349,7 +349,7 @@ Socket::try_trap_post(bp_action_t& trap) {
349349
force_shutdown();
350350
return blocker->block();
351351
default:
352-
ceph_abort("unexpected action from trap");
352+
ceph_abort_msg("unexpected action from trap");
353353
}
354354
return seastar::make_ready_future<>();
355355
}

src/crimson/net/io_handler.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,7 @@ IOHandler::do_out_dispatch(shard_states_t &ctx)
912912
ctx.exit_out_dispatching("switched", conn);
913913
return seastar::make_ready_future<stop_t>(stop_t::yes);
914914
default:
915-
ceph_abort("impossible");
915+
ceph_abort_msg("impossible");
916916
}
917917
}).handle_exception_type([this, &ctx](const std::system_error& e) {
918918
auto io_state = ctx.get_io_state();
@@ -1130,7 +1130,7 @@ void IOHandler::do_in_dispatch()
11301130
return seastar::now();
11311131
}
11321132
// TODO: message throttler
1133-
ceph_abort("TODO");
1133+
ceph_abort_msg("TODO");
11341134
return seastar::now();
11351135
}).then([this, msg_size] {
11361136
// throttle_bytes() logic

src/crimson/net/io_handler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ class IOHandler final : public ConnectionHandler {
329329
crimson::get_logger(ceph_subsys_ms).error(
330330
"{} try_enter_out_dispatching() got wrong io_state {}",
331331
conn, io_state);
332-
ceph_abort("impossible");
332+
ceph_abort_msg("impossible");
333333
}
334334
}
335335

src/crimson/os/seastore/async_cleaner.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@ segment_id_t SegmentCleaner::allocate_segment(
10751075
ERROR("out of space with {} {} {} {}",
10761076
type, segment_seq_printer_t{seq}, category,
10771077
rewrite_gen_printer_t{generation});
1078-
ceph_abort("seastore device size setting is too small");
1078+
ceph_abort_msg("seastore device size setting is too small");
10791079
return NULL_SEG_ID;
10801080
}
10811081

@@ -1703,7 +1703,7 @@ segment_id_t SegmentCleaner::get_next_reclaim_segment() const
17031703
} else {
17041704
ceph_assert(get_segments_reclaimable() == 0);
17051705
// see should_clean_space()
1706-
ceph_abort("impossible!");
1706+
ceph_abort_msg("impossible!");
17071707
return NULL_SEG_ID;
17081708
}
17091709
}

src/crimson/os/seastore/backref/btree_backref_manager.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ BtreeBackrefManager::new_mapping(
216216
t, addr, len, key,
217217
pos.get_key(), pos.get_val().len,
218218
pos.get_val());
219-
ceph_abort("not possible for the backref tree");
219+
ceph_abort_msg("not possible for the backref tree");
220220
return BackrefBtree::iterate_repeat_ret_inner(
221221
interruptible::ready_future_marker{},
222222
seastar::stop_iteration::no);

src/crimson/os/seastore/btree/fixed_kv_btree.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ class FixedKVBtree {
529529
}
530530
} else {
531531
ceph_assert(!child_node->is_valid());
532-
ceph_abort("impossible");
532+
ceph_abort_msg("impossible");
533533
}
534534
} else if (ret == Transaction::get_extent_ret::ABSENT) {
535535
BaseChildNode<std::remove_reference_t<decltype(*node)>,
@@ -573,7 +573,7 @@ class FixedKVBtree {
573573
i->get_key())));
574574
}
575575
} else {
576-
ceph_abort("impossible");
576+
ceph_abort_msg("impossible");
577577
}
578578
}
579579
}

src/crimson/os/seastore/cache.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,7 +1237,7 @@ record_t Cache::prepare_record(
12371237
if (!i.ref->is_valid()) {
12381238
SUBERRORT(seastore_t,
12391239
"read_set got invalid extent, aborting -- {}", t, *i.ref);
1240-
ceph_abort("no invalid extent allowed in transactions' read_set");
1240+
ceph_abort_msg("no invalid extent allowed in transactions' read_set");
12411241
}
12421242
get_by_ext(efforts.read_by_ext,
12431243
i.ref->get_type()).increment(i.ref->get_length());
@@ -1424,7 +1424,7 @@ record_t Cache::prepare_record(
14241424
remove_backref_extent(extent->get_paddr());
14251425
} else {
14261426
ERRORT("Got unexpected extent type: {}", t, *extent);
1427-
ceph_abort("imposible");
1427+
ceph_abort_msg("imposible");
14281428
}
14291429
}
14301430
alloc_deltas.emplace_back(std::move(rel_delta));
@@ -1642,7 +1642,7 @@ record_t Cache::prepare_record(
16421642
SUBINFOT(seastore_t, "alloc_tail all trimmed, set to head {}, src={}",
16431643
t, alloc_tail, trans_src);
16441644
} else if (*maybe_alloc_tail == JOURNAL_SEQ_NULL) {
1645-
ceph_abort("impossible");
1645+
ceph_abort_msg("impossible");
16461646
} else {
16471647
alloc_tail = *maybe_alloc_tail;
16481648
}
@@ -1859,7 +1859,7 @@ void Cache::complete_commit(
18591859
i->get_type());
18601860
} else {
18611861
ERRORT("{}", t, *i);
1862-
ceph_abort("not possible");
1862+
ceph_abort_msg("not possible");
18631863
}
18641864
});
18651865

0 commit comments

Comments
 (0)