-
Notifications
You must be signed in to change notification settings - Fork 0
/
block-core.json
6145 lines (5922 loc) · 185 KB
/
block-core.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# -*- Mode: Python -*-
# vim: filetype=python
##
# == Block core (VM unrelated)
##
{ 'include': 'common.json' }
{ 'include': 'crypto.json' }
{ 'include': 'job.json' }
{ 'include': 'sockets.json' }
##
# @SnapshotInfo:
#
# @id: unique snapshot id
#
# @name: user chosen name
#
# @vm-state-size: size of the VM state
#
# @date-sec: UTC date of the snapshot in seconds
#
# @date-nsec: fractional part in nano seconds to be used with date-sec
#
# @vm-clock-sec: VM clock relative to boot in seconds
#
# @vm-clock-nsec: fractional part in nano seconds to be used with
# vm-clock-sec
#
# @icount: Current instruction count. Appears when execution
# record/replay is enabled. Used for "time-traveling" to match
# the moment in the recorded execution with the snapshots. This
# counter may be obtained through @query-replay command (since
# 5.2)
#
# Since: 1.3
##
{ 'struct': 'SnapshotInfo',
'data': { 'id': 'str', 'name': 'str', 'vm-state-size': 'int',
'date-sec': 'int', 'date-nsec': 'int',
'vm-clock-sec': 'int', 'vm-clock-nsec': 'int',
'*icount': 'int' } }
##
# @ImageInfoSpecificQCow2EncryptionBase:
#
# @format: The encryption format
#
# Since: 2.10
##
{ 'struct': 'ImageInfoSpecificQCow2EncryptionBase',
'data': { 'format': 'BlockdevQcow2EncryptionFormat'}}
##
# @ImageInfoSpecificQCow2Encryption:
#
# Since: 2.10
##
{ 'union': 'ImageInfoSpecificQCow2Encryption',
'base': 'ImageInfoSpecificQCow2EncryptionBase',
'discriminator': 'format',
'data': { 'luks': 'QCryptoBlockInfoLUKS' } }
##
# @ImageInfoSpecificQCow2:
#
# @compat: compatibility level
#
# @data-file: the filename of the external data file that is stored in
# the image and used as a default for opening the image
# (since: 4.0)
#
# @data-file-raw: True if the external data file must stay valid as a
# standalone (read-only) raw image without looking at qcow2
# metadata (since: 4.0)
#
# @extended-l2: true if the image has extended L2 entries; only valid
# for compat >= 1.1 (since 5.2)
#
# @lazy-refcounts: on or off; only valid for compat >= 1.1
#
# @corrupt: true if the image has been marked corrupt; only valid for
# compat >= 1.1 (since 2.2)
#
# @refcount-bits: width of a refcount entry in bits (since 2.3)
#
# @encrypt: details about encryption parameters; only set if image is
# encrypted (since 2.10)
#
# @bitmaps: A list of qcow2 bitmap details (since 4.0)
#
# @compression-type: the image cluster compression method (since 5.1)
#
# Since: 1.7
##
{ 'struct': 'ImageInfoSpecificQCow2',
'data': {
'compat': 'str',
'*data-file': 'str',
'*data-file-raw': 'bool',
'*extended-l2': 'bool',
'*lazy-refcounts': 'bool',
'*corrupt': 'bool',
'refcount-bits': 'int',
'*encrypt': 'ImageInfoSpecificQCow2Encryption',
'*bitmaps': ['Qcow2BitmapInfo'],
'compression-type': 'Qcow2CompressionType'
} }
##
# @ImageInfoSpecificVmdk:
#
# @create-type: The create type of VMDK image
#
# @cid: Content id of image
#
# @parent-cid: Parent VMDK image's cid
#
# @extents: List of extent files
#
# Since: 1.7
##
{ 'struct': 'ImageInfoSpecificVmdk',
'data': {
'create-type': 'str',
'cid': 'int',
'parent-cid': 'int',
'extents': ['VmdkExtentInfo']
} }
##
# @VmdkExtentInfo:
#
# Information about a VMDK extent file
#
# @filename: Name of the extent file
#
# @format: Extent type (e.g. FLAT or SPARSE)
#
# @virtual-size: Number of bytes covered by this extent
#
# @cluster-size: Cluster size in bytes (for non-flat extents)
#
# @compressed: Whether this extent contains compressed data
#
# Since: 8.0
##
{ 'struct': 'VmdkExtentInfo',
'data': {
'filename': 'str',
'format': 'str',
'virtual-size': 'int',
'*cluster-size': 'int',
'*compressed': 'bool'
} }
##
# @ImageInfoSpecificRbd:
#
# @encryption-format: Image encryption format
#
# Since: 6.1
##
{ 'struct': 'ImageInfoSpecificRbd',
'data': {
'*encryption-format': 'RbdImageEncryptionFormat'
} }
##
# @ImageInfoSpecificFile:
#
# @extent-size-hint: Extent size hint (if available)
#
# Since: 8.0
##
{ 'struct': 'ImageInfoSpecificFile',
'data': {
'*extent-size-hint': 'size'
} }
##
# @ImageInfoSpecificKind:
#
# @luks: Since 2.7
#
# @rbd: Since 6.1
#
# @file: Since 8.0
#
# Since: 1.7
##
{ 'enum': 'ImageInfoSpecificKind',
'data': [ 'qcow2', 'vmdk', 'luks', 'rbd', 'file' ] }
##
# @ImageInfoSpecificQCow2Wrapper:
#
# @data: image information specific to QCOW2
#
# Since: 1.7
##
{ 'struct': 'ImageInfoSpecificQCow2Wrapper',
'data': { 'data': 'ImageInfoSpecificQCow2' } }
##
# @ImageInfoSpecificVmdkWrapper:
#
# @data: image information specific to VMDK
#
# Since: 6.1
##
{ 'struct': 'ImageInfoSpecificVmdkWrapper',
'data': { 'data': 'ImageInfoSpecificVmdk' } }
##
# @ImageInfoSpecificLUKSWrapper:
#
# @data: image information specific to LUKS
#
# Since: 2.7
##
{ 'struct': 'ImageInfoSpecificLUKSWrapper',
'data': { 'data': 'QCryptoBlockInfoLUKS' } }
# If we need to add block driver specific parameters for
# LUKS in future, then we'll subclass QCryptoBlockInfoLUKS
# to define a ImageInfoSpecificLUKS
##
# @ImageInfoSpecificRbdWrapper:
#
# @data: image information specific to RBD
#
# Since: 6.1
##
{ 'struct': 'ImageInfoSpecificRbdWrapper',
'data': { 'data': 'ImageInfoSpecificRbd' } }
##
# @ImageInfoSpecificFileWrapper:
#
# @data: image information specific to files
#
# Since: 8.0
##
{ 'struct': 'ImageInfoSpecificFileWrapper',
'data': { 'data': 'ImageInfoSpecificFile' } }
##
# @ImageInfoSpecific:
#
# A discriminated record of image format specific information
# structures.
#
# @type: block driver name
#
# Since: 1.7
##
{ 'union': 'ImageInfoSpecific',
'base': { 'type': 'ImageInfoSpecificKind' },
'discriminator': 'type',
'data': {
'qcow2': 'ImageInfoSpecificQCow2Wrapper',
'vmdk': 'ImageInfoSpecificVmdkWrapper',
'luks': 'ImageInfoSpecificLUKSWrapper',
'rbd': 'ImageInfoSpecificRbdWrapper',
'file': 'ImageInfoSpecificFileWrapper'
} }
##
# @BlockNodeInfo:
#
# Information about a QEMU image file
#
# @filename: name of the image file
#
# @format: format of the image file
#
# @virtual-size: maximum capacity in bytes of the image
#
# @actual-size: actual size on disk in bytes of the image
#
# @dirty-flag: true if image is not cleanly closed
#
# @cluster-size: size of a cluster in bytes
#
# @encrypted: true if the image is encrypted
#
# @compressed: true if the image is compressed (Since 1.7)
#
# @backing-filename: name of the backing file
#
# @full-backing-filename: full path of the backing file
#
# @backing-filename-format: the format of the backing file
#
# @snapshots: list of VM snapshots
#
# @format-specific: structure supplying additional format-specific
# information (since 1.7)
#
# Since: 8.0
##
{ 'struct': 'BlockNodeInfo',
'data': {'filename': 'str', 'format': 'str', '*dirty-flag': 'bool',
'*actual-size': 'int', 'virtual-size': 'int',
'*cluster-size': 'int', '*encrypted': 'bool', '*compressed': 'bool',
'*backing-filename': 'str', '*full-backing-filename': 'str',
'*backing-filename-format': 'str', '*snapshots': ['SnapshotInfo'],
'*format-specific': 'ImageInfoSpecific' } }
##
# @ImageInfo:
#
# Information about a QEMU image file, and potentially its backing
# image
#
# @backing-image: info of the backing image
#
# Since: 1.3
##
{ 'struct': 'ImageInfo',
'base': 'BlockNodeInfo',
'data': {
'*backing-image': 'ImageInfo'
} }
##
# @BlockChildInfo:
#
# Information about all nodes in the block graph starting at some
# node, annotated with information about that node in relation to its
# parent.
#
# @name: Child name of the root node in the BlockGraphInfo struct, in
# its role as the child of some undescribed parent node
#
# @info: Block graph information starting at this node
#
# Since: 8.0
##
{ 'struct': 'BlockChildInfo',
'data': {
'name': 'str',
'info': 'BlockGraphInfo'
} }
##
# @BlockGraphInfo:
#
# Information about all nodes in a block (sub)graph in the form of
# BlockNodeInfo data. The base BlockNodeInfo struct contains the
# information for the (sub)graph's root node.
#
# @children: Array of links to this node's child nodes' information
#
# Since: 8.0
##
{ 'struct': 'BlockGraphInfo',
'base': 'BlockNodeInfo',
'data': { 'children': ['BlockChildInfo'] } }
##
# @ImageCheck:
#
# Information about a QEMU image file check
#
# @filename: name of the image file checked
#
# @format: format of the image file checked
#
# @check-errors: number of unexpected errors occurred during check
#
# @image-end-offset: offset (in bytes) where the image ends, this
# field is present if the driver for the image format supports it
#
# @corruptions: number of corruptions found during the check if any
#
# @leaks: number of leaks found during the check if any
#
# @corruptions-fixed: number of corruptions fixed during the check if
# any
#
# @leaks-fixed: number of leaks fixed during the check if any
#
# @total-clusters: total number of clusters, this field is present if
# the driver for the image format supports it
#
# @allocated-clusters: total number of allocated clusters, this field
# is present if the driver for the image format supports it
#
# @fragmented-clusters: total number of fragmented clusters, this
# field is present if the driver for the image format supports it
#
# @compressed-clusters: total number of compressed clusters, this
# field is present if the driver for the image format supports it
#
# Since: 1.4
##
{ 'struct': 'ImageCheck',
'data': {'filename': 'str', 'format': 'str', 'check-errors': 'int',
'*image-end-offset': 'int', '*corruptions': 'int', '*leaks': 'int',
'*corruptions-fixed': 'int', '*leaks-fixed': 'int',
'*total-clusters': 'int', '*allocated-clusters': 'int',
'*fragmented-clusters': 'int', '*compressed-clusters': 'int' } }
##
# @MapEntry:
#
# Mapping information from a virtual block range to a host file range
#
# @start: virtual (guest) offset of the first byte described by this
# entry
#
# @length: the number of bytes of the mapped virtual range
#
# @data: reading the image will actually read data from a file (in
# particular, if @offset is present this means that the sectors
# are not simply preallocated, but contain actual data in raw
# format)
#
# @zero: whether the virtual blocks read as zeroes
#
# @compressed: true if the data is stored compressed (since 8.2)
#
# @depth: number of layers (0 = top image, 1 = top image's backing
# file, ..., n - 1 = bottom image (where n is the number of images
# in the chain)) before reaching one for which the range is
# allocated
#
# @present: true if this layer provides the data, false if adding a
# backing layer could impact this region (since 6.1)
#
# @offset: if present, the image file stores the data for this range
# in raw format at the given (host) offset
#
# @filename: filename that is referred to by @offset
#
# Since: 2.6
##
{ 'struct': 'MapEntry',
'data': {'start': 'int', 'length': 'int', 'data': 'bool',
'zero': 'bool', 'compressed': 'bool', 'depth': 'int',
'present': 'bool', '*offset': 'int', '*filename': 'str' } }
##
# @BlockdevCacheInfo:
#
# Cache mode information for a block device
#
# @writeback: true if writeback mode is enabled
#
# @direct: true if the host page cache is bypassed (O_DIRECT)
#
# @no-flush: true if flush requests are ignored for the device
#
# Since: 2.3
##
{ 'struct': 'BlockdevCacheInfo',
'data': { 'writeback': 'bool',
'direct': 'bool',
'no-flush': 'bool' } }
##
# @BlockDeviceInfo:
#
# Information about the backing device for a block device.
#
# @file: the filename of the backing device
#
# @node-name: the name of the block driver node (Since 2.0)
#
# @ro: true if the backing device was open read-only
#
# @drv: the name of the block format used to open the backing device.
# As of 0.14 this can be: 'blkdebug', 'bochs', 'cloop', 'cow',
# 'dmg', 'file', 'file', 'ftp', 'ftps', 'host_cdrom',
# 'host_device', 'http', 'https', 'luks', 'nbd', 'parallels',
# 'qcow', 'qcow2', 'raw', 'vdi', 'vmdk', 'vpc', 'vvfat' 2.2:
# 'archipelago' added, 'cow' dropped 2.3: 'host_floppy' deprecated
# 2.5: 'host_floppy' dropped 2.6: 'luks' added 2.8: 'replication'
# added, 'tftp' dropped 2.9: 'archipelago' dropped
#
# @backing_file: the name of the backing file (for copy-on-write)
#
# @backing_file_depth: number of files in the backing file chain
# (since: 1.2)
#
# @encrypted: true if the backing device is encrypted
#
# @detect_zeroes: detect and optimize zero writes (Since 2.1)
#
# @bps: total throughput limit in bytes per second is specified
#
# @bps_rd: read throughput limit in bytes per second is specified
#
# @bps_wr: write throughput limit in bytes per second is specified
#
# @iops: total I/O operations per second is specified
#
# @iops_rd: read I/O operations per second is specified
#
# @iops_wr: write I/O operations per second is specified
#
# @image: the info of image used (since: 1.6)
#
# @bps_max: total throughput limit during bursts, in bytes (Since 1.7)
#
# @bps_rd_max: read throughput limit during bursts, in bytes (Since
# 1.7)
#
# @bps_wr_max: write throughput limit during bursts, in bytes (Since
# 1.7)
#
# @iops_max: total I/O operations per second during bursts, in bytes
# (Since 1.7)
#
# @iops_rd_max: read I/O operations per second during bursts, in bytes
# (Since 1.7)
#
# @iops_wr_max: write I/O operations per second during bursts, in
# bytes (Since 1.7)
#
# @bps_max_length: maximum length of the @bps_max burst period, in
# seconds. (Since 2.6)
#
# @bps_rd_max_length: maximum length of the @bps_rd_max burst period,
# in seconds. (Since 2.6)
#
# @bps_wr_max_length: maximum length of the @bps_wr_max burst period,
# in seconds. (Since 2.6)
#
# @iops_max_length: maximum length of the @iops burst period, in
# seconds. (Since 2.6)
#
# @iops_rd_max_length: maximum length of the @iops_rd_max burst
# period, in seconds. (Since 2.6)
#
# @iops_wr_max_length: maximum length of the @iops_wr_max burst
# period, in seconds. (Since 2.6)
#
# @iops_size: an I/O size in bytes (Since 1.7)
#
# @group: throttle group name (Since 2.4)
#
# @cache: the cache mode used for the block device (since: 2.3)
#
# @write_threshold: configured write threshold for the device. 0 if
# disabled. (Since 2.3)
#
# @dirty-bitmaps: dirty bitmaps information (only present if node has
# one or more dirty bitmaps) (Since 4.2)
#
# Since: 0.14
##
{ 'struct': 'BlockDeviceInfo',
'data': { 'file': 'str', '*node-name': 'str', 'ro': 'bool', 'drv': 'str',
'*backing_file': 'str', 'backing_file_depth': 'int',
'encrypted': 'bool',
'detect_zeroes': 'BlockdevDetectZeroesOptions',
'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int',
'image': 'ImageInfo',
'*bps_max': 'int', '*bps_rd_max': 'int',
'*bps_wr_max': 'int', '*iops_max': 'int',
'*iops_rd_max': 'int', '*iops_wr_max': 'int',
'*bps_max_length': 'int', '*bps_rd_max_length': 'int',
'*bps_wr_max_length': 'int', '*iops_max_length': 'int',
'*iops_rd_max_length': 'int', '*iops_wr_max_length': 'int',
'*iops_size': 'int', '*group': 'str', 'cache': 'BlockdevCacheInfo',
'write_threshold': 'int', '*dirty-bitmaps': ['BlockDirtyInfo'] } }
##
# @BlockDeviceIoStatus:
#
# An enumeration of block device I/O status.
#
# @ok: The last I/O operation has succeeded
#
# @failed: The last I/O operation has failed
#
# @nospace: The last I/O operation has failed due to a no-space
# condition
#
# Since: 1.0
##
{ 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
##
# @BlockDirtyInfo:
#
# Block dirty bitmap information.
#
# @name: the name of the dirty bitmap (Since 2.4)
#
# @count: number of dirty bytes according to the dirty bitmap
#
# @granularity: granularity of the dirty bitmap in bytes (since 1.4)
#
# @recording: true if the bitmap is recording new writes from the
# guest. (since 4.0)
#
# @busy: true if the bitmap is in-use by some operation (NBD or jobs)
# and cannot be modified via QMP or used by another operation.
# (since 4.0)
#
# @persistent: true if the bitmap was stored on disk, is scheduled to
# be stored on disk, or both. (since 4.0)
#
# @inconsistent: true if this is a persistent bitmap that was
# improperly stored. Implies @persistent to be true; @recording
# and @busy to be false. This bitmap cannot be used. To remove
# it, use @block-dirty-bitmap-remove. (Since 4.0)
#
# Since: 1.3
##
{ 'struct': 'BlockDirtyInfo',
'data': {'*name': 'str', 'count': 'int', 'granularity': 'uint32',
'recording': 'bool', 'busy': 'bool',
'persistent': 'bool', '*inconsistent': 'bool' } }
##
# @Qcow2BitmapInfoFlags:
#
# An enumeration of flags that a bitmap can report to the user.
#
# @in-use: This flag is set by any process actively modifying the
# qcow2 file, and cleared when the updated bitmap is flushed to
# the qcow2 image. The presence of this flag in an offline image
# means that the bitmap was not saved correctly after its last
# usage, and may contain inconsistent data.
#
# @auto: The bitmap must reflect all changes of the virtual disk by
# any application that would write to this qcow2 file.
#
# Since: 4.0
##
{ 'enum': 'Qcow2BitmapInfoFlags',
'data': ['in-use', 'auto'] }
##
# @Qcow2BitmapInfo:
#
# Qcow2 bitmap information.
#
# @name: the name of the bitmap
#
# @granularity: granularity of the bitmap in bytes
#
# @flags: flags of the bitmap
#
# Since: 4.0
##
{ 'struct': 'Qcow2BitmapInfo',
'data': {'name': 'str', 'granularity': 'uint32',
'flags': ['Qcow2BitmapInfoFlags'] } }
##
# @BlockLatencyHistogramInfo:
#
# Block latency histogram.
#
# @boundaries: list of interval boundary values in nanoseconds, all
# greater than zero and in ascending order. For example, the list
# [10, 50, 100] produces the following histogram intervals: [0,
# 10), [10, 50), [50, 100), [100, +inf).
#
# @bins: list of io request counts corresponding to histogram
# intervals, one more element than @boundaries has. For the
# example above, @bins may be something like [3, 1, 5, 2], and
# corresponding histogram looks like::
#
# 5| *
# 4| *
# 3| * *
# 2| * * *
# 1| * * * *
# +------------------
# 10 50 100
#
# Since: 4.0
##
{ 'struct': 'BlockLatencyHistogramInfo',
'data': {'boundaries': ['uint64'], 'bins': ['uint64'] } }
##
# @BlockInfo:
#
# Block device information. This structure describes a virtual device
# and the backing device associated with it.
#
# @device: The device name associated with the virtual device.
#
# @qdev: The qdev ID, or if no ID is assigned, the QOM path of the
# block device. (since 2.10)
#
# @type: This field is returned only for compatibility reasons, it
# should not be used (always returns 'unknown')
#
# @removable: True if the device supports removable media.
#
# @locked: True if the guest has locked this device from having its
# media removed
#
# @tray_open: True if the device's tray is open (only present if it
# has a tray)
#
# @io-status: @BlockDeviceIoStatus. Only present if the device
# supports it and the VM is configured to stop on errors
# (supported device models: virtio-blk, IDE, SCSI except
# scsi-generic)
#
# @inserted: @BlockDeviceInfo describing the device if media is
# present
#
# Since: 0.14
##
{ 'struct': 'BlockInfo',
'data': {'device': 'str', '*qdev': 'str', 'type': 'str', 'removable': 'bool',
'locked': 'bool', '*inserted': 'BlockDeviceInfo',
'*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus' } }
##
# @BlockMeasureInfo:
#
# Image file size calculation information. This structure describes
# the size requirements for creating a new image file.
#
# The size requirements depend on the new image file format. File
# size always equals virtual disk size for the 'raw' format, even for
# sparse POSIX files. Compact formats such as 'qcow2' represent
# unallocated and zero regions efficiently so file size may be smaller
# than virtual disk size.
#
# The values are upper bounds that are guaranteed to fit the new image
# file. Subsequent modification, such as internal snapshot or further
# bitmap creation, may require additional space and is not covered
# here.
#
# @required: Size required for a new image file, in bytes, when
# copying just allocated guest-visible contents.
#
# @fully-allocated: Image file size, in bytes, once data has been
# written to all sectors, when copying just guest-visible
# contents.
#
# @bitmaps: Additional size required if all the top-level bitmap
# metadata in the source image were to be copied to the
# destination, present only when source and destination both
# support persistent bitmaps. (since 5.1)
#
# Since: 2.10
##
{ 'struct': 'BlockMeasureInfo',
'data': {'required': 'int', 'fully-allocated': 'int', '*bitmaps': 'int'} }
##
# @query-block:
#
# Get a list of BlockInfo for all virtual block devices.
#
# Returns: a list of @BlockInfo describing each virtual block device.
# Filter nodes that were created implicitly are skipped over.
#
# Since: 0.14
#
# .. qmp-example::
#
# -> { "execute": "query-block" }
# <- {
# "return":[
# {
# "io-status": "ok",
# "device":"ide0-hd0",
# "locked":false,
# "removable":false,
# "inserted":{
# "ro":false,
# "drv":"qcow2",
# "encrypted":false,
# "file":"disks/test.qcow2",
# "backing_file_depth":1,
# "bps":1000000,
# "bps_rd":0,
# "bps_wr":0,
# "iops":1000000,
# "iops_rd":0,
# "iops_wr":0,
# "bps_max": 8000000,
# "bps_rd_max": 0,
# "bps_wr_max": 0,
# "iops_max": 0,
# "iops_rd_max": 0,
# "iops_wr_max": 0,
# "iops_size": 0,
# "detect_zeroes": "on",
# "write_threshold": 0,
# "image":{
# "filename":"disks/test.qcow2",
# "format":"qcow2",
# "virtual-size":2048000,
# "backing_file":"base.qcow2",
# "full-backing-filename":"disks/base.qcow2",
# "backing-filename-format":"qcow2",
# "snapshots":[
# {
# "id": "1",
# "name": "snapshot1",
# "vm-state-size": 0,
# "date-sec": 10000200,
# "date-nsec": 12,
# "vm-clock-sec": 206,
# "vm-clock-nsec": 30
# }
# ],
# "backing-image":{
# "filename":"disks/base.qcow2",
# "format":"qcow2",
# "virtual-size":2048000
# }
# }
# },
# "qdev": "ide_disk",
# "type":"unknown"
# },
# {
# "io-status": "ok",
# "device":"ide1-cd0",
# "locked":false,
# "removable":true,
# "qdev": "/machine/unattached/device[23]",
# "tray_open": false,
# "type":"unknown"
# },
# {
# "device":"floppy0",
# "locked":false,
# "removable":true,
# "qdev": "/machine/unattached/device[20]",
# "type":"unknown"
# },
# {
# "device":"sd0",
# "locked":false,
# "removable":true,
# "type":"unknown"
# }
# ]
# }
##
{ 'command': 'query-block', 'returns': ['BlockInfo'],
'allow-preconfig': true }
##
# @BlockDeviceTimedStats:
#
# Statistics of a block device during a given interval of time.
#
# @interval_length: Interval used for calculating the statistics, in
# seconds.
#
# @min_rd_latency_ns: Minimum latency of read operations in the
# defined interval, in nanoseconds.
#
# @min_wr_latency_ns: Minimum latency of write operations in the
# defined interval, in nanoseconds.
#
# @min_zone_append_latency_ns: Minimum latency of zone append
# operations in the defined interval, in nanoseconds (since 8.1)
#
# @min_flush_latency_ns: Minimum latency of flush operations in the
# defined interval, in nanoseconds.
#
# @max_rd_latency_ns: Maximum latency of read operations in the
# defined interval, in nanoseconds.
#
# @max_wr_latency_ns: Maximum latency of write operations in the
# defined interval, in nanoseconds.
#
# @max_zone_append_latency_ns: Maximum latency of zone append
# operations in the defined interval, in nanoseconds (since 8.1)
#
# @max_flush_latency_ns: Maximum latency of flush operations in the
# defined interval, in nanoseconds.
#
# @avg_rd_latency_ns: Average latency of read operations in the
# defined interval, in nanoseconds.
#
# @avg_wr_latency_ns: Average latency of write operations in the
# defined interval, in nanoseconds.
#
# @avg_zone_append_latency_ns: Average latency of zone append
# operations in the defined interval, in nanoseconds (since 8.1)
#
# @avg_flush_latency_ns: Average latency of flush operations in the
# defined interval, in nanoseconds.
#
# @avg_rd_queue_depth: Average number of pending read operations in
# the defined interval.
#
# @avg_wr_queue_depth: Average number of pending write operations in
# the defined interval.
#
# @avg_zone_append_queue_depth: Average number of pending zone append
# operations in the defined interval (since 8.1).
#
# Since: 2.5
##
{ 'struct': 'BlockDeviceTimedStats',
'data': { 'interval_length': 'int', 'min_rd_latency_ns': 'int',
'max_rd_latency_ns': 'int', 'avg_rd_latency_ns': 'int',
'min_wr_latency_ns': 'int', 'max_wr_latency_ns': 'int',
'avg_wr_latency_ns': 'int', 'min_zone_append_latency_ns': 'int',
'max_zone_append_latency_ns': 'int',
'avg_zone_append_latency_ns': 'int',
'min_flush_latency_ns': 'int', 'max_flush_latency_ns': 'int',
'avg_flush_latency_ns': 'int', 'avg_rd_queue_depth': 'number',
'avg_wr_queue_depth': 'number',
'avg_zone_append_queue_depth': 'number' } }
##
# @BlockDeviceStats:
#
# Statistics of a virtual block device or a block backing device.
#
# @rd_bytes: The number of bytes read by the device.
#
# @wr_bytes: The number of bytes written by the device.
#
# @zone_append_bytes: The number of bytes appended by the zoned
# devices (since 8.1)
#
# @unmap_bytes: The number of bytes unmapped by the device (Since 4.2)
#
# @rd_operations: The number of read operations performed by the
# device.
#
# @wr_operations: The number of write operations performed by the
# device.
#
# @zone_append_operations: The number of zone append operations
# performed by the zoned devices (since 8.1)
#
# @flush_operations: The number of cache flush operations performed by
# the device (since 0.15)
#
# @unmap_operations: The number of unmap operations performed by the
# device (Since 4.2)
#
# @rd_total_time_ns: Total time spent on reads in nanoseconds (since
# 0.15).
#
# @wr_total_time_ns: Total time spent on writes in nanoseconds (since
# 0.15).
#
# @zone_append_total_time_ns: Total time spent on zone append writes
# in nanoseconds (since 8.1)
#
# @flush_total_time_ns: Total time spent on cache flushes in
# nanoseconds (since 0.15).
#
# @unmap_total_time_ns: Total time spent on unmap operations in
# nanoseconds (Since 4.2)
#
# @wr_highest_offset: The offset after the greatest byte written to
# the device. The intended use of this information is for
# growable sparse files (like qcow2) that are used on top of a
# physical device.
#
# @rd_merged: Number of read requests that have been merged into
# another request (Since 2.3).
#
# @wr_merged: Number of write requests that have been merged into
# another request (Since 2.3).
#
# @zone_append_merged: Number of zone append requests that have been
# merged into another request (since 8.1)
#
# @unmap_merged: Number of unmap requests that have been merged into
# another request (Since 4.2)
#
# @idle_time_ns: Time since the last I/O operation, in nanoseconds.
# If the field is absent it means that there haven't been any
# operations yet (Since 2.5).
#
# @failed_rd_operations: The number of failed read operations
# performed by the device (Since 2.5)
#
# @failed_wr_operations: The number of failed write operations
# performed by the device (Since 2.5)
#
# @failed_zone_append_operations: The number of failed zone append
# write operations performed by the zoned devices (since 8.1)
#
# @failed_flush_operations: The number of failed flush operations
# performed by the device (Since 2.5)
#
# @failed_unmap_operations: The number of failed unmap operations
# performed by the device (Since 4.2)
#