2 Star 1 Fork 1

吴越/spdk_oss

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
liboss.h 1.97 KB
一键复制 编辑 原始数据 按行查看 历史
吴越 提交于 2021-01-10 20:54 . update
#ifndef LIBOSS_H
#define LIBOSS_H
#include <stdint.h>
struct io_channel;
typedef struct io_channel io_channel;
struct oss_stat_t {
uint32_t object_max_num;
uint32_t object_max_size;
uint32_t oid_block_size;
uint64_t total_space;
uint64_t free_space;
};
struct zcell_addr_t {
union {
struct {
uint32_t lcore;
}local;
struct {
char *ip;
int port;
}remote;
};
};
extern int tls_io_ctx_init(int flags , void **ctx);
extern int tls_io_ctx_fini( void *ctx );
extern io_channel *get_io_channel_with(const char *ip, int port ,int max_qd);
extern io_channel *get_io_channel_with_local(uint32_t core ,int max_qd);
extern int get_io_channel_with_local_all(int max_qd , io_channel **chs);
extern void liboss_put_io_channel(io_channel *ioch);
extern int io_stat(io_channel *ch);
extern int io_create(io_channel *ch , uint64_t oid);
extern int io_delete(io_channel *ch , uint64_t oid);
extern int io_read(io_channel *ch, uint64_t oid, uint64_t ofst, uint32_t len);
extern int io_read2(io_channel *ch, void *rbuf, uint64_t oid, uint64_t ofst, uint32_t len );
extern int io_write(io_channel *ch, uint64_t oid, const void* buffer, uint64_t ofst, uint32_t len);
extern int io_buffer_alloc(io_channel *ch, void** ptr, uint32_t size);
extern int io_buffer_free (io_channel *ch, void* ptr);
extern int op_set_userdata(io_channel *ch, int op_id , uint64_t userdata);
extern uint64_t op_get_userdata(io_channel *ch, int op_id);
extern int op_set_qos_tag(io_channel *ch, int op_id , int tag);
extern int op_claim_result(io_channel *ch, int op_id, int *status, int* op_type, void** data_buffer, uint32_t *data_len);
extern int op_destory(io_channel *ch, int op_id);
extern int stat_result_parse_to(void *data_buffer, struct oss_stat_t *stat_, char *str);
extern int io_submit_to_channel(io_channel *ch , int *ops , int nr);
extern int io_poll_channel(io_channel *ch, int *op_cpl, int min, int max);
#endif
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wynebula/spdk_oss.git
git@gitee.com:wynebula/spdk_oss.git
wynebula
spdk_oss
spdk_oss
master

搜索帮助