1. 10 9月, 2014 3 次提交
    • B
      block: Make the block accounting functions operate on BlockAcctStats · 5366d0c8
      Benoît Canet 提交于
      This is the next step for decoupling block accounting functions from
      BlockDriverState.
      In a future commit the BlockAcctStats structure will be moved from
      BlockDriverState to the device models structures.
      
      Note that bdrv_get_stats was introduced so device models can retrieve the
      BlockAcctStats structure of a BlockDriverState without being aware of it's
      layout.
      This function should go away when BlockAcctStats will be embedded in the device
      models structures.
      
      CC: Kevin Wolf <kwolf@redhat.com>
      CC: Stefan Hajnoczi <stefanha@redhat.com>
      CC: Keith Busch <keith.busch@intel.com>
      CC: Anthony Liguori <aliguori@amazon.com>
      CC: "Michael S. Tsirkin" <mst@redhat.com>
      CC: Paolo Bonzini <pbonzini@redhat.com>
      CC: Eric Blake <eblake@redhat.com>
      CC: Peter Maydell <peter.maydell@linaro.org>
      CC: Michael Tokarev <mjt@tls.msk.ru>
      CC: John Snow <jsnow@redhat.com>
      CC: Markus Armbruster <armbru@redhat.com>
      CC: Alexander Graf <agraf@suse.de>
      CC: Max Reitz <mreitz@redhat.com>
      Signed-off-by: NBenoît Canet <benoit.canet@nodalink.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      5366d0c8
    • B
      block: rename BlockAcctType members to start with BLOCK_ instead of BDRV_ · 28298fd3
      Benoît Canet 提交于
      The middle term goal is to move the BlockAcctStats structure in the device models.
      (Capturing I/O accounting statistics in the device models is good for billing)
      This patch make a small step in this direction by removing a reference to BDRV.
      
      CC: Kevin Wolf <kwolf@redhat.com>
      CC: Stefan Hajnoczi <stefanha@redhat.com>
      CC: Keith Busch <keith.busch@intel.com>
      CC: Anthony Liguori <aliguori@amazon.com>
      CC: "Michael S. Tsirkin" <mst@redhat.com>
      CC: Paolo Bonzini <pbonzini@redhat.com>
      CC: John Snow <jsnow@redhat.com>
      CC: Richard Henderson <rth@twiddle.net>
      CC: Markus Armbruster <armbru@redhat.com>
      CC: Alexander Graf <agraf@suse.de>i
      Signed-off-by: NBenoît Canet <benoit.canet@nodalink.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      28298fd3
    • M
      xen_disk: Plug memory leak on error path · cedccf13
      Markus Armbruster 提交于
      The Error object was leaked after failed bdrv_new(). While there,
      streamline control flow a bit.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      cedccf13
  2. 15 8月, 2014 1 次提交
  3. 08 5月, 2014 1 次提交
  4. 22 4月, 2014 1 次提交
    • K
      block: Add errp to bdrv_new() · 98522f63
      Kevin Wolf 提交于
      This patch adds an errp parameter to bdrv_new() and updates all its
      callers. The next patches will make use of this in order to check for
      duplicate IDs. Most of the callers know that their ID is fine, so they
      can simply assert that there is no error.
      
      Behaviour doesn't change with this patch yet as bdrv_new() doesn't
      actually assign errors to errp.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      98522f63
  5. 22 2月, 2014 2 次提交
  6. 21 2月, 2014 1 次提交
  7. 11 10月, 2013 1 次提交
  8. 10 10月, 2013 1 次提交
    • M
      xen_disk: mark ioreq as mapped before unmapping in error case · a76f48e5
      Matthew Daley 提交于
      Commit 4472beae modified the semantics of ioreq_{un,}map so that they are
      idempotent if called when they're not needed (ie., twice in a row). However,
      it neglected to handle the case where batch mapping is not being used (the
      default), and one of the grants fails to map. In this case, ioreq_unmap will
      be called to unwind and unmap any mappings already performed, but ioreq_unmap
      simply returns due to the aforementioned change (the ioreq has not already
      been marked as mapped).
      
      The frontend user can therefore force xen_disk to leak grant mappings, a
      per-domain limited resource.
      
      Fix by marking the ioreq as mapped before calling ioreq_unmap in this
      situation.
      Signed-off-by: NMatthew Daley <mattjd@gmail.com>
      Signed-off-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
      a76f48e5
  9. 12 9月, 2013 1 次提交
  10. 06 9月, 2013 2 次提交
  11. 29 7月, 2013 1 次提交
    • S
      xen_disk: support "direct-io-safe" backend option · 454ae734
      Stefano Stabellini 提交于
      Support backend option "direct-io-safe".  This is documented as
      follows in the Xen backend specification:
      
       * direct-io-safe
       *      Values:         0/1 (boolean)
       *      Default Value:  0
       *
       *      The underlying storage is not affected by the direct IO memory
       *      lifetime bug.  See:
       *        http://lists.xen.org/archives/html/xen-devel/2012-12/msg01154.html
       *
       *      Therefore this option gives the backend permission to use
       *      O_DIRECT, notwithstanding that bug.
       *
       *      That is, if this option is enabled, use of O_DIRECT is safe,
       *      in circumstances where we would normally have avoided it as a
       *      workaround for that bug.  This option is not relevant for all
       *      backends, and even not necessarily supported for those for
       *      which it is relevant.  A backend which knows that it is not
       *      affected by the bug can ignore this option.
       *
       *      This option doesn't require a backend to use O_DIRECT, so it
       *      should not be used to try to control the caching behaviour.
      
      Also, BDRV_O_NATIVE_AIO is ignored if BDRV_O_NOCACHE, so clarify the
      default flags passed to the qemu block layer.
      
      The original proposal for a "cache" backend option has been dropped
      because it was believed too wide, especially considering that at the
      moment the backend doesn't have a way to tell the toolstack that it is
      capable of supporting it.
      Signed-off-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
      Signed-off-by: NIan Jackson <Ian.Jackson@eu.citrix.com>
      454ae734
  12. 04 6月, 2013 1 次提交
    • 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
  13. 09 4月, 2013 3 次提交
  14. 05 4月, 2013 3 次提交
  15. 15 3月, 2013 1 次提交
  16. 01 3月, 2013 1 次提交
    • P
      hw: include hw header files with full paths · 83c9f4ca
      Paolo Bonzini 提交于
      Done with this script:
      
      cd hw
      for i in `find . -name '*.h' | sed 's/^..//'`; do
        echo '\,^#.*include.*["<]'$i'[">], s,'$i',hw/&,'
      done | sed -i -f - `find . -type f`
      
      This is so that paths remain valid as files are moved.
      
      Instead, files in hw/dataplane are referenced with the relative path.
      We know they are not going to move to include/, and they are the only
      include files that are in subdirectories _and_ move.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      83c9f4ca
  17. 15 1月, 2013 3 次提交
  18. 19 12月, 2012 2 次提交
  19. 21 6月, 2012 1 次提交
  20. 15 6月, 2012 1 次提交
  21. 11 6月, 2012 1 次提交
  22. 17 5月, 2012 3 次提交
  23. 14 4月, 2012 1 次提交
  24. 28 3月, 2012 1 次提交
  25. 23 3月, 2012 2 次提交
  26. 14 1月, 2012 1 次提交