Merge remote-tracking branch 'kwolf/for-anthony' into staging
authorAnthony Liguori <aliguori@us.ibm.com>
Tue, 13 Mar 2012 01:51:42 +0000 (20:51 -0500)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 13 Mar 2012 01:51:42 +0000 (20:51 -0500)
* kwolf/for-anthony:
  test-coroutine: add performance test for nesting
  coroutine: adding configure option for sigaltstack coroutine backend
  coroutine: adding configure choose mechanism for coroutine backend
  coroutine: adding sigaltstack method (.c source)
  qcow2: Reduce number of I/O requests
  qcow2: Add qcow2_alloc_clusters_at()
  qcow2: Factor out count_cow_clusters
  qmp: convert blockdev-snapshot-sync to a wrapper around transactions
  add mode field to blockdev-snapshot-sync transaction item
  rename blockdev-group-snapshot-sync
  qapi: complete implementation of unions
  use QSIMPLEQ_FOREACH_SAFE when freeing list elements
  Add 'make check-block'
  make check: Add qemu-iotests subset
  qemu-iotests: Mark some tests as quick
  qcow2: Add error messages in qcow2_truncate
  block: handle -EBUSY in bdrv_commit_all()
  qcow2: Add some tracing
  qed: do not evict in-use L2 table cache entries
  Group snapshot: Fix format name for backing file

1  2 
qapi-schema.json
trace-events

diff --combined qapi-schema.json
index dd9e0e5434577e6274243f0af5da79335b2d6d95,4df6b8f6a24d1e6f46846a44e9c60ba083451128..04fa84fbde56a4340a0763fe678cfd90bb429a5f
  # @connection-id: SPICE connection id number.  All channels with the same id
  #                 belong to the same SPICE session.
  #
 -# @connection-type: SPICE channel type number.  "1" is the main control channel,
 -#                   filter for this one if you want track spice sessions only
 +# @connection-type: SPICE channel type number.  "1" is the main control
 +#                   channel, filter for this one if you want to track spice
 +#                   sessions only
  #
 -# @channel-id: SPICE channel ID number.  Usually "0", might be different needed
 -#              when multiple channels of the same type exist, such as multiple
 +# @channel-id: SPICE channel ID number.  Usually "0", might be different when
 +#              multiple channels of the same type exist, such as multiple
  #              display channels in a multihead setup
  #
  # @tls: true if the channel is encrypted, false otherwise.
  # @tls-port: #optional The SPICE server's TLS port number.
  #
  # @auth: #optional the current authentication type used by the server
 -#        'none' if no authentication is being used
 -#        'spice' (TODO: describe)
 +#        'none'  if no authentication is being used
 +#        'spice' uses SASL or direct TLS authentication, depending on command
 +#                line options
  #
  # @channels: a list of @SpiceChannel for each active spice channel
  #
  { 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
  
  ##
- # @SnapshotDev
+ # @NewImageMode
+ #
+ # An enumeration that tells QEMU how to set the backing file path in
+ # a new image file.
+ #
+ # @existing: QEMU should look for an existing image file.
+ #
+ # @absolute-paths: QEMU should create a new image with absolute paths
+ # for the backing file.
+ #
+ # Since: 1.1
+ ##
+ { 'enum': 'NewImageMode'
+   'data': [ 'existing', 'absolute-paths' ] }
+ ##
+ # @BlockdevSnapshot
  #
  # @device:  the name of the device to generate the snapshot from.
  #
  # @snapshot-file: the target of the new image. A new file will be created.
  #
  # @format: #optional the format of the snapshot image, default is 'qcow2'.
+ #
+ # @mode: #optional whether and how QEMU should create a new image, default is
+ # 'absolute-paths'.
+ ##
+ { 'type': 'BlockdevSnapshot',
+   'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
+             '*mode': 'NewImageMode' } }
+ ##
+ # @BlockdevAction
+ #
+ # A discriminated record of operations that can be performed with
+ # @transaction.
  ##
- { 'type': 'SnapshotDev',
-   'data': {'device': 'str', 'snapshot-file': 'str', '*format': 'str' } }
+ { 'union': 'BlockdevAction',
+   'data': {
+        'blockdev-snapshot-sync': 'BlockdevSnapshot',
+    } }
  
  ##
- # @blockdev-group-snapshot-sync
+ # @transaction
  #
- # Generates a synchronous snapshot of a group of one or more block devices,
- # as atomically as possible.  If the snapshot of any device in the group
- # fails, then the entire group snapshot will be abandoned and the
- # appropriate error returned.
+ # Atomically operate on a group of one or more block devices.  If
+ # any operation fails, then the entire set of actions will be
+ # abandoned and the appropriate error returned.  The only operation
+ # supported is currently blockdev-snapshot-sync.
  #
  #  List of:
- #  @SnapshotDev: information needed for the device snapshot
+ #  @BlockdevAction: information needed for the device snapshot
  #
  # Returns: nothing on success
  #          If @device is not a valid block device, DeviceNotFound
  #          If @snapshot-file can't be opened, OpenFileFailed
  #          If @format is invalid, InvalidBlockFormat
  #
