Merge pull request #795 from robertbaldyga/fix-seq-cutoff-thresh-units

casadm: Fix seq cutoff threshold units
This commit is contained in:
Robert Baldyga 2021-04-12 15:06:34 +02:00 committed by GitHub
commit eaebdffa5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -728,8 +728,8 @@ int set_param_seq_cutoff_handle_option(char *opt, const char **arg)
{ {
if (!strcmp(opt, "threshold")) { if (!strcmp(opt, "threshold")) {
if (validate_str_num(arg[0], "sequential cutoff threshold", if (validate_str_num(arg[0], "sequential cutoff threshold",
OCF_SEQ_CUTOFF_MIN_THRESHOLD, OCF_SEQ_CUTOFF_MIN_THRESHOLD / KiB,
OCF_SEQ_CUTOFF_MAX_THRESHOLD) == FAILURE) OCF_SEQ_CUTOFF_MAX_THRESHOLD / KiB) == FAILURE)
return FAILURE; return FAILURE;
SET_CORE_PARAM(core_param_seq_cutoff_threshold, atoi(arg[0]) * KiB); SET_CORE_PARAM(core_param_seq_cutoff_threshold, atoi(arg[0]) * KiB);