Branch data Line data Source code
1 : : /* SPDX-License-Identifier: BSD-3-Clause 2 : : * Copyright (C) 2018 Intel Corporation. 3 : : * All rights reserved. 4 : : */ 5 : : 6 : : #ifndef VBDEV_OCF_DOBJ_H 7 : : #define VBDEV_OCF_DOBJ_H 8 : : 9 : : #include <ocf/ocf.h> 10 : : 11 : : #include "ctx.h" 12 : : #include "data.h" 13 : : 14 : : /* ocf_io context 15 : : * It is initialized from io size and offset */ 16 : : struct ocf_io_ctx { 17 : : struct bdev_ocf_data *data; 18 : : struct spdk_io_channel *ch; 19 : : uint32_t offset; 20 : : int ref; 21 : : int rq_cnt; 22 : : int error; 23 : : bool iovs_allocated; 24 : : }; 25 : : 26 : : int vbdev_ocf_volume_init(void); 27 : : void vbdev_ocf_volume_cleanup(void); 28 : : 29 : : static inline struct ocf_io_ctx * 30 : 11377530 : ocf_get_io_ctx(struct ocf_io *io) 31 : : { 32 : 11377530 : return ocf_io_get_priv(io); 33 : : } 34 : : 35 : : #endif