Skip to content

Commit

Permalink
fix(tunings): set default Luworkers in case of invalid ENV value (#237)
Browse files Browse the repository at this point in the history
Signed-off-by: prateekpandey14 <[email protected]>
  • Loading branch information
prateekpandey14 authored and vishnuitta committed Mar 7, 2019
1 parent e5103d9 commit 67ed26a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/istgt_lu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1390,7 +1390,7 @@ static void set_queue_depth(CF_SECTION *sp, ISTGT_LU_Ptr lu)
} else {
lu->queue_depth = (int) strtol(val, NULL, 10);
}
if (lu->queue_depth < 0 || lu->queue_depth >= MAX_LU_QUEUE_DEPTH) {
if (lu->queue_depth < 1 || lu->queue_depth >= MAX_LU_QUEUE_DEPTH) {
ISTGT_ERRLOG("LU%d: queue depth %d is not in range, resetting to %d\n", lu->num, lu->queue_depth, DEFAULT_LU_QUEUE_DEPTH);
lu->queue_depth = DEFAULT_LU_QUEUE_DEPTH;
}
Expand Down Expand Up @@ -1423,7 +1423,7 @@ static void set_luworkers(CF_SECTION *sp, ISTGT_LU_Ptr lu)
}
else if (lu->luworkers < 1) {
ISTGT_ERRLOG("LU%d: luworkers %d is not in range, resetting to %d\n", lu->num, lu->luworkers, 1);
lu->luworkers = 1;
lu->luworkers = ISTGT_NUM_LUWORKERS_DEFAULT;
}
}
}
Expand Down

0 comments on commit 67ed26a

Please sign in to comment.