With the need to add new statistics it's better to modularize asap the I/O
block accounting code.
This series takes care of extracting this code and making it independant of the
BlockDriverState structure.
Compile tested and basically runtime tested excepted for the xen_disk.c backend.
Best regards
Benoît
Benoît Canet (4):
block: Extract the BlockAcctStats structure
block: Extract the block accounting code
block: rename BlockAcctType members to start with BLOCK_ instead of
BDRV_
block: Make the block accounting functions operate on BlockAcctStats
block.c | 37 ++++++++++-----------------
block/Makefile.objs | 1 +
block/accounting.c | 54 +++++++++++++++++++++++++++++++++++++++
block/qapi.c | 19 +++++++-------
dma-helpers.c | 2 +-
hw/block/nvme.c | 4 +--
hw/block/virtio-blk.c | 15 ++++++-----
hw/block/xen_disk.c | 8 +++---
hw/ide/ahci.c | 7 +++---
hw/ide/atapi.c | 18 +++++++------
hw/ide/core.c | 24 ++++++++++--------
hw/ide/macio.c | 19 ++++++++------
hw/scsi/scsi-disk.c | 45 ++++++++++++++++++++-------------
include/block/accounting.h | 57 ++++++++++++++++++++++++++++++++++++++++++
include/block/block.h | 20 +++------------
include/block/block_int.h | 6 ++---
include/hw/virtio/virtio-blk.h | 1 +
include/sysemu/dma.h | 1 +
18 files changed, 225 insertions(+), 113 deletions(-)
create mode 100644 block/accounting.c
create mode 100644 include/block/accounting.h
--
2.1.0