Skip to content

Commit 67ed26a

Browse files
prateekpandey14vishnuitta
authored andcommitted
fix(tunings): set default Luworkers in case of invalid ENV value (#237)
Signed-off-by: prateekpandey14 <[email protected]>
1 parent e5103d9 commit 67ed26a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/istgt_lu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1390,7 +1390,7 @@ static void set_queue_depth(CF_SECTION *sp, ISTGT_LU_Ptr lu)
13901390
} else {
13911391
lu->queue_depth = (int) strtol(val, NULL, 10);
13921392
}
1393-
if (lu->queue_depth < 0 || lu->queue_depth >= MAX_LU_QUEUE_DEPTH) {
1393+
if (lu->queue_depth < 1 || lu->queue_depth >= MAX_LU_QUEUE_DEPTH) {
13941394
ISTGT_ERRLOG("LU%d: queue depth %d is not in range, resetting to %d\n", lu->num, lu->queue_depth, DEFAULT_LU_QUEUE_DEPTH);
13951395
lu->queue_depth = DEFAULT_LU_QUEUE_DEPTH;
13961396
}
@@ -1423,7 +1423,7 @@ static void set_luworkers(CF_SECTION *sp, ISTGT_LU_Ptr lu)
14231423
}
14241424
else if (lu->luworkers < 1) {
14251425
ISTGT_ERRLOG("LU%d: luworkers %d is not in range, resetting to %d\n", lu->num, lu->luworkers, 1);
1426-
lu->luworkers = 1;
1426+
lu->luworkers = ISTGT_NUM_LUWORKERS_DEFAULT;
14271427
}
14281428
}
14291429
}

0 commit comments

Comments
 (0)