2020-09-17 23:02:40 +03:00
|
|
|
// Copyright (c) Vitaliy Filippov, 2019+
|
|
|
|
// License: VNPL-1.0 or GNU GPL-2.0+ (see README.md for details)
|
|
|
|
|
2020-08-03 23:50:50 +03:00
|
|
|
#ifndef VITASTOR_QEMU_PROXY_H
|
|
|
|
#define VITASTOR_QEMU_PROXY_H
|
2020-06-25 11:59:31 +03:00
|
|
|
|
2020-09-05 17:09:20 +03:00
|
|
|
#ifndef POOL_ID_BITS
|
|
|
|
#define POOL_ID_BITS 16
|
|
|
|
#endif
|
2020-06-25 11:59:31 +03:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <sys/uio.h>
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Our exports
|
2020-08-03 23:50:50 +03:00
|
|
|
typedef void VitastorIOHandler(int retval, void *opaque);
|
|
|
|
void* vitastor_proxy_create(AioContext *ctx, const char *etcd_host, const char *etcd_prefix);
|
|
|
|
void vitastor_proxy_destroy(void *client);
|
|
|
|
void vitastor_proxy_rw(int write, void *client, uint64_t inode, uint64_t offset, uint64_t len,
|
|
|
|
struct iovec *iov, int iovcnt, VitastorIOHandler cb, void *opaque);
|
|
|
|
void vitastor_proxy_sync(void *client, VitastorIOHandler cb, void *opaque);
|
2020-06-25 11:59:31 +03:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|