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.
 
 
 
 
 
 

36 lines
1.2 KiB

  1. // Copyright (c) Vitaliy Filippov, 2019+
  2. // License: VNPL-1.1 or GNU GPL-2.0+ (see README.md for details)
  3. #ifndef VITASTOR_QEMU_PROXY_H
  4. #define VITASTOR_QEMU_PROXY_H
  5. #ifndef POOL_ID_BITS
  6. #define POOL_ID_BITS 16
  7. #endif
  8. #include <stdint.h>
  9. #include <sys/uio.h>
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. // Our exports
  14. typedef void VitastorIOHandler(long retval, void *opaque);
  15. void* vitastor_proxy_create(AioContext *ctx, const char *config_path, const char *etcd_host, const char *etcd_prefix,
  16. const char *rdma_device, int rdma_port_num, int rdma_gid_index, int rdma_mtu);
  17. void vitastor_proxy_destroy(void *client);
  18. void vitastor_proxy_rw(int write, void *client, uint64_t inode, uint64_t offset, uint64_t len,
  19. struct iovec *iov, int iovcnt, VitastorIOHandler cb, void *opaque);
  20. void vitastor_proxy_sync(void *client, VitastorIOHandler cb, void *opaque);
  21. void vitastor_proxy_watch_metadata(void *client, char *image, VitastorIOHandler cb, void *opaque);
  22. void vitastor_proxy_close_watch(void *client, void *watch);
  23. uint64_t vitastor_proxy_get_size(void *watch);
  24. uint64_t vitastor_proxy_get_inode_num(void *watch);
  25. int vitastor_proxy_get_readonly(void *watch);
  26. #ifdef __cplusplus
  27. }
  28. #endif
  29. #endif