]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/spdk/ocf/src/utils/utils_io.h
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / spdk / ocf / src / utils / utils_io.h
index 2a31f162c6d2c26e76900a971b511e7e34032cfc..418491c1c1d1a91c169265ee3bacd9ce03d97094 100644 (file)
@@ -60,22 +60,25 @@ void ocf_submit_cache_page(ocf_cache_t cache, uint64_t addr, int dir,
 void ocf_submit_volume_req(ocf_volume_t volume, struct ocf_request *req,
                ocf_req_end_t callback);
 
-
 void ocf_submit_cache_reqs(struct ocf_cache *cache,
-               struct ocf_map_info *map_info, struct ocf_request *req, int dir,
-               unsigned int reqs, ocf_req_end_t callback);
+               struct ocf_request *req, int dir, uint64_t offset,
+               uint64_t size, unsigned int reqs, ocf_req_end_t callback);
+
+static inline struct ocf_io *ocf_new_cache_io(ocf_cache_t cache,
+               ocf_queue_t queue, uint64_t addr, uint32_t bytes,
+               uint32_t dir, uint32_t io_class, uint64_t flags)
 
-static inline struct ocf_io *ocf_new_cache_io(struct ocf_cache *cache)
 {
-       return ocf_volume_new_io(&cache->device->volume);
+       return ocf_volume_new_io(ocf_cache_get_volume(cache), queue,
+                       addr, bytes, dir, io_class, flags);
 }
 
-static inline struct ocf_io *ocf_new_core_io(struct ocf_cache *cache,
-               ocf_core_id_t core_id)
+static inline struct ocf_io *ocf_new_core_io(ocf_core_t core,
+               ocf_queue_t queue, uint64_t addr, uint32_t bytes,
+               uint32_t dir, uint32_t io_class, uint64_t flags)
 {
-       ENV_BUG_ON(core_id >= OCF_CORE_MAX);
-
-       return ocf_volume_new_io(&cache->core[core_id].volume);
+       return ocf_volume_new_io(ocf_core_get_volume(core), queue,
+                       addr, bytes, dir, io_class, flags);
 }
 
 #endif /* UTILS_IO_H_ */