Skip to content

Commit 9dffc45

Browse files
authored
Merge pull request linux-blktests#155 from yizhanglinux/blktests-throtl-max-sectors-update
throtl/{002,003}: update max_sectors setting Link: linux-blktests#155
2 parents 22f21d6 + 60fa2e3 commit 9dffc45

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

tests/throtl/002

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ QUICK=1
1313
test() {
1414
echo "Running ${TEST_NAME}"
1515

16-
if ! _set_up_throtl max_sectors=8; then
16+
local page_size max_secs
17+
page_size=$(getconf PAGE_SIZE)
18+
max_secs=$((page_size / 512))
19+
20+
if ! _set_up_throtl max_sectors="${max_secs}"; then
1721
return 1;
1822
fi
1923

tests/throtl/003

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ QUICK=1
1313
test() {
1414
echo "Running ${TEST_NAME}"
1515

16-
if ! _set_up_throtl max_sectors=8; then
16+
local page_size max_secs
17+
page_size=$(getconf PAGE_SIZE)
18+
max_secs=$((page_size / 512))
19+
20+
if ! _set_up_throtl max_sectors="${max_secs}"; then
1721
return 1;
1822
fi
1923

0 commit comments

Comments
 (0)