1. 19 12月, 2012 3 次提交
  2. 12 12月, 2012 3 次提交
    • K
      blkdebug: Implement suspend/resume of AIO requests · 3c90c65d
      Kevin Wolf 提交于
      This allows more systematic AIO testing. The patch adds three new
      operations to blkdebug:
      
       * Setting a "breakpoint" on a blkdebug event. The next request that
         triggers this breakpoint is suspended and is tagged with a name.
         The breakpoint is removed after a request has triggered it.
      
       * A suspended request (identified by it's tag) can be resumed
      
       * It's possible to check whether a suspended request with a given
         tag exists. This can be used for waiting for an event.
      
      Ideally, we would instead tag requests right when they are created and
      set breakpoints for individual requests. However, at this point the
      block layer doesn't allow this easily, and breakpoints that trigger for
      any request already allow a lot of useful testing.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      3c90c65d
    • K
      blkdebug: Factor out remove_rule() · 9e35542b
      Kevin Wolf 提交于
      The cleanup work to remove a rule depends on the type of the rule. It's
      easy for the existing rules as there is no data that must be cleaned up
      and is specific to a type yet, but the next patch will change this.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      9e35542b
    • K
      blkdebug: Allow usage without config file · 312a2ba0
      Kevin Wolf 提交于
      As soon as new rules can be set during runtime, as introduced by the
      next patch, blkdebug makes sense even without a config file.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      312a2ba0
  3. 15 11月, 2012 1 次提交
  4. 29 9月, 2012 1 次提交
  5. 09 7月, 2012 5 次提交
  6. 05 4月, 2012 1 次提交
  7. 26 1月, 2012 1 次提交
  8. 21 10月, 2011 1 次提交
  9. 21 8月, 2011 1 次提交
  10. 04 11月, 2010 1 次提交
  11. 18 9月, 2010 1 次提交
    • B
      blkdebug: fix enum comparison · 95ee3914
      Blue Swirl 提交于
      The signedness of enum types depend on the compiler implementation.
      Therefore the check for negative values may or may not be meaningful.
      
      Fix by explicitly casting to a signed integer.
      
      Since the values are also checked earlier against event_names
      table, this is an internal error. Change the 'if' to 'assert'.
      
      This also avoids a warning with GCC flag -Wtype-limits.
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      95ee3914
  12. 02 7月, 2010 3 次提交
  13. 14 6月, 2010 1 次提交
  14. 17 5月, 2010 1 次提交
  15. 03 5月, 2010 1 次提交
    • K
      block: Open the underlying image file in generic code · 66f82cee
      Kevin Wolf 提交于
      Format drivers shouldn't need to bother with things like file names, but rather
      just get an open BlockDriverState for the underlying protocol. This patch
      introduces this behaviour for bdrv_open implementation. For protocols which
      need to access the filename to open their file/device/connection/... a new
      callback bdrv_file_open is introduced which doesn't get an underlying file
      opened.
      
      For now, also some of the more obscure formats use bdrv_file_open because they
      open() the file themselves instead of using the block.c functions. They need to
      be fixed in later patches.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      66f82cee
  16. 23 4月, 2010 4 次提交
    • K
      qcow2: Trigger blkdebug events · 8252278a
      Kevin Wolf 提交于
      This adds blkdebug events to qcow2 to allow injecting I/O errors in specific
      places.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      8252278a
    • K
      blkdebug: Add events and rules · 8b9b0cc2
      Kevin Wolf 提交于
      Block drivers can trigger a blkdebug event whenever they reach a place where it
      could be useful to inject an error for testing/debugging purposes.
      
      Rules are read from a blkdebug config file and describe which action is taken
      when an event is triggered. For now this is only injecting an error (with a few
      options) or changing the state (which is an integer). Rules can be declared to
      be active only in a specific state; this way later rules can distiguish on
      which path we came to trigger their event.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      8b9b0cc2
    • K
      blkdebug: Inject errors · b9f66d96
      Kevin Wolf 提交于
      Add a mechanism to inject errors instead of passing requests on. With no
      further patches applied, you can use it by setting inject_errno in gdb.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      b9f66d96
    • K
      blkdebug: Basic request passthrough · 6a143727
      Kevin Wolf 提交于
      This isn't doing anything interesting. It creates the blkdebug block driver as
      a protocol which just passes everything through to raw.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      6a143727