1. 04 Jun, 2013 4 commits
    • Wenchao Xia's avatar
      block: move qmp and info dump related code to block/qapi.c · f364ec65
      Wenchao Xia authored
      This patch is a pure code move patch, except following modification:
      1 get_human_readable_size() is changed to static function.
      2 dump_human_image_info() is renamed to bdrv_image_info_dump().
      3 in qmp_query_block() and qmp_query_blockstats, use bdrv_next(bs)
      instead of direct traverse of global array 'bdrv_states'.
      4 collect_snapshots() and collect_image_info() are renamed, unused parameter
      *fmt in collect_image_info() is removed.
      5 code style fix.
      To avoid conflict and tip better, macro in header file is BLOCK_QAPI_H
      instead of QAPI_H. Now block.h and snapshot.h are at the same level in
      include path, block_int.h and qapi.h will both include them.
      Signed-off-by: default avatarWenchao Xia <xiawenc@linux.vnet.ibm.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    • Wenchao Xia's avatar
      block: move snapshot code in block.c to block/snapshot.c · de08c606
      Wenchao Xia authored
      All snapshot related code, except bdrv_snapshot_dump() and
      bdrv_is_snapshot(), is moved to block/snapshot.c. bdrv_snapshot_dump()
      will be moved to another file later. bdrv_is_snapshot() is not related
      with internal snapshot. It also fixes small code style errors reported
      by check script.
      Signed-off-by: default avatarWenchao Xia <xiawenc@linux.vnet.ibm.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    • Stefan Hajnoczi's avatar
      block: drop bs_snapshots global variable · 29d78271
      Stefan Hajnoczi authored
      The bs_snapshots global variable points to the BlockDriverState which
      will be used to save vmstate.  This is really a savevm.c concept but was
      moved into block.c:bdrv_snapshots() when it became clear that hotplug
      could result in a dangling pointer.
      While auditing the block layer's global state I came upon bs_snapshots
      and realized that a variable is not necessary here.  Simply find the
      first BlockDriverState capable of internal snapshots each time this is
      The behavior of bdrv_snapshots() is preserved across hotplug because new
      drives are always appended to the bdrv_states list.  This means that
      calling the new find_vmstate_bs() function is idempotent - it returns
      the same BlockDriverState unless it was hot-unplugged.
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Reviewed-by: default avatarWenchao Xia <xiawenc@linux.vnet.ibm.com>
      Signed-off-by: default avatarWenchao Xia <xiawenc@linux.vnet.ibm.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    • Fam Zheng's avatar
      block: add block driver read only whitelist · b64ec4e4
      Fam Zheng authored
      We may want to include a driver in the whitelist for read only tasks
      such as diagnosing or exporting guest data (with libguestfs as a good
      example). This patch introduces a readonly whitelist option, and for
      backward compatibility, the old configure option --block-drv-whitelist
      is now an alias to rw whitelist.
      Drivers in readonly list is only permitted to open file readonly, and
      returns -ENOTSUP for RW opening.
      E.g. To include vmdk readonly, and others read+write:
          ./configure --target-list=x86_64-softmmu \
                      --block-drv-rw-whitelist=qcow2,raw,file,qed \
      Signed-off-by: default avatarFam Zheng <famz@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
  2. 03 Jun, 2013 1 commit
  3. 01 Jun, 2013 1 commit
  4. 30 May, 2013 2 commits
    • Laszlo Ersek's avatar
      osdep: add qemu_get_local_state_pathname() · e2ea3515
      Laszlo Ersek authored
      This function returns ${prefix}/var/RELATIVE_PATHNAME on POSIX-y systems,
        [...] This folder is used for application data that is not user
        specific. For example, an application can store a spell-check
        dictionary, a database of clip art, or a log file in the
        CSIDL_COMMON_APPDATA folder. [...]
      Signed-off-by: default avatarLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
    • Michael Roth's avatar
      qapi: pad GenericList value fields to 64 bits · a678e26c
      Michael Roth authored
      With the introduction of native list types, we now have types such as
      int64List where the 'value' field is not a pointer, but the actual
      64-bit value.
      On 32-bit architectures, this can lead to situations where 'next' field
      offset in GenericList does not correspond to the 'next' field in the
      types that we cast to GenericList when using the visit_next_list()
      interface, causing issues when we attempt to traverse linked list
      structures of these types.
      To fix this, pad the 'value' field of GenericList and other
      schema-defined/native *List types out to 64-bits.
      This is less memory-efficient for 32-bit architectures, but allows us to
      continue to rely on list-handling interfaces that target GenericList to
      simply visitor implementations.
      In the future we can improve efficiency by defaulting to using native C
      array backends to handle list of non-pointer types, which would be more
      memory efficient in itself and allow us to roll back this change.
      Signed-off-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
      Signed-off-by: default avatarLuiz Capitulino <lcapitulino@redhat.com>
  5. 29 May, 2013 10 commits
  6. 24 May, 2013 8 commits
  7. 22 May, 2013 2 commits
  8. 20 May, 2013 1 commit
  9. 18 May, 2013 2 commits
  10. 15 May, 2013 2 commits
  11. 14 May, 2013 3 commits
  12. 13 May, 2013 4 commits