Replace ocf_forward_get_io() with more specific ops
struct ocf_io is going to be removed soon (consolidated with ocf_request). Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com> Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
This commit is contained in:
committed by
Michal Mielewczyk
parent
6aa141c247
commit
2d303e8d09
@@ -552,13 +552,6 @@ void ocf_req_forward_core_discard(struct ocf_request *req, uint64_t addr,
|
||||
ocf_volume_forward_discard(volume, token, addr, bytes);
|
||||
}
|
||||
|
||||
struct ocf_io *ocf_forward_get_io(ocf_forward_token_t token)
|
||||
{
|
||||
struct ocf_request *req = (struct ocf_request *)(token & ~1);
|
||||
|
||||
return &req->ioi.io;
|
||||
}
|
||||
|
||||
ctx_data_t *ocf_forward_get_data(ocf_forward_token_t token)
|
||||
{
|
||||
struct ocf_request *req = (struct ocf_request *)(token & ~1);
|
||||
@@ -566,6 +559,27 @@ ctx_data_t *ocf_forward_get_data(ocf_forward_token_t token)
|
||||
return req->data;
|
||||
}
|
||||
|
||||
ocf_queue_t ocf_forward_get_io_queue(ocf_forward_token_t token)
|
||||
{
|
||||
struct ocf_request *req = (struct ocf_request *)(token & ~1);
|
||||
|
||||
return req->io_queue;
|
||||
}
|
||||
|
||||
uint8_t ocf_forward_get_io_class(ocf_forward_token_t token)
|
||||
{
|
||||
struct ocf_request *req = (struct ocf_request *)(token & ~1);
|
||||
|
||||
return req->ioi.io.io_class;
|
||||
}
|
||||
|
||||
uint64_t ocf_forward_get_flags(ocf_forward_token_t token)
|
||||
{
|
||||
struct ocf_request *req = (struct ocf_request *)(token & ~1);
|
||||
|
||||
return (token & 1) ? 0 : req->ioi.io.flags;
|
||||
}
|
||||
|
||||
static inline void _ocf_forward_get(ocf_forward_token_t token)
|
||||
{
|
||||
struct ocf_request *req = (struct ocf_request *)(token & ~1);
|
||||
|
||||
Reference in New Issue
Block a user