bdev/aio: Move structure definitions into bdev_aio.c
These didn't need to be visible. Change-Id: I337a02802cac4431b4abd9a922408d4147801565 Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/c/443308 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
d92e0a403b
commit
669f1ea74a
@ -46,9 +46,35 @@
|
||||
|
||||
#include "spdk_internal/log.h"
|
||||
|
||||
#include <libaio.h>
|
||||
|
||||
#include <sys/epoll.h>
|
||||
#include <sys/eventfd.h>
|
||||
|
||||
struct bdev_aio_task {
|
||||
struct iocb iocb;
|
||||
uint64_t len;
|
||||
TAILQ_ENTRY(bdev_aio_task) link;
|
||||
};
|
||||
|
||||
struct bdev_aio_io_channel {
|
||||
io_context_t io_ctx;
|
||||
uint64_t io_inflight;
|
||||
struct spdk_io_channel *group_ch;
|
||||
TAILQ_ENTRY(bdev_aio_io_channel) link;
|
||||
int efd;
|
||||
};
|
||||
|
||||
struct file_disk {
|
||||
struct bdev_aio_task *reset_task;
|
||||
struct spdk_poller *reset_retry_timer;
|
||||
struct spdk_bdev disk;
|
||||
char *filename;
|
||||
int fd;
|
||||
TAILQ_ENTRY(file_disk) link;
|
||||
bool block_size_override;
|
||||
};
|
||||
|
||||
static int bdev_aio_initialize(void);
|
||||
static void bdev_aio_fini(void);
|
||||
static void aio_free_disk(struct file_disk *fdisk);
|
||||
|
@ -36,39 +36,13 @@
|
||||
|
||||
#include "spdk/stdinc.h"
|
||||
|
||||
#include <libaio.h>
|
||||
|
||||
#include "spdk/queue.h"
|
||||
#include "spdk/bdev.h"
|
||||
|
||||
#include "spdk/bdev_module.h"
|
||||
|
||||
struct bdev_aio_task {
|
||||
struct iocb iocb;
|
||||
uint64_t len;
|
||||
TAILQ_ENTRY(bdev_aio_task) link;
|
||||
};
|
||||
|
||||
struct bdev_aio_io_channel {
|
||||
io_context_t io_ctx;
|
||||
uint64_t io_inflight;
|
||||
struct spdk_io_channel *group_ch;
|
||||
TAILQ_ENTRY(bdev_aio_io_channel) link;
|
||||
int efd;
|
||||
};
|
||||
|
||||
typedef void (*spdk_delete_aio_complete)(void *cb_arg, int bdeverrno);
|
||||
|
||||
struct file_disk {
|
||||
struct bdev_aio_task *reset_task;
|
||||
struct spdk_poller *reset_retry_timer;
|
||||
struct spdk_bdev disk;
|
||||
char *filename;
|
||||
int fd;
|
||||
TAILQ_ENTRY(file_disk) link;
|
||||
bool block_size_override;
|
||||
};
|
||||
|
||||
struct spdk_bdev *create_aio_disk(const char *name, const char *filename, uint32_t block_size);
|
||||
|
||||
void delete_aio_disk(struct spdk_bdev *bdev, spdk_delete_aio_complete cb_fn, void *cb_arg);
|
||||
|
Loading…
Reference in New Issue
Block a user