1. 06 2月, 2020 3 次提交
  2. 06 1月, 2020 1 次提交
  3. 19 12月, 2019 1 次提交
  4. 18 12月, 2019 2 次提交
  5. 28 10月, 2019 9 次提交
  6. 25 10月, 2019 1 次提交
  7. 18 10月, 2019 3 次提交
  8. 10 10月, 2019 3 次提交
  9. 16 9月, 2019 2 次提交
  10. 10 9月, 2019 1 次提交
    • A
      qcow2: Fix the calculation of the maximum L2 cache size · b70d0820
      Alberto Garcia 提交于
      The size of the qcow2 L2 cache defaults to 32 MB, which can be easily
      larger than the maximum amount of L2 metadata that the image can have.
      For example: with 64 KB clusters the user would need a qcow2 image
      with a virtual size of 256 GB in order to have 32 MB of L2 metadata.
      
      Because of that, since commit b749562d
      we forbid the L2 cache to become larger than the maximum amount of L2
      metadata for the image, calculated using this formula:
      
          uint64_t max_l2_cache = virtual_disk_size / (s->cluster_size / 8);
      
      The problem with this formula is that the result should be rounded up
      to the cluster size because an L2 table on disk always takes one full
      cluster.
      
      For example, a 1280 MB qcow2 image with 64 KB clusters needs exactly
      160 KB of L2 metadata, but we need 192 KB on disk (3 clusters) even if
      the last 32 KB of those are not going to be used.
      
      However QEMU rounds the numbers down and only creates 2 cache tables
      (128 KB), which is not enough for the image.
      
      A quick test doing 4KB random writes on a 1280 MB image gives me
      around 500 IOPS, while with the correct cache size I get 16K IOPS.
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NAlberto Garcia <berto@igalia.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      b70d0820
  11. 27 8月, 2019 3 次提交
  12. 19 8月, 2019 2 次提交
  13. 16 8月, 2019 1 次提交
  14. 08 7月, 2019 1 次提交
  15. 02 7月, 2019 1 次提交
  16. 04 6月, 2019 2 次提交
    • K
      block: Add BlockBackend.ctx · d861ab3a
      Kevin Wolf 提交于
      This adds a new parameter to blk_new() which requires its callers to
      declare from which AioContext this BlockBackend is going to be used (or
      the locks of which AioContext need to be taken anyway).
      
      The given context is only stored and kept up to date when changing
      AioContexts. Actually applying the stored AioContext to the root node
      is saved for another commit.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      d861ab3a
    • V
      block: avoid recursive block_status call if possible · 69f47505
      Vladimir Sementsov-Ogievskiy 提交于
      drv_co_block_status digs bs->file for additional, more accurate search
      for hole inside region, reported as DATA by bs since 5daa74a6.
      
      This accuracy is not free: assume we have qcow2 disk. Actually, qcow2
      knows, where are holes and where is data. But every block_status
      request calls lseek additionally. Assume a big disk, full of
      data, in any iterative copying block job (or img convert) we'll call
      lseek(HOLE) on every iteration, and each of these lseeks will have to
      iterate through all metadata up to the end of file. It's obviously
      ineffective behavior. And for many scenarios we don't need this lseek
      at all.
      
      However, lseek is needed when we have metadata-preallocated image.
      
      So, let's detect metadata-preallocation case and don't dig qcow2's
      protocol file in other cases.
      
      The idea is to compare allocation size in POV of filesystem with
      allocations size in POV of Qcow2 (by refcounts). If allocation in fs is
      significantly lower, consider it as metadata-preallocation case.
      
      102 iotest changed, as our detector can't detect shrinked file as
      metadata-preallocation, which don't seem to be wrong, as with metadata
      preallocation we always have valid file length.
      
      Two other iotests have a slight change in their QMP output sequence:
      Active 'block-commit' returns earlier because the job coroutine yields
      earlier on a blocking operation. This operation is loading the refcount
      blocks in qcow2_detect_metadata_preallocation().
      Suggested-by: NDenis V. Lunev <den@openvz.org>
      Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      69f47505
  17. 29 5月, 2019 4 次提交