Goddess of Justice DB, the database used for storage on IzaroDFS
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

33 rindas
803 B

pirms 5 gadiem
pirms 5 gadiem
pirms 5 gadiem
  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. };
  11. struct [[gnu::packed]] received_data {
  12. bitops::regulated<db_op> op = db_op::version;
  13. bitops::regulated<uint64_t> rep_id = 0;
  14. record_identifier identifier = record_identifier{};
  15. db_page page = {0};
  16. };
  17. struct [[gnu::packed]] sending_data {
  18. bitops::regulated<uint64_t> rep_id = 0;
  19. record_identifier identifier = record_identifier{};
  20. db_page page = {0};
  21. };
  22. struct [[gnu::packed]] stats_data {
  23. bitops::regulated<uint64_t> free;
  24. bitops::regulated<uint64_t> free_deleted;
  25. bitops::regulated<uint64_t> total_pages;
  26. bitops::regulated<uint64_t> total_records;
  27. bitops::regulated<uint64_t> total_delete;
  28. bitops::regulated<uint64_t> cow_full;
  29. };