Goddess of Justice DB, the database used for storage on IzaroDFS
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

38 righe
850 B

5 anni fa
5 anni fa
5 anni fa
5 anni fa
  1. #pragma once
  2. #include "endian.hpp"
  3. #include "database.hpp"
  4. enum class db_op : uint32_t {
  5. version = 0,
  6. read = 1,
  7. write = 2,
  8. remove = 3,
  9. stats = 4,
  10. sread = 5,
  11. swrite = 6,
  12. sallocate = 7,
  13. sremove = 3,
  14. confirm = 8
  15. };
  16. struct [[gnu::packed]] received_data {
  17. bitops::regulated<db_op> op = db_op::version;
  18. bitops::regulated<uint64_t> rep_id = 0;
  19. record_identifier identifier = record_identifier{};
  20. db_page page = {0};
  21. };
  22. struct [[gnu::packed]] sending_data {
  23. bitops::regulated<uint64_t> rep_id = 0;
  24. record identifier = record{};
  25. db_page page = {0};
  26. };
  27. struct [[gnu::packed]] stats_data {
  28. bitops::regulated<uint64_t> free;
  29. bitops::regulated<uint64_t> free_deleted;
  30. bitops::regulated<uint64_t> total_pages;
  31. bitops::regulated<uint64_t> total_records;
  32. bitops::regulated<uint64_t> total_delete;
  33. bitops::regulated<uint64_t> cow_full;
  34. };