7b11f5e getstats: prepare monitor collection for recursion

Authored and Committed by ericb 9 years ago
    getstats: prepare monitor collection for recursion
    
    A future patch will allow recursion into backing chains when
    collecting block stats.  This patch should not change behavior,
    but merely moves out the common code that will be reused once
    recursion is enabled, and adds the parameter that will turn on
    recursion.
    
    * src/qemu/qemu_monitor.h (qemuMonitorGetAllBlockStatsInfo)
    (qemuMonitorBlockStatsUpdateCapacity): Add recursion parameter,
    although it is ignored for now.
    * src/qemu/qemu_monitor.h (qemuMonitorGetAllBlockStatsInfo)
    (qemuMonitorBlockStatsUpdateCapacity): Likewise.
    * src/qemu/qemu_monitor_json.h
    (qemuMonitorJSONGetAllBlockStatsInfo)
    (qemuMonitorJSONBlockStatsUpdateCapacity): Likewise.
    * src/qemu/qemu_monitor_json.c
    (qemuMonitorJSONGetAllBlockStatsInfo)
    (qemuMonitorJSONBlockStatsUpdateCapacity): Add parameter, and
    split...
    (qemuMonitorJSONGetOneBlockStatsInfo)
    (qemuMonitorJSONBlockStatsUpdateCapacityOne): ...into helpers.
    (qemuMonitorJSONGetBlockStatsInfo): Update caller.
    * src/qemu/qemu_driver.c (qemuDomainGetStatsBlock): Update caller.
    * src/qemu/qemu_migration.c (qemuMigrationCookieAddNBD): Likewise.
    
    Signed-off-by: Eric Blake <eblake@redhat.com>
    
        
file modified
+3 -2
file modified
+2 -1
file modified
+13 -11
file modified
+4 -2
file modified
+144 -103
file modified
+4 -2