#ifdef UNIT_TESTS_BUILT
enum class InsertType { BEGIN, LAST, MID };
struct split_expectation_t {
- uint8_t split_stage;
- uint8_t insert_stage;
+ match_stage_t split_stage;
+ match_stage_t insert_stage;
bool is_insert_left;
InsertType insert_type;
};
struct last_split_info_t {
search_position_t split_pos;
- uint8_t insert_stage;
+ match_stage_t insert_stage;
bool is_insert_left;
InsertType insert_type;
bool match(const split_expectation_t& e) const {
namespace crimson::os::seastore::onode {
-using match_stage_t = uint8_t;
-constexpr match_stage_t STAGE_LEFT = 2u; // shard/pool/crush
-constexpr match_stage_t STAGE_STRING = 1u; // nspace/oid
-constexpr match_stage_t STAGE_RIGHT = 0u; // snap/gen
+using match_stage_t = int8_t;
+constexpr match_stage_t STAGE_LEFT = 2; // shard/pool/crush
+constexpr match_stage_t STAGE_STRING = 1; // nspace/oid
+constexpr match_stage_t STAGE_RIGHT = 0; // snap/gen
constexpr auto STAGE_TOP = STAGE_LEFT;
constexpr auto STAGE_BOTTOM = STAGE_RIGHT;
constexpr bool is_valid_stage(match_stage_t stage) {