1. 22 1月, 2014 1 次提交
  2. 03 12月, 2013 2 次提交
  3. 29 11月, 2013 3 次提交
  4. 28 11月, 2013 6 次提交
  5. 11 10月, 2013 3 次提交
  6. 12 9月, 2013 3 次提交
  7. 06 9月, 2013 7 次提交
  8. 02 9月, 2013 1 次提交
  9. 19 7月, 2013 1 次提交
  10. 15 7月, 2013 2 次提交
  11. 28 6月, 2013 1 次提交
    • P
      block: change default of .has_zero_init to 0 · 3ac21627
      Peter Lieven 提交于
      .has_zero_init defaults to 1 for all formats and protocols.
      
      this is a dangerous default since this means that all
      new added drivers need to manually overwrite it to 0 if
      they do not ensure that a device is zero initialized
      after bdrv_create().
      
      if a driver needs to explicitly set this value to
      1 its easier to verify the correctness in the review process.
      
      during review of the existing drivers it turned out
      that ssh and gluster had a wrong default of 1.
      both protocols support host_devices as backend
      which are not by default zero initialized. this
      wrong assumption will lead to possible corruption
      if qemu-img convert is used to write to such a backend.
      
      vpc and vmdk also defaulted to 1 altough they support
      fixed respectively flat extends. this has to be addresses
      in separate patches. both formats as well as the mentioned
      ssh and gluster are turned to the default of 0 with this
      patch for safety.
      
      a similar problem with the wrong default existed for
      iscsi most likely because the driver developer did
      oversee the default value of 1.
      Signed-off-by: NPeter Lieven <pl@kamp.de>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      3ac21627
  12. 06 6月, 2013 1 次提交
  13. 04 6月, 2013 4 次提交
    • W
      block: move qmp and info dump related code to block/qapi.c · f364ec65
      Wenchao Xia 提交于
      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: NWenchao Xia <xiawenc@linux.vnet.ibm.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      f364ec65
    • W
      block: move snapshot code in block.c to block/snapshot.c · de08c606
      Wenchao Xia 提交于
      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: NWenchao Xia <xiawenc@linux.vnet.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      de08c606
    • S
      block: drop bs_snapshots global variable · 29d78271
      Stefan Hajnoczi 提交于
      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
      needed.
      
      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: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NWenchao Xia <xiawenc@linux.vnet.ibm.com>
      Signed-off-by: NWenchao Xia <xiawenc@linux.vnet.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      29d78271
    • F
      block: add block driver read only whitelist · b64ec4e4
      Fam Zheng 提交于
      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 \
                      --block-drv-ro-whitelist=vmdk
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      b64ec4e4
  14. 22 4月, 2013 1 次提交
    • K
      block: Add driver-specific options for backing files · 31ca6d07
      Kevin Wolf 提交于
      Options starting in "backing." are passed to the backing file now. If
      you don't need to specify the filename for the backing file, you can add
      it on the command line instead of in the image file:
      
      $ qemu-nbd -t /tmp/test.img
      $ qemu-img create -f qcow2 empty.qcow2 1G
      $ qemu-system-x86_64 -drive file=empty.qcow2,backing.file.driver=nbd,\
          backing.file.host=localhost
      
      Note that this doesn't override the backing filename from the image. If
      the image has one, this will fail because NBD doesn't want the options
      and a filename at the same time.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      31ca6d07
  15. 15 4月, 2013 2 次提交
  16. 23 3月, 2013 1 次提交
  17. 15 3月, 2013 1 次提交