1. 11 9月, 2015 1 次提交
  2. 03 11月, 2014 4 次提交
  3. 22 9月, 2014 1 次提交
    • S
      block: delete cow block driver · 550830f9
      Stefan Hajnoczi 提交于
      This patch removes support for the cow file format.
      
      Normally we do not break backwards compatibility but in this case there
      is no impact and it is the most logical option.  Extraordinary claims
      require extraordinary evidence so I will show why removing the cow block
      driver is the right thing to do.
      
      The cow file format is the disk image format for Usermode Linux, a way
      of running a Linux system in userspace.  The performance of UML was
      never great and it was hacky, but it enjoyed some popularity before
      hardware virtualization support became mainstream.
      
      QEMU's block/cow.c is supposed to read this image file format.
      Unfortunately the file format was underspecified:
      
      1. Earlier Linux versions used the MAXPATHLEN constant for the backing
         filename field.  The value of MAXPATHLEN can change, so Linux
         switched to a 4096 literal but QEMU has a 1024 literal.
      
      2. Padding was not used on the header struct (both in the Linux kernel
         and in QEMU) so the struct layout varied across architectures.  In
         particular, i386 and x86_64 were different due to int64_t alignment
         differences.  Linux now uses __attribute__((packed)), QEMU does not.
      
      Therefore:
      
      1. QEMU cow images do not conform to the Linux cow image file format.
      
      2. cow images cannot be shared between different host architectures.
      
      This means QEMU cow images are useless and QEMU has not had bug reports
      from users actually hitting these issues.
      
      Let's get rid of this thing, it serves no purpose and no one will be
      affected.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Message-id: 1410877464-20481-1-git-send-email-stefanha@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      550830f9
  4. 12 9月, 2014 2 次提交
  5. 08 9月, 2014 2 次提交
  6. 22 8月, 2014 2 次提交
  7. 07 7月, 2014 1 次提交
  8. 01 7月, 2014 1 次提交
    • C
      qemu-img create: add 'nocow' option · 4ab15590
      Chunyan Liu 提交于
      Add 'nocow' option so that users could have a chance to set NOCOW flag to
      newly created files. It's useful on btrfs file system to enhance performance.
      
      Btrfs has low performance when hosting VM images, even more when the guest
      in those VM are also using btrfs as file system. One way to mitigate this bad
      performance is to turn off COW attributes on VM files. Generally, there are
      two ways to turn off NOCOW on btrfs: a) by mounting fs with nodatacow, then
      all newly created files will be NOCOW. b) per file. Add the NOCOW file
      attribute. It could only be done to empty or new files.
      
      This patch tries the second way, according to the option, it could add NOCOW
      per file.
      
      For most block drivers, since the create file step is in raw-posix.c, so we
      can do setting NOCOW flag ioctl in raw-posix.c only.
      
      But there are some exceptions, like block/vpc.c and block/vdi.c, they are
      creating file by calling qemu_open directly. For them, do the same setting
      NOCOW flag ioctl work in them separately.
      
      [Fixed up 082.out due to the new 'nocow' creation option
      --Stefan]
      Signed-off-by: NChunyan Liu <cyliu@suse.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      4ab15590
  9. 04 6月, 2014 1 次提交
  10. 01 2月, 2014 1 次提交
    • D
      Describe flaws in qcow/qcow2 encryption in the docs · 136cd19d
      Daniel P. Berrange 提交于
      The qemu-img.texi / qemu-doc.texi files currently describe the
      qcow2/qcow2 encryption thus
      
        "Encryption uses the AES format which is very secure (128 bit
         keys). Use a long password (16 characters) to get maximum
         protection."
      
      While AES is indeed a strong encryption system, the way that
      QCow/QCow2 use it results in a poor/weak encryption system.
      Due to the use of predictable IVs, based on the sector number
      extended to 128 bits, it is vulnerable to chosen plaintext
      attacks which can reveal the existence of encrypted data.
      
      The direct use of the user passphrase as the encryption key
      also leads to an inability to change the passphrase of an
      image. If passphrase is ever compromised the image data will
      all be vulnerable, since it cannot be re-encrypted. The admin
      has to clone the image files with a new passphrase and then
      use a program like shred to secure erase all the old files.
      
      Recommend against any use of QCow/QCow2 encryption, directing
      users to dm-crypt / LUKS which can meet modern cryptography
      best practices.
      
      [Changed "Qcow" to "qcow" for consistency.
      --Stefan]
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      136cd19d
  11. 24 1月, 2014 2 次提交
  12. 22 1月, 2014 1 次提交
  13. 20 12月, 2013 1 次提交
  14. 04 12月, 2013 1 次提交
  15. 28 11月, 2013 1 次提交
  16. 12 9月, 2013 1 次提交
  17. 06 9月, 2013 2 次提交
  18. 23 2月, 2013 3 次提交
  19. 30 11月, 2012 1 次提交
  20. 24 10月, 2012 2 次提交
  21. 14 9月, 2012 1 次提交
  22. 12 9月, 2012 1 次提交
    • B
      qemu-img: Add json output option to the info command. · c054b3fd
      Benoît Canet 提交于
      This option --output=[human|json] make qemu-img info output on
      human or JSON representation at the choice of the user.
      
      example:
      {
          "snapshots": [
              {
                  "vm-clock-nsec": 637102488,
                  "name": "vm-20120821145509",
                  "date-sec": 1345553709,
                  "date-nsec": 220289000,
                  "vm-clock-sec": 20,
                  "id": "1",
                  "vm-state-size": 96522745
              },
              {
                  "vm-clock-nsec": 28210866,
                  "name": "vm-20120821154059",
                  "date-sec": 1345556459,
                  "date-nsec": 171392000,
                  "vm-clock-sec": 46,
                  "id": "2",
                  "vm-state-size": 101208714
              }
          ],
          "virtual-size": 1073741824,
          "filename": "snap.qcow2",
          "cluster-size": 65536,
          "format": "qcow2",
          "actual-size": 985587712,
          "dirty-flag": false
      }
      Signed-off-by: NBenoit Canet <benoit@irqsave.net>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      c054b3fd
  23. 18 8月, 2012 1 次提交
  24. 15 6月, 2012 2 次提交
  25. 26 5月, 2012 1 次提交
  26. 15 12月, 2011 1 次提交
  27. 29 8月, 2011 1 次提交
    • K
      qemu-img: Require larger zero areas for sparse handling · a22f123c
      Kevin Wolf 提交于
      By default, require 4k of consecutive zero bytes for qemu-img to make the
      output file sparse by not issuing a write request for the zeroed parts. Add an
      -S option to allow users to tune this setting.
      
      This helps to avoid situations where a lot of zero sectors and data sectors are
      mixed and qemu-img tended to issue many tiny 512 byte writes.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      a22f123c
  28. 20 7月, 2011 1 次提交