Update sample (cache name string as array)

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
Adam Rutkowski 2019-08-29 12:59:39 -04:00
parent 358c529eff
commit 5df29c80de

View File

@ -91,7 +91,7 @@ static void simple_complete(ocf_cache_t cache, void *priv, int error)
*/ */
int initialize_cache(ocf_ctx_t ctx, ocf_cache_t *cache) int initialize_cache(ocf_ctx_t ctx, ocf_cache_t *cache)
{ {
struct ocf_mngt_cache_config cache_cfg = { }; struct ocf_mngt_cache_config cache_cfg = { .name = "cache1" };
struct ocf_mngt_cache_device_config device_cfg = { }; struct ocf_mngt_cache_device_config device_cfg = { };
struct cache_priv *cache_priv; struct cache_priv *cache_priv;
struct simple_context context; struct simple_context context;
@ -106,7 +106,6 @@ int initialize_cache(ocf_ctx_t ctx, ocf_cache_t *cache)
/* Cache configuration */ /* Cache configuration */
ocf_mngt_cache_config_set_default(&cache_cfg); ocf_mngt_cache_config_set_default(&cache_cfg);
cache_cfg.metadata_volatile = true; cache_cfg.metadata_volatile = true;
cache_cfg.name = "cache1";
/* Cache deivce (volume) configuration */ /* Cache deivce (volume) configuration */
ocf_mngt_cache_device_config_set_default(&device_cfg); ocf_mngt_cache_device_config_set_default(&device_cfg);