blktrace: Create empty output files for non-existent cpus
authorJan Kara <jack@suse.cz>
Thu, 26 Jan 2017 10:23:55 +0000 (11:23 +0100)
committerJens Axboe <axboe@fb.com>
Thu, 26 Jan 2017 17:06:05 +0000 (10:06 -0700)
commit8772bc4fb049bdd879de5952d6f291a34112fae0
treedfa287a67374349820f7b666effae2cace0a2866
parentd7a1f72671eb67a7d0cd261ea4520b9551c51f5f
blktrace: Create empty output files for non-existent cpus

When CPU number space is sparse, we don't start threads for non-existent
CPUs. As a result, there are no output files created for these CPUs
which confuses tools like blkparse which expect that CPU numbers are
contiguous. Create fake empty files for non-existent CPUs so that other
tools don't have to bother.

Note that in network mode, the server will create all files in the range
0..max_cpus automatically.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
blktrace.c