2020-09-17 23:02:40 +03:00
|
|
|
// Copyright (c) Vitaliy Filippov, 2019+
|
2021-02-06 01:26:07 +03:00
|
|
|
// License: VNPL-1.1 or GNU GPL-2.0+ (see README.md for details)
|
2020-09-17 23:02:40 +03:00
|
|
|
|
2020-05-21 21:00:54 +03:00
|
|
|
#include "pg_states.h"
|
|
|
|
|
2021-11-13 02:06:54 +03:00
|
|
|
const int pg_state_bit_count = 16;
|
2020-05-21 21:00:54 +03:00
|
|
|
|
2021-11-13 02:06:54 +03:00
|
|
|
const int pg_state_bits[16] = {
|
2020-05-21 21:00:54 +03:00
|
|
|
PG_STARTING,
|
|
|
|
PG_PEERING,
|
2021-11-13 02:06:54 +03:00
|
|
|
PG_PEERED,
|
2020-05-21 21:00:54 +03:00
|
|
|
PG_INCOMPLETE,
|
|
|
|
PG_ACTIVE,
|
2021-04-07 01:29:30 +03:00
|
|
|
PG_REPEERING,
|
2020-05-21 21:00:54 +03:00
|
|
|
PG_STOPPING,
|
|
|
|
PG_OFFLINE,
|
|
|
|
PG_DEGRADED,
|
|
|
|
PG_HAS_INCOMPLETE,
|
|
|
|
PG_HAS_DEGRADED,
|
|
|
|
PG_HAS_MISPLACED,
|
|
|
|
PG_HAS_UNCLEAN,
|
2020-09-04 22:17:44 +03:00
|
|
|
PG_HAS_INVALID,
|
2020-05-21 21:00:54 +03:00
|
|
|
PG_LEFT_ON_DEAD,
|
|
|
|
};
|
|
|
|
|
2021-11-13 02:06:54 +03:00
|
|
|
const char *pg_state_names[16] = {
|
2020-05-21 21:00:54 +03:00
|
|
|
"starting",
|
|
|
|
"peering",
|
2021-11-13 02:06:54 +03:00
|
|
|
"peered",
|
2020-05-21 21:00:54 +03:00
|
|
|
"incomplete",
|
|
|
|
"active",
|
2021-04-07 01:29:30 +03:00
|
|
|
"repeering",
|
2020-05-21 21:00:54 +03:00
|
|
|
"stopping",
|
|
|
|
"offline",
|
|
|
|
"degraded",
|
|
|
|
"has_incomplete",
|
|
|
|
"has_degraded",
|
|
|
|
"has_misplaced",
|
|
|
|
"has_unclean",
|
2020-09-04 22:17:44 +03:00
|
|
|
"has_invalid",
|
2020-05-21 21:00:54 +03:00
|
|
|
"left_on_dead",
|
|
|
|
};
|