diff --git a/inc/ocf_def.h b/inc/ocf_def.h index 20631dd..320fdcf 100644 --- a/inc/ocf_def.h +++ b/inc/ocf_def.h @@ -31,7 +31,7 @@ /** * Minimum cache size in bytes */ -#define OCF_CACHE_SIZE_MIN (20 * MiB) +#define OCF_CACHE_SIZE_MIN (40 * MiB) /** * Size of cache name */ diff --git a/src/metadata/metadata.c b/src/metadata/metadata.c index 6e01e76..3839c83 100644 --- a/src/metadata/metadata.c +++ b/src/metadata/metadata.c @@ -670,7 +670,7 @@ int ocf_metadata_init_variable_size(struct ocf_cache *cache, /* TODO: This is just a rough check. Most optimal one would be * located in calculate_metadata_size. */ ocf_cache_log(cache, log_err, "Device exceeds maximum suported size " - "with this cache line size. Try bigger cache line size."); + "with this cache line size. Try bigger cache line size.\n"); return -OCF_ERR_INVAL_CACHE_DEV; } @@ -712,7 +712,9 @@ int ocf_metadata_init_variable_size(struct ocf_cache *cache, } if (0 != ocf_metadata_calculate_metadata_size(cache, ctrl, line_size)) { - return -1; + ocf_cache_log(cache, log_err, "Couldn't fit metadata structure " + "on device. Please try bigger cache device.\n"); + return -OCF_ERR_INVAL_CACHE_DEV; } OCF_DEBUG_PARAM(cache, "Metadata begin pages = %u", ctrl->start_page); diff --git a/src/mngt/ocf_mngt_cache.c b/src/mngt/ocf_mngt_cache.c index 869705e..5776909 100644 --- a/src/mngt/ocf_mngt_cache.c +++ b/src/mngt/ocf_mngt_cache.c @@ -735,8 +735,8 @@ static void _ocf_mngt_attach_cache_device(ocf_pipeline_t pipeline, /* Check minimum size of cache device */ if (context->volume_size < OCF_CACHE_SIZE_MIN) { - ocf_cache_log(cache, log_err, "ERROR: Cache cache size must " - "be at least %llu [MiB]\n", OCF_CACHE_SIZE_MIN / MiB); + ocf_cache_log(cache, log_err, "Cache device size must " + "be at least %llu MiB\n", OCF_CACHE_SIZE_MIN / MiB); OCF_PL_FINISH_RET(pipeline, -OCF_ERR_INVAL_CACHE_DEV); }