blkparse: Fix up the sector and length of split completions
authorAndreas Gruenbacher <agruenba@redhat.com>
Mon, 13 Apr 2020 19:01:52 +0000 (21:01 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 7 May 2020 18:22:37 +0000 (12:22 -0600)
commite81829a565162d41e2f551dc5e0f74f22f319554
tree6bd9e08703df0f745cb4f5dd3e5066d98d928a2d
parenta61c06774d03fb768fa9fb021e94599822848c8a
blkparse: Fix up the sector and length of split completions

When a split io completes, the sector and length of the completion event refer
to the last part of the original request.  This is in conflict with the
blkparse manual page, makes the blkparse output difficult to read, and leads to
incorrect statistics.  Fix up the sector and length of split completion events
to match the original request.

To achieve that, slightly extend the existing event tracking infrastructure to
track all parts of a split request.  We could almost get by tracking only the
last part of a split, but that wouldn't quite work correctly for splits of
splits.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
blkparse.c