- # Note: The group snapshot attempt returns failure on the first snapshot
- # device failure.  Therefore, there will be only one device or snapshot file
- # returned in an error condition, and subsequent devices will not have been
- # attempted.
+ # Note: The transaction aborts on the first failure.  Therefore, there will
+ # be only one device or snapshot file returned in an error condition, and
+ # subsequent actions will not have been attempted.
+ #
+ # Since 1.1
  ##
- { 'command': 'blockdev-group-snapshot-sync',
-   'data': { 'devlist': [ 'SnapshotDev' ] } }
+ { 'command': 'transaction',
+   'data': { 'actions': [ 'BlockdevAction' ] } }
  
  ##
  # @blockdev-snapshot-sync
  #
  # @format: #optional the format of the snapshot image, default is 'qcow2'.
  #
+ # @mode: #optional whether and how QEMU should create a new image, default is
+ # 'absolute-paths'.
+ #
  # Returns: nothing on success
  #          If @device is not a valid block device, DeviceNotFound
  #          If @snapshot-file can't be opened, OpenFileFailed
  #          If @format is invalid, InvalidBlockFormat
  #
- # Notes: One of the last steps taken by this command is to close the current
- #        image being used by @device and open the @snapshot-file one. If that
- #        fails, the command will try to reopen the original image file. If
- #        that also fails OpenFileFailed will be returned and the guest may get
- #        unexpected errors.
- #
  # Since 0.14.0
  ##
  { 'command': 'blockdev-snapshot-sync',
-   'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str' } }
+   'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
+             '*mode': 'NewImageMode'} }
  
  ##
  # @human-monitor-command:
  { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
  
  ##
 -# @DevicePropertyInfo:
 +# @ObjectPropertyInfo:
  #
  # @name: the name of the property
  #
diff --combined trace-events
index dfe28ed42bb879be14f964fee4d767c35f0e490d,606d9034e975472274abb39d0e07562cdeab93cb..74bb92af4fc5996ebc89db03dac600c595eea269
@@@ -312,6 -312,31 +312,31 @@@ scsi_request_sense(int target, int lun
  # vl.c
  vm_state_notify(int running, int reason) "running %d reason %d"
  
+ # block/qcow2.c
+ qcow2_writev_start_req(void *co, int64_t sector, int nb_sectors) "co %p sector %" PRIx64 " nb_sectors %d"
+ qcow2_writev_done_req(void *co, int ret) "co %p ret %d"
+ qcow2_writev_start_part(void *co) "co %p"
+ qcow2_writev_done_part(void *co, int cur_nr_sectors) "co %p cur_nr_sectors %d"
+ qcow2_writev_data(void *co, uint64_t offset) "co %p offset %" PRIx64
+ qcow2_alloc_clusters_offset(void *co, uint64_t offset, int n_start, int n_end) "co %p offet %" PRIx64 " n_start %d n_end %d"
+ qcow2_do_alloc_clusters_offset(void *co, uint64_t guest_offset, uint64_t host_offset, int nb_clusters) "co %p guest_offet %" PRIx64 " host_offset %" PRIx64 " nb_clusters %d"
+ qcow2_cluster_alloc_phys(void *co) "co %p"
+ qcow2_cluster_link_l2(void *co, int nb_clusters) "co %p nb_clusters %d"
+ qcow2_l2_allocate(void *bs, int l1_index) "bs %p l1_index %d"
+ qcow2_l2_allocate_get_empty(void *bs, int l1_index) "bs %p l1_index %d"
+ qcow2_l2_allocate_write_l2(void *bs, int l1_index) "bs %p l1_index %d"
+ qcow2_l2_allocate_write_l1(void *bs, int l1_index) "bs %p l1_index %d"
+ qcow2_l2_allocate_done(void *bs, int l1_index, int ret) "bs %p l1_index %d ret %d"
+ qcow2_cache_get(void *co, int c, uint64_t offset, bool read_from_disk) "co %p is_l2_cache %d offset %" PRIx64 " read_from_disk %d"
+ qcow2_cache_get_replace_entry(void *co, int c, int i) "co %p is_l2_cache %d index %d"
+ qcow2_cache_get_read(void *co, int c, int i) "co %p is_l2_cache %d index %d"
+ qcow2_cache_get_done(void *co, int c, int i) "co %p is_l2_cache %d index %d"
+ qcow2_cache_flush(void *co, int c) "co %p is_l2_cache %d"
+ qcow2_cache_entry_flush(void *co, int c, int i) "co %p is_l2_cache %d index %d"
  # block/qed-l2-cache.c
  qed_alloc_l2_cache_entry(void *l2_cache, void *entry) "l2_cache %p entry %p"
  qed_unref_l2_cache_entry(void *entry, int ref) "entry %p ref %d"
@@@ -658,10 -683,3 +683,10 @@@ dma_aio_cancel(void *dbs) "dbs=%p
  dma_complete(void *dbs, int ret, void *cb) "dbs=%p ret=%d cb=%p"
  dma_bdrv_cb(void *dbs, int ret) "dbs=%p ret=%d"
  dma_map_wait(void *dbs) "dbs=%p"
 +
 +# console.h
 +displaysurface_free(void *display_state, void *display_surface) "state=%p surface=%p"
 +displaysurface_resize(void *display_state, void *display_surface, int width, int height) "state=%p surface=%p %dx%d"
 +
 +# vga.c
 +ppm_save(const char *filename, void *display_surface) "%s surface=%p"