blktrace: Add support for sparse CPU numbers

On some machines CPU numbers do not form a contiguous interval. In such
cases blktrace will fail to start threads for missing CPUs and exit
effectively rendering itself unusable.

Add support into blktrace to handle systems with sparse CPU numbers.

Signed-off-by: Jan Kara <>
Signed-off-by: Jens Axboe <>
1 file changed