1. 08 3月, 2019 1 次提交
    • K
      qcow2: External file I/O · 966b000f
      Kevin Wolf 提交于
      This changes the qcow2 implementation to direct all guest data I/O to
      s->data_file rather than bs->file, while metadata I/O still uses
      bs->file. At the moment, this is still always the same, but soon we'll
      add options to set s->data_file to an external data file.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      966b000f
  2. 12 2月, 2019 1 次提交
  3. 11 1月, 2019 1 次提交
    • P
      qemu/queue.h: leave head structs anonymous unless necessary · b58deb34
      Paolo Bonzini 提交于
      Most list head structs need not be given a name.  In most cases the
      name is given just in case one is going to use QTAILQ_LAST, QTAILQ_PREV
      or reverse iteration, but this does not apply to lists of other kinds,
      and even for QTAILQ in practice this is only rarely needed.  In addition,
      we will soon reimplement those macros completely so that they do not
      need a name for the head struct.  So clean up everything, not giving a
      name except in the rare case where it is necessary.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      b58deb34
  4. 05 11月, 2018 1 次提交
    • P
      block/qcow2-bitmap: Don't take address of fields in packed structs · caacea4b
      Peter Maydell 提交于
      Taking the address of a field in a packed struct is a bad idea, because
      it might not be actually aligned enough for that pointer type (and
      thus cause a crash on dereference on some host architectures). Newer
      versions of clang warn about this. Avoid the bug by not using the
      "modify in place" byte swapping functions.
      
      There are a few places where the in-place swap function is
      used on something other than a packed struct field; we convert
      those anyway, for consistency.
      
      This patch was produced with the following spatch script:
      
      @@
      expression E;
      @@
      -be16_to_cpus(&E);
      +E = be16_to_cpu(E);
      @@
      expression E;
      @@
      -be32_to_cpus(&E);
      +E = be32_to_cpu(E);
      @@
      expression E;
      @@
      -be64_to_cpus(&E);
      +E = be64_to_cpu(E);
      @@
      expression E;
      @@
      -cpu_to_be16s(&E);
      +E = cpu_to_be16(E);
      @@
      expression E;
      @@
      -cpu_to_be32s(&E);
      +E = cpu_to_be32(E);
      @@
      expression E;
      @@
      -cpu_to_be64s(&E);
      +E = cpu_to_be64(E);
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Tested-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NJohn Snow <jsnow@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      caacea4b
  5. 30 10月, 2018 1 次提交
    • V
      dirty-bitmaps: clean-up bitmaps loading and migration logic · 9c98f145
      Vladimir Sementsov-Ogievskiy 提交于
      This patch aims to bring the following behavior:
      
      1. We don't load bitmaps, when started in inactive mode. It's the case
      of incoming migration. In this case we wait for bitmaps migration
      through migration channel (if 'dirty-bitmaps' capability is enabled) or
      for invalidation (to load bitmaps from the image).
      
      2. We don't remove persistent bitmaps on inactivation. Instead, we only
      remove bitmaps after storing. This is the only way to restore bitmaps,
      if we decided to resume source after [failed] migration with
      'dirty-bitmaps' capability enabled (which means, that bitmaps were not
      stored).
      
      3. We load bitmaps on open and any invalidation, it's ok for all cases:
        - normal open
        - migration target invalidation with dirty-bitmaps capability
          (bitmaps are migrating through migration channel, the are not
           stored, so they should have IN_USE flag set and will be skipped
           when loading. However, it would fail if bitmaps are read-only[1])
        - migration target invalidation without dirty-bitmaps capability
          (normal load of the bitmaps, if migrated with shared storage)
        - source invalidation with dirty-bitmaps capability
          (skip because IN_USE)
        - source invalidation without dirty-bitmaps capability
          (bitmaps were dropped, reload them)
      
      [1]: to accurately handle this, migration of read-only bitmaps is
           explicitly forbidden in this patch.
      
      New mechanism for not storing bitmaps when migrate with dirty-bitmaps
      capability is introduced: migration filed in BdrvDirtyBitmap.
      Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      9c98f145
  6. 10 7月, 2018 1 次提交
  7. 11 6月, 2018 1 次提交
  8. 31 5月, 2018 1 次提交
  9. 27 3月, 2018 1 次提交
  10. 09 3月, 2018 1 次提交
    • P
      qcow2: fix flushing after dirty bitmap metadata writes · 1a0c2bfb
      Paolo Bonzini 提交于
      update_header_sync itself does not need to flush the caches to disk.
      The only paths that allocate clusters are:
      
      - bitmap_list_store with in_place=false, called by update_ext_header_and_dir
      
      - store_bitmap_data, called by store_bitmap
      
      - store_bitmap, called by qcow2_store_persistent_dirty_bitmaps and
        followed by update_ext_header_and_dir
      
      So in the end the central place where we need to flush the caches
      is update_ext_header_and_dir.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      1a0c2bfb
  11. 03 3月, 2018 1 次提交
  12. 13 2月, 2018 1 次提交
  13. 23 1月, 2018 1 次提交
  14. 06 10月, 2017 8 次提交
  15. 26 9月, 2017 1 次提交
  16. 25 7月, 2017 1 次提交
  17. 11 7月, 2017 9 次提交