blktrace: fix bugs in accounting
authorJens Axboe <axboe@fb.com>
Fri, 24 Apr 2015 15:03:05 +0000 (09:03 -0600)
committerJens Axboe <axboe@fb.com>
Fri, 24 Apr 2015 15:03:05 +0000 (09:03 -0600)
We need to clear the trim part of the accounting arrays, otherwise
we can use bogus values leading to attempting to allocate huge
amounts of memory. This causes fio to exit with:

fio: pid=21428, err=12/file:memory.c:242, func=iomem allocation,
error=Cannot allocate memory

Also improve the depth detection, by making it per data direction
instead of a global state.

Signed-off-by: Jens Axboe <axboe@fb.com>

No differences found