Revision c8059b97

b/block/qapi.c
318 318
        s->parent = bdrv_query_stats(bs->file);
319 319
    }
320 320

  
321
    if (bs->backing_hd) {
322
        s->has_backing = true;
323
        s->backing = bdrv_query_stats(bs->backing_hd);
324
    }
325

  
321 326
    return s;
322 327
}
323 328

  
b/qapi-schema.json
1022 1022
#
1023 1023
# @stats:  A @BlockDeviceStats for the device.
1024 1024
#
1025
# @parent: #optional This may point to the backing block device if this is a
1026
#          a virtual block device.  If it's a backing block, this will point
1027
#          to the backing file is one is present.
1025
# @parent: #optional This describes the file block device if it has one.
1026
#
1027
# @backing: #optional This describes the backing block device if it has one.
1028
#           (Since 2.0)
1028 1029
#
1029 1030
# Since: 0.14.0
1030 1031
##
1031 1032
{ 'type': 'BlockStats',
1032 1033
  'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
1033
           '*parent': 'BlockStats'} }
1034
           '*parent': 'BlockStats',
1035
           '*backing': 'BlockStats'} }
1034 1036

  
1035 1037
##
1036 1038
# @query-blockstats:

Also available in: Unified diff