Probe core UUIDs from metadata
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
@@ -83,6 +83,30 @@ typedef void (*ocf_metadata_probe_end_t)(void *priv, int error,
|
||||
void ocf_metadata_probe(ocf_ctx_t ctx, ocf_volume_t volume,
|
||||
ocf_metadata_probe_end_t cmpl, void *priv);
|
||||
|
||||
/**
|
||||
* @brief Metadata probe for cores completion callback
|
||||
*
|
||||
* @param[in] priv Completion context
|
||||
* @param[in] error Error code (zero on success)
|
||||
* @param[in] num_cores Number of cores in cache metadata
|
||||
*/
|
||||
typedef void (*ocf_metadata_probe_cores_end_t)(void *priv, int error,
|
||||
unsigned int num_cores);
|
||||
|
||||
/**
|
||||
* @brief Probe cache device for associated cores
|
||||
*
|
||||
* @param[in] ctx handle to object designating ocf context
|
||||
* @param[in] volume Cache volume
|
||||
* @param[in,out] uuids Array of uuids
|
||||
* @param[in] uuid_count Size of @uuid array
|
||||
* @param[in] cmpl Completion callback
|
||||
* @param[in] priv Completion context
|
||||
*/
|
||||
void ocf_metadata_probe_cores(ocf_ctx_t ctx, ocf_volume_t volume,
|
||||
struct ocf_volume_uuid *uuids, uint32_t uuid_count,
|
||||
ocf_metadata_probe_cores_end_t cmpl, void *priv);
|
||||
|
||||
/**
|
||||
* @brief Check if sectors in cache line before given address are invalid
|
||||
*
|
||||
|
||||
@@ -217,21 +217,6 @@ int ocf_mngt_cache_visit(ocf_ctx_t ctx, ocf_mngt_cache_visitor_t visitor,
|
||||
int ocf_mngt_cache_visit_reverse(ocf_ctx_t ctx, ocf_mngt_cache_visitor_t visitor,
|
||||
void *cntx);
|
||||
|
||||
/**
|
||||
* @brief Cache probe status
|
||||
*/
|
||||
struct ocf_mngt_cache_probe_status {
|
||||
/**
|
||||
* @brief Gracefully shutdown for cache detected
|
||||
*/
|
||||
bool clean_shutdown;
|
||||
|
||||
/**
|
||||
* @brief Cache is dirty and requires flushing
|
||||
*/
|
||||
bool cache_dirty;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Cache start configuration
|
||||
*/
|
||||
|
||||
@@ -29,7 +29,7 @@ struct ocf_volume_uuid {
|
||||
size_t size;
|
||||
/*!< UUID data size */
|
||||
|
||||
const void *data;
|
||||
void *data;
|
||||
/*!< UUID data content */
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user