1. 22 9月, 2014 1 次提交
    • F
      block: Add bdrv_aio_cancel_async · 02c50efe
      Fam Zheng 提交于
      This is the async version of bdrv_aio_cancel, which doesn't block the
      caller. It guarantees that the cb is called either before returning or
      some time later.
      
      bdrv_aio_cancel can base on bdrv_aio_cancel_async, later we can convert
      all .io_cancel implementations to .io_cancel_async, and the aio_poll is
      the common logic. In the end, .io_cancel can be dropped.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      02c50efe
  2. 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: Extract the block accounting code · 5e5a94b6
      Benoît Canet 提交于
      The plan is to add new accounting metrics (latency, invalid requests, failed
      requests, queue depth) and block.c is overpopulated so it will be better to work
      in a separate module.
      
      Moreover the long term plan is to have statistics in each of the BDS of the graph
      for metrology purpose; this means that the device model statistics must move from
      the topmost BDS to the device model.
      
      So we need to decouple the statistic code from BlockDriverState.
      
      This is another argument for the extraction of the code in a separate module.
      
      CC: Kevin Wolf <kwolf@redhat.com>
      CC: Stefan Hajnoczi <stefanha@redhat.com>
      CC: Max Reitz <mreitz@redhat.com>
      CC: Eric Blake <eblake@redhat.com>
      CC: Benoit Canet <benoit@irqsave.net>
      CC: Fam Zheng <famz@redhat.com>
      CC: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
      CC: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NBenoît Canet <benoit.canet@nodalink.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      5e5a94b6
    • B
      block: Extract the BlockAcctStats structure · 0ddd0ad9
      Benoît Canet 提交于
      Extract the block accounting statistics into a structure so the block device
      models can hold them in the future.
      
      CC: Kevin Wolf <kwolf@redhat.com>
      CC: Stefan Hajnoczi <stefanha@redhat.com>
      CC: Max Reitz <mreitz@redhat.com>
      CC: Eric Blake <eblake@redhat.com>
      Signed-off-by: NBenoît Canet <benoit.canet@nodalink.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      0ddd0ad9
  3. 20 8月, 2014 1 次提交
    • M
      block: Add bdrv_refresh_filename() · 91af7014
      Max Reitz 提交于
      Some block devices may not have a filename in their BDS; and for some,
      there may not even be a normal filename at all. To work around this, add
      a function which tries to construct a valid filename for the
      BDS.filename field.
      
      If a filename exists or a block driver is able to reconstruct a valid
      filename (which is placed in BDS.exact_filename), this can directly be
      used.
      
      If no filename can be constructed, we can still construct an options
      QDict which is then converted to a JSON object and prefixed with the
      "json:" pseudo protocol prefix. The QDict is placed in
      BDS.full_open_options.
      
      For most block drivers, this process can be done automatically; those
      that need special handling may define a .bdrv_refresh_filename() method
      to fill BDS.exact_filename and BDS.full_open_options themselves.
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      91af7014
  4. 15 8月, 2014 2 次提交
  5. 18 7月, 2014 1 次提交
  6. 07 7月, 2014 1 次提交
  7. 01 7月, 2014 2 次提交
  8. 28 6月, 2014 2 次提交
  9. 23 6月, 2014 1 次提交
  10. 16 6月, 2014 2 次提交
  11. 04 6月, 2014 3 次提交
  12. 28 5月, 2014 4 次提交
  13. 19 5月, 2014 1 次提交
  14. 10 5月, 2014 1 次提交
  15. 09 5月, 2014 1 次提交
  16. 30 4月, 2014 1 次提交
    • K
      block: Unlink temporary files in raw-posix/win32 · 8bfea15d
      Kevin Wolf 提交于
      Instead of having unlink() calls in the generic block layer, where we
      aren't even guarateed to have a file name, move them to those block
      drivers that are actually used and that always have a filename. Gets us
      rid of some #ifdefs as well.
      
      The patch also converts bs->is_temporary to a new BDRV_O_TEMPORARY open
      flag so that it is inherited in the protocol layer and the raw-posix and
      raw-win32 drivers can unlink the file.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      8bfea15d
  17. 22 4月, 2014 2 次提交
  18. 05 4月, 2014 1 次提交
    • K
      block: Fix snapshot=on for protocol parsed from filename · b998875d
      Kevin Wolf 提交于
      Since commit 9fd3171a, BDRV_O_SNAPSHOT uses an option QDict to specify
      the originally requested image as the backing file of the newly created
      temporary snapshot. This means that the filename is stored in
      "file.filename", which is an option that is not parsed for protocol
      names. Therefore things like -drive file=nbd:localhost:10809 were
      broken because it looked for a local file with the literal name
      'nbd:localhost:10809'.
      
      This patch changes the way BDRV_O_SNAPSHOT works once again. We now open
      the originally requested image as normal, and then do a similar
      operation as for live snapshots to put the temporary snapshot on top.
      This way, both driver specific options and parsed filenames work.
      
      As a nice side effect, this results in code movement to factor
      bdrv_append_temp_snapshot() out. This is a good preparation for moving
      its call to drive_init() and friends eventually.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      b998875d
  19. 19 3月, 2014 1 次提交
  20. 13 3月, 2014 1 次提交
  21. 22 2月, 2014 4 次提交
  22. 25 1月, 2014 4 次提交