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.
 
 
 
 
 
 

42 lines
968 B

  1. // Copyright (c) Vitaliy Filippov, 2019+
  2. // License: VNPL-1.0 (see README.md for details)
  3. #pragma once
  4. #include "osd.h"
  5. #include "osd_rmw.h"
  6. #define SUBMIT_READ 0
  7. #define SUBMIT_RMW_READ 1
  8. #define SUBMIT_WRITE 2
  9. struct unstable_osd_num_t
  10. {
  11. osd_num_t osd_num;
  12. int start, len;
  13. };
  14. struct osd_primary_op_data_t
  15. {
  16. int st = 0;
  17. pg_num_t pg_num;
  18. object_id oid;
  19. uint64_t target_ver;
  20. uint64_t fact_ver = 0;
  21. uint64_t scheme = 0;
  22. int n_subops = 0, done = 0, errors = 0, epipe = 0;
  23. int degraded = 0, pg_size, pg_data_size;
  24. osd_rmw_stripe_t *stripes;
  25. osd_op_t *subops = NULL;
  26. uint64_t *prev_set = NULL;
  27. pg_osd_set_state_t *object_state = NULL;
  28. // for sync. oops, requires freeing
  29. std::vector<unstable_osd_num_t> *unstable_write_osds = NULL;
  30. pool_pg_num_t *dirty_pgs = NULL;
  31. int dirty_pg_count = 0;
  32. osd_num_t *dirty_osds = NULL;
  33. int dirty_osd_count = 0;
  34. obj_ver_id *unstable_writes = NULL;
  35. };