]> Git Repo - linux.git/commit
bcachefs: check the invalid parameter for perf test
authorHongbo Li <[email protected]>
Tue, 29 Oct 2024 12:53:29 +0000 (20:53 +0800)
committerKent Overstreet <[email protected]>
Thu, 7 Nov 2024 21:48:21 +0000 (16:48 -0500)
commit9bb33852f5cc145b17d96f3792ff69148a37e1fd
tree83b07d77213c487a8fed3223da63c3447bd1daff
parent93d53f1caf2cf861d0f28d096792d3b92efae178
bcachefs: check the invalid parameter for perf test

The perf_test does not check the number of iterations and threads
when it is zero. If nr_thread is 0, the perf test will keep
waiting for wakekup. If iteration is 0, it will cause exception
of division by zero. This can be reproduced by:
  echo "rand_insert 0 1" > /sys/fs/bcachefs/${uuid}/perf_test
or
  echo "rand_insert 1 0" > /sys/fs/bcachefs/${uuid}/perf_test

Fixes: 1c6fdbd8f246 ("bcachefs: Initial commit")
Signed-off-by: Hongbo Li <[email protected]>
Signed-off-by: Kent Overstreet <[email protected]>
fs/bcachefs/tests.c
This page took 0.052663 seconds and 4 git commands to generate.