mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
cov: extent_size cannot be 0
Make this obvious to coverity.
This commit is contained in:
parent
9dfb1a11b7
commit
26ead4bf45
@ -1201,7 +1201,10 @@ int cache_single_set_params(struct cmd_context *cmd,
|
||||
* data size: the LV size minus the metadata size.
|
||||
*/
|
||||
|
||||
extent_size = pool_lv->vg->extent_size;
|
||||
if (!(extent_size = pool_lv->vg->extent_size)) {
|
||||
log_error(INTERNAL_ERROR "Extend size can't be 0.");
|
||||
return 0;
|
||||
}
|
||||
min_meta_size = extent_size;
|
||||
max_meta_size = 2 * DEFAULT_CACHE_POOL_MAX_METADATA_SIZE; /* 2x for KiB to sectors */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user