Merge pull request #654 from Open-CAS/fix-flapping-merge

Porting fix-flapping patches from v21.6.4 by arutk
This commit is contained in:
Robert Baldyga
2022-03-05 01:31:23 +01:00
committed by GitHub
8 changed files with 127 additions and 517 deletions

View File

@@ -83,7 +83,7 @@
/**
* Maximum value of a valid core sequence number
*/
#define OCF_SEQ_NO_MAX (65535UL)
#define OCF_SEQ_NO_MAX ((1ULL << (sizeof(ocf_core_id_t) * 8)) - 1)
/*
* Invalid value of core sequence number
*/

View File

@@ -92,30 +92,6 @@ 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
*