1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 */ 4 5 /** \file 6 * Vector async io ops 7 */ 8 9 #ifndef SPDK_AIO_MGR_H 10 #define SPDK_AIO_MGR_H 11 12 #include "spdk/stdinc.h" 13 #include "spdk/queue.h" 14 15 struct spdk_aio_mgr_io; 16 struct spdk_aio_mgr; 17 18 typedef void (*fsdev_aio_done_cb)(void *ctx, uint32_t data_size, int error); 19 20 struct spdk_aio_mgr *spdk_aio_mgr_create(uint32_t max_aios); 21 struct spdk_aio_mgr_io *spdk_aio_mgr_read(struct spdk_aio_mgr *mgr, fsdev_aio_done_cb clb, 22 void *ctx, int fd, uint64_t offs, uint32_t size, struct iovec *iovs, uint32_t iovcnt); 23 struct spdk_aio_mgr_io *spdk_aio_mgr_write(struct spdk_aio_mgr *mgr, fsdev_aio_done_cb clb, 24 void *ctx, int fd, uint64_t offs, uint32_t size, const struct iovec *iovs, uint32_t iovcnt); 25 void spdk_aio_mgr_cancel(struct spdk_aio_mgr *mgr, struct spdk_aio_mgr_io *aio); 26 void spdk_aio_mgr_poll(struct spdk_aio_mgr *mgr); 27 void spdk_aio_mgr_delete(struct spdk_aio_mgr *mgr); 28 29 #endif /* SPDK_AIO_MGR_H */ 30