Introduce forward_io_simple
It's intended to be used in a context, where cache is not initialized and the io_queue is not available yet. 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
1f26ceb563
commit
1c2d5bbcf3
16
inc/ocf_io.h
16
inc/ocf_io.h
@@ -337,6 +337,22 @@ void ocf_forward_write_zeros(ocf_volume_t volume, ocf_forward_token_t token,
|
||||
void ocf_forward_metadata(ocf_volume_t volume, ocf_forward_token_t token,
|
||||
int dir, uint64_t addr, uint64_t bytes, uint64_t offset);
|
||||
|
||||
/**
|
||||
* @brief Forward io simple to another subvolume
|
||||
*
|
||||
* Forwarding automatically increases forwarded io refcount, so at some
|
||||
* point additional ocf_forward_end() needs to be called to balance it.
|
||||
*
|
||||
* @param[in] token Forward token
|
||||
* @param[in] volume Volume to which IO is being submitted
|
||||
* @param[in] token Token representing IO to be forwarded
|
||||
* @param[in] dir Direction OCF_READ/OCF_WRITE
|
||||
* @param[in] addr Address to which IO is being submitted
|
||||
* @param[in] bytes Length of the IO
|
||||
*/
|
||||
void ocf_forward_io_simple(ocf_volume_t volume, ocf_forward_token_t token,
|
||||
int dir, uint64_t addr, uint64_t bytes);
|
||||
|
||||
/**
|
||||
* @brief Increment forwarded io refcount
|
||||
*
|
||||
|
||||
@@ -143,6 +143,20 @@ struct ocf_volume_ops {
|
||||
int dir, uint64_t addr, uint64_t bytes,
|
||||
uint64_t offset);
|
||||
|
||||
/**
|
||||
* @brief Forward the io directly to the volume in context
|
||||
* where cache is not initialized yet
|
||||
*
|
||||
* @param[in] volume Volume to which IO is being submitted
|
||||
* @param[in] token Token representing IO to be forwarded
|
||||
* @param[in] dir Direction OCF_READ/OCF_WRITE
|
||||
* @param[in] addr Address to which IO is being submitted
|
||||
* @param[in] bytes Length of the IO
|
||||
*/
|
||||
void (*forward_io_simple)(ocf_volume_t volume,
|
||||
ocf_forward_token_t token, int dir,
|
||||
uint64_t addr, uint64_t bytes);
|
||||
|
||||
/**
|
||||
* @brief Volume initialization callback, called when volume object
|
||||
* is being initialized
|
||||
|
||||
Reference in New Issue
Block a user