bdev/aio: Keep a pointer to the channel on the aio_task
This will be used later. Change-Id: I12b07756a13d03a34c9705306d720c1db7ecb15c Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/c/443312 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com>
This commit is contained in:
parent
7f534fca6a
commit
0ed2a120b3
@ -48,12 +48,6 @@
|
||||
|
||||
#include <libaio.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;
|
||||
@ -67,6 +61,13 @@ struct bdev_aio_group_channel {
|
||||
TAILQ_HEAD(, bdev_aio_io_channel) channels;
|
||||
};
|
||||
|
||||
struct bdev_aio_task {
|
||||
struct iocb iocb;
|
||||
uint64_t len;
|
||||
struct bdev_aio_io_channel *ch;
|
||||
TAILQ_ENTRY(bdev_aio_task) link;
|
||||
};
|
||||
|
||||
struct file_disk {
|
||||
struct bdev_aio_task *reset_task;
|
||||
struct spdk_poller *reset_retry_timer;
|
||||
@ -157,6 +158,7 @@ bdev_aio_readv(struct file_disk *fdisk, struct spdk_io_channel *ch,
|
||||
io_prep_preadv(iocb, fdisk->fd, iov, iovcnt, offset);
|
||||
iocb->data = aio_task;
|
||||
aio_task->len = nbytes;
|
||||
aio_task->ch = aio_ch;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_AIO, "read %d iovs size %lu to off: %#lx\n",
|
||||
iovcnt, nbytes, offset);
|
||||
@ -187,6 +189,7 @@ bdev_aio_writev(struct file_disk *fdisk, struct spdk_io_channel *ch,
|
||||
io_prep_pwritev(iocb, fdisk->fd, iov, iovcnt, offset);
|
||||
iocb->data = aio_task;
|
||||
aio_task->len = len;
|
||||
aio_task->ch = aio_ch;
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_AIO, "write %d iovs size %lu from off: %#lx\n",
|
||||
iovcnt, len, offset);
|
||||
|
Loading…
Reference in New Issue
Block a user