1. 22 12月, 2011 1 次提交
  2. 15 12月, 2011 1 次提交
  3. 29 11月, 2011 2 次提交
    • M
      cutils: Make strtosz & friends leave follow set to callers · eba90e4e
      Markus Armbruster 提交于
      strtosz() & friends require the size to be at the end of the string,
      or be followed by whitespace or ','.  I find this surprising, because
      the name suggests it works like strtol().
      
      The check simplifies callers that accept exactly that follow set
      slightly.  No such callers exist.
      
      The check is redundant for callers that accept a smaller follow set,
      and thus need to check themselves anyway.  Right now, this is the case
      for all but one caller.  All of them neglected to check, or checked
      incorrectly, but the previous few commits fixed them up.
      
      Finally, the check is problematic for callers that accept a larger
      follow set.  This is the case in monitor_parse_command().
      Fortunately, the problems there are relatively harmless.
      
      monitor_parse_command() uses strtosz() for argument type 'o'.  When
      the last argument is of type 'o', a trailing ',' is diagnosed
      differently than other trailing junk:
      
          (qemu) migrate_set_speed 1x
          invalid size
          (qemu) migrate_set_speed 1,
          migrate_set_speed: extraneous characters at the end of line
      
      A related inconsistency exists with non-last arguments.  No such
      command exists, but let's use memsave to explore the inconsistency.
      
      The monitor permits, but does not require whitespace between
      arguments.  For instance, "memsave (1-1)1024foo" is parsed as command
      memsave with three arguments 0, 1024 and "foo".  Yes, this is daft,
      but at least it's consistently daft.
      
      If I change memsave's second argument from 'i' to 'o', then "memsave
      (1-1)1foo" is rejected, because the size is followed by an 'f'.  But
      "memsave (1-1)1," is still accepted, and duly saves to file ",".
      
      We don't have any users of strtosz that profit from the check.  In the
      users we have, it appears to encourage sloppy error checking, or gets
      in the way.  Drop the bothersome check.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      eba90e4e
    • M
      cutils: Drop broken support for zero strtosz default_suffix · 8dddfb55
      Markus Armbruster 提交于
      Commit 9f9b17a4's strtosz() defaults a missing suffix to 'M', except
      it rejects fractions then (switch case 0).
      
      When commit d8427002 introduced strtosz_suffix(), that changed:
      fractions are no longer rejected, because we go to switch case 'M' on
      missing suffix now.  Not mentioned in commit message, probably
      unintentional.  Not worth changing back now.
      
      Because case 0 is still around, you can get the old behavior by
      passing a zero default_suffix to strtosz_suffix() or
      strtosz_suffix_unit().  Undocumented and not used.  Drop.
      
      Commit d8427002 also neglected to update the function comment.  Fix it
      up.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      8dddfb55
  4. 02 11月, 2011 1 次提交
  5. 25 8月, 2011 1 次提交
  6. 21 8月, 2011 1 次提交
  7. 05 8月, 2011 1 次提交
  8. 10 2月, 2011 1 次提交
    • C
      QCOW2: bug fix - read base image beyond its size · e0d9c6f9
      Chunqiang Tang 提交于
      This patch fixes the following bug in QCOW2. For a QCOW2 image that is larger
      than its base image, when handling a read request straddling over the end of the
      base image, the QCOW2 driver attempts to read beyond the end of the base image
      and the request would fail.
      
      This bug was found by Fast Virtual Disk (FVD)'s fully automated testing tool.
      The following test triggered the bug.
      
      dd if=/dev/zero of=/var/ramdisk/truth.raw count=0 bs=1 seek=1098561536
      dd if=/dev/zero of=/var/ramdisk/zero-500M.raw count=0 bs=1 seek=593099264
      ./qemu-img create -f qcow2 -ocluster_size=65536,backing_fmt=blksim -b /var/ramdisk/zero-500M.raw /var/ramdisk/test.qcow2 1098561536
      ./qemu-io --auto --seed=30477694 --truth=/var/ramdisk/truth.raw --format=qcow2 --test=blksim:/var/ramdisk/test.qcow2 --verify_write=true --compare_before=false --compare_after=true --round=100000 --parallel=100 --io_size=10485760 --fail_prob=0 --cancel_prob=0 --instant_qemubh=true
      Signed-off-by: NChunqiang Tang <ctang@us.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      e0d9c6f9
  9. 31 1月, 2011 4 次提交
  10. 24 1月, 2011 1 次提交
  11. 17 12月, 2010 1 次提交
  12. 04 11月, 2010 1 次提交
  13. 21 9月, 2010 1 次提交
  14. 18 3月, 2010 1 次提交
  15. 20 9月, 2009 1 次提交
  16. 11 9月, 2009 2 次提交
    • C
      block: use fdatasync instead of fsync if possible · 6f1953c4
      Christoph Hellwig 提交于
      If we are flushing the caches for our image files we only care about the
      data (including the metadata required for accessing it) but not things
      like timestamp updates.  So try to use fdatasync instead of fsync to
      implement the flush operations.
      
      Unfortunately many operating systems still do not support fdatasync,
      so we add a qemu_fdatasync wrapper that uses fdatasync if available
      as per the _POSIX_SYNCHRONIZED_IO feature macro or fsync otherwise.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      6f1953c4
    • K
      Add bdrv_aio_multiwrite · 40b4f539
      Kevin Wolf 提交于
      One performance problem of qcow2 during the initial image growth are
      sequential writes that are not cluster aligned. In this case, when a first
      requests requires to allocate a new cluster but writes only to the first
      couple of sectors in that cluster, the rest of the cluster is zeroed - just
      to be overwritten by the following second request that fills up the cluster.
      
      Let's try to merge sequential write requests to the same cluster, so we can
      avoid to write the zero padding to the disk in the first place.
      
      As a nice side effect, also other formats take advantage of dealing with less
      and larger requests.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      40b4f539
  17. 10 7月, 2009 1 次提交
  18. 02 7月, 2009 1 次提交
  19. 30 6月, 2009 1 次提交
    • R
      support colon in filenames · 707c0dbc
      Ram Pai 提交于
      Problem: It is impossible to feed filenames with the character colon because
      qemu interprets such names as a protocol. For example filename scsi:0, is
      interpreted as a protocol by name "scsi".
      
      This patch allows user to espace colon characters. For example the above
      filename can now be expressed either as 'scsi\:0' or as file:scsi:0
      
      anything following the "file:" tag is interpreted verbatin. However if "file:"
      tag is omitted then any colon characters in the string must be escaped using
      backslash.
      
      Here are couple of examples:
      
      scsi\:0\:abc is a local file scsi:0:abc
      http\://myweb is a local file by name http://myweb
      file:scsi:0:abc is a local file scsi:0:abc
      file:http://myweb is a local file by name http://mywebSigned-off-by: NRam Pai <linuxram@us.ibm.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      707c0dbc
  20. 14 5月, 2009 1 次提交
  21. 29 3月, 2009 1 次提交
  22. 06 2月, 2009 1 次提交
  23. 27 1月, 2009 1 次提交
  24. 23 1月, 2009 1 次提交
  25. 12 12月, 2008 1 次提交
  26. 05 12月, 2008 2 次提交
  27. 16 11月, 2008 1 次提交
  28. 09 11月, 2008 1 次提交
  29. 25 10月, 2008 1 次提交
  30. 09 6月, 2008 1 次提交
  31. 12 4月, 2008 1 次提交
  32. 11 11月, 2007 2 次提交
  33. 17 9月, 2007 1 次提交