Simplified distributed block storage with strong consistency, like in Ceph
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

39 lines
716 B

  1. // Copyright (c) Vitaliy Filippov, 2019+
  2. // License: VNPL-1.0 or GNU GPL-2.0+ (see README.md for details)
  3. #include "pg_states.h"
  4. const int pg_state_bit_count = 14;
  5. const int pg_state_bits[14] = {
  6. PG_STARTING,
  7. PG_PEERING,
  8. PG_INCOMPLETE,
  9. PG_ACTIVE,
  10. PG_STOPPING,
  11. PG_OFFLINE,
  12. PG_DEGRADED,
  13. PG_HAS_INCOMPLETE,
  14. PG_HAS_DEGRADED,
  15. PG_HAS_MISPLACED,
  16. PG_HAS_UNCLEAN,
  17. PG_HAS_INVALID,
  18. PG_LEFT_ON_DEAD,
  19. };
  20. const char *pg_state_names[14] = {
  21. "starting",
  22. "peering",
  23. "incomplete",
  24. "active",
  25. "stopping",
  26. "offline",
  27. "degraded",
  28. "has_incomplete",
  29. "has_degraded",
  30. "has_misplaced",
  31. "has_unclean",
  32. "has_invalid",
  33. "left_on_dead",
  34. };