1. 20 11月, 2018 1 次提交
  2. 25 9月, 2018 1 次提交
  3. 05 7月, 2018 1 次提交
    • K
      block: Don't silently truncate node names · 824808dd
      Kevin Wolf 提交于
      If the user passes a too long node name string, we silently truncate it
      to fit into BlockDriverState.node_name, i.e. to 31 characters. Apart
      from surprising the user when the node has a different name than
      requested, this also bypasses the check for duplicate names, so that the
      same name can be assigned to multiple nodes.
      
      Fix this by just making too long node names an error.
      Reported-by: NPeter Krempa <pkrempa@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      824808dd
  4. 06 3月, 2018 1 次提交
  5. 23 1月, 2018 1 次提交
    • M
      iotests: Fix 051 for compat=0.10 · 7e0db6f4
      Max Reitz 提交于
      051 has both compat=1.1 and compat=0.10 tests (once it uses
      lazy_refcounts, once it tests that setting them does not work).
      For the compat=0.10 tests, it already explicitly creates a suitable
      image.  So let's just ignore the user-specified compat level for the
      lazy_refcounts test and explicitly create a compat=1.1 image there, too.
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Message-id: 20171123020832.8165-12-mreitz@redhat.com
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      7e0db6f4
  6. 26 9月, 2017 1 次提交
  7. 11 7月, 2017 1 次提交
    • E
      tests: Avoid non-portable 'echo -ARG' · b43671f8
      Eric Blake 提交于
      POSIX says that backslashes in the arguments to 'echo', as well as
      any use of 'echo -n' and 'echo -e', are non-portable; it recommends
      people should favor 'printf' instead.  This is definitely true where
      we do not control which shell is running (such as in makefile snippets
      or in documentation examples).  But even for scripts where we
      require bash (and therefore, where echo does what we want by default),
      it is still possible to use 'shopt -s xpg_echo' to change bash's
      behavior of echo.  And setting a good example never hurts when we are
      not sure if a snippet will be copied from a bash-only script to a
      general shell script (although I don't change the use of non-portable
      \e for ESC when we know the running shell is bash).
      
      Replace 'echo -n "..."' with 'printf %s "..."', and 'echo -e "..."'
      with 'printf %b "...\n"', with the optimization that the %s/%b
      argument can be omitted if the string being printed is a strict
      literal with no '%', '$', or '`' (we could technically also make
      this optimization when there are $ or `` substitutions but where
      we can prove their results will not be problematic, but proving
      that such substitutions are safe makes the patch less trivial
      compared to just being consistent).
      
      In the qemu-iotests check script, fix unusual shell quoting
      that would result in word-splitting if 'date' outputs a space.
      
      In test 051, take an opportunity to shorten the line.
      
      In test 068, get rid of a pointless second invocation of bash.
      
      CC: qemu-trivial@nongnu.org
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-id: 20170703180950.9895-1-eblake@redhat.com
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      b43671f8
  8. 27 4月, 2017 2 次提交
  9. 15 4月, 2016 1 次提交
  10. 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
  11. 20 1月, 2016 1 次提交
  12. 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
  13. 18 12月, 2015 3 次提交
  14. 16 10月, 2015 1 次提交
  15. 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
  16. 10 3月, 2015 2 次提交
  17. 16 2月, 2015 1 次提交
  18. 25 9月, 2014 1 次提交
  19. 26 6月, 2014 2 次提交
  20. 10 5月, 2014 1 次提交
  21. 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
  22. 04 4月, 2014 1 次提交
  23. 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
  24. 09 2月, 2014 1 次提交
  25. 29 11月, 2013 1 次提交
  26. 15 11月, 2013 1 次提交
  27. 07 11月, 2013 1 次提交
  28. 27 9月, 2013 1 次提交
  29. 25 9月, 2013 1 次提交
  30. 27 7月, 2013 1 次提交
  31. 15 7月, 2013 1 次提交
  32. 22 4月, 2013 1 次提交
  33. 15 4月, 2013 2 次提交