1. 29 4月, 2014 3 次提交
  2. 27 4月, 2014 2 次提交
  3. 26 4月, 2014 2 次提交
  4. 22 4月, 2014 3 次提交
    • K
      qemu-iotests: Check common namespace for id and node-name · 90d9d301
      Kevin Wolf 提交于
      A name that is taken by an ID can't be taken by a node-name at the same
      time. Check that conflicts are correctly detected.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      90d9d301
    • K
      block: Catch duplicate IDs in bdrv_new() · f2d953ec
      Kevin Wolf 提交于
      Since commit f298d071, block devices added with blockdev-add don't have
      a QemuOpts around in dinfo->opts. Consequently, we can't rely any more
      on QemuOpts catching duplicate IDs for block devices.
      
      This patch adds a new check for duplicate IDs to bdrv_new(), and moves
      the existing check that the ID isn't already taken for a node-name there
      as well.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      f2d953ec
    • K
      block: Catch integer overflow in bdrv_rw_co() · da15ee51
      Kevin Wolf 提交于
      Insanely large requests could cause an integer overflow in
      bdrv_rw_co() while converting sectors to bytes. This patch catches the
      problem and returns an error (if we hadn't overflown the integer here,
      bdrv_check_byte_request() would have rejected the request, so we're not
      breaking anything that was supposed to work before).
      
      We actually do have a test case that triggers behaviour where we
      accidentally let such a request pass, so that it would return success,
      but read 0 bytes instead of the requested 4 GB. It fails now like it
      should.
      
      If the vdi block driver wants to be able to deal with huge images, it
      can't read the whole block bitmap at once into memory like it does
      today, but needs to use a metadata cache like qcow2 does.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      da15ee51
  5. 14 4月, 2014 1 次提交
  6. 11 4月, 2014 1 次提交
  7. 09 4月, 2014 1 次提交
  8. 08 4月, 2014 1 次提交
  9. 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
  10. 04 4月, 2014 3 次提交
    • K
      qemu-iotests: Remove CR line endings in reference output · cd408908
      Kevin Wolf 提交于
      qemu doesn't print these CRs any more. The test still didn't fail
      because the output comparison ignores line endings, but the change turns
      up each time when you want to update the output.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      cd408908
    • K
      block: Don't parse 'filename' option · e3fa4bfa
      Kevin Wolf 提交于
      When using the QDict option 'filename', it is supposed to be interpreted
      literally. The code did correctly avoid guessing the protocol from any
      string before the first colon, but it still called bdrv_parse_filename()
      which would, for example, incorrectly remove a 'file:' prefix in the
      raw-posix driver.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      e3fa4bfa
    • K
      qcow2: Flush metadata during read-only reopen · 4c2e5f8f
      Kevin Wolf 提交于
      If lazy refcounts are enabled for a backing file, committing to this
      backing file may leave it in a dirty state even if the commit succeeds.
      The reason is that the bdrv_flush() call in bdrv_commit() doesn't flush
      refcount updates with lazy refcounts enabled, and qcow2_reopen_prepare()
      doesn't take care to flush metadata.
      
      In order to fix this, this patch also fixes qcow2_mark_clean(), which
      contains another ineffective bdrv_flush() call beause lazy refcounts are
      disabled only afterwards. All existing callers of qcow2_mark_clean()
      either don't modify refcounts or already flush manually, so that this
      fixes only a latent, but not yet actually triggerable bug.
      
      Another instance of the same problem is live snapshots. Again, a real
      corruption is prevented by an explicit flush for non-read-only images in
      external_snapshot_prepare(), but images using lazy refcounts stay dirty.
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      4c2e5f8f
  11. 01 4月, 2014 22 次提交