1. 27 4月, 2017 1 次提交
  2. 15 4月, 2016 1 次提交
  3. 30 3月, 2016 1 次提交
    • K
      block: Remove BDRV_O_CACHE_WB · 61de4c68
      Kevin Wolf 提交于
      The previous patches have successively made blk->enable_write_cache the
      true source for the information whether a writethrough mode must be
      implemented. The corresponding BDRV_O_CACHE_WB is only useless baggage
      we're carrying around, so now's the time to remove it.
      
      At the same time, we remove the 'cache.writeback' option parsing on the
      BDS level as the only effect was setting the BDRV_O_CACHE_WB flag.
      
      This change requires test cases that explicitly enabled the option to
      drop it. Other than that and the change of the error message when
      writethrough is enabled on the BDS level (from "Can't set writethrough
      mode" to "doesn't support the option"), there should be no change in
      behaviour.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      61de4c68
  4. 20 1月, 2016 1 次提交
  5. 08 1月, 2016 1 次提交
    • B
      qemu-iotests: s390x: fix test 051 · dd87de06
      Bo Tu 提交于
      Replace the remaining "-drive file..."
      by "-drive file=...,if=none,id=$device_id", then x86 and s390x
      can get the common output.
      "if=ide, if=floppy, if=scsi" are not supported by s390x,
      so these test cases are not executed for s390x platform.
      Signed-off-by: NBo Tu <tubo@linux.vnet.ibm.com>
      Message-id: 1451885360-20236-2-git-send-email-tubo@linux.vnet.ibm.com
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      dd87de06
  6. 18 12月, 2015 3 次提交
  7. 16 10月, 2015 1 次提交
  8. 12 6月, 2015 1 次提交
    • M
      block: driver should override flags in bdrv_open() · 53a29513
      Max Reitz 提交于
      The BDRV_O_PROTOCOL flag should have an impact only if no driver is
      specified explicitly. Therefore, if bdrv_open() is called with an
      explicit block driver argument (either through the options QDict or
      through the drv parameter) and that block driver is a protocol block
      driver, BDRV_O_PROTOCOL should be set; if it is a format block driver,
      BDRV_O_PROTOCOL should be unset.
      
      While there was code to unset the flag in case a format block driver
      has been selected, it only followed the bdrv_fill_options() function
      call whereas the flag in fact needs to be adjusted before it is used
      there.
      
      With that change, BDRV_O_PROTOCOL will always be set if the BDS should
      be a protocol driver; if the driver has been specified explicitly, the
      new code will set it; and bdrv_fill_options() will only "probe" a
      protocol driver if BDRV_O_PROTOCOL is set. The probing after
      bdrv_fill_options() cannot select a protocol driver.
      
      Thus, bdrv_open_image() to open BDS.file is never called if a protocol
      BDS is about to be created. With that change in turn it is impossible to
      call bdrv_open_common() with a protocol drv and file != NULL, which
      allows us to remove the bdrv_swap() call.
      
      This change breaks a test case in qemu-iotest 051:
      "-drive file=t.qcow2,file.driver=qcow2" now works because the explicitly
      specified "qcow2" overrides the BDRV_O_PROTOCOL which is automatically
      set for the "file" BDS (and the filename is just passed down).
      Therefore, this patch removes that test case.
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      53a29513
  9. 10 3月, 2015 2 次提交
  10. 16 2月, 2015 1 次提交
  11. 25 9月, 2014 1 次提交
  12. 26 6月, 2014 2 次提交
  13. 10 5月, 2014 1 次提交
  14. 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
  15. 04 4月, 2014 1 次提交
  16. 07 3月, 2014 1 次提交
    • K
      block: Fix error path segfault in bdrv_open() · eb909c7f
      Kevin Wolf 提交于
      Using an invalid option for a block device that is opened with
      BDRV_O_PROTOCOL led to drv = NULL, and when trying to include the driver
      name in the error message, qemu dereferenced it:
      
          $ x86_64-softmmu/qemu-system-x86_64 -drive file=/tmp/test.qcow2,file.foo=bar
          Segmentation fault (core dumped)
      
      With this patch applied, the expected error message is printed:
      
          $ x86_64-softmmu/qemu-system-x86_64 -drive file=/tmp/test.qcow2,file.foo=bar
          qemu-system-x86_64: -drive file=/tmp/test.qcow2,file.foo=bar: could
          not open disk image /tmp/test.qcow2: Block protocol 'file' doesn't
          support the option 'foo'
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NBenoit Canet <benoit@irqsave.net>
      eb909c7f
  17. 09 2月, 2014 1 次提交
  18. 29 11月, 2013 1 次提交
  19. 15 11月, 2013 1 次提交
  20. 07 11月, 2013 1 次提交
  21. 27 9月, 2013 1 次提交
  22. 25 9月, 2013 1 次提交
  23. 27 7月, 2013 1 次提交
  24. 15 7月, 2013 1 次提交
  25. 22 4月, 2013 1 次提交
  26. 15 4月, 2013 2 次提交