Skip to content
Snippets Groups Projects
  1. May 07, 2020
  2. May 06, 2020
  3. May 05, 2020
    • Joaquin de Andres's avatar
      hw/core/register: Add register_init_block8 helper. · f08085f4
      Joaquin de Andres authored
      
      There was no support for 8 bits block registers. Changed
      register_init_block32 to be generic and static, adding register
      size in bits as parameter. Created one helper for each size.
      
      Signed-off-by: default avatarJoaquin de Andres <me@xcancerberox.com.ar>
      Message-Id: <20200402162839.76636-1-me@xcancerberox.com.ar>
      Reviewed-by: default avatarAlistair Francis <alistair.francis@wdc.com>
      Signed-off-by: default avatarAlistair Francis <alistair.francis@wdc.com>
      f08085f4
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2020-05-05' into staging · ea1329bb
      Peter Maydell authored
      
      Block patches:
      - Asynchronous copying for block-copy (i.e., the backup job)
      - Allow resizing of qcow2 images when they have internal snapshots
      - iotests: Logging improvements for Python tests
      - iotest 153 fix, and block comment cleanups
      
      # gpg: Signature made Tue 05 May 2020 13:56:58 BST
      # gpg:                using RSA key 91BEB60A30DB3E8857D11829F407DB0061D5CF40
      # gpg:                issuer "mreitz@redhat.com"
      # gpg: Good signature from "Max Reitz <mreitz@redhat.com>" [full]
      # Primary key fingerprint: 91BE B60A 30DB 3E88 57D1  1829 F407 DB00 61D5 CF40
      
      * remotes/maxreitz/tags/pull-block-2020-05-05: (24 commits)
        block/block-copy: use aio-task-pool API
        block/block-copy: refactor task creation
        block/block-copy: add state pointer to BlockCopyTask
        block/block-copy: alloc task on each iteration
        block/block-copy: rename in-flight requests to tasks
        Fix iotest 153
        block: Comment cleanups
        qcow2: Tweak comment about bitmaps vs. resize
        qcow2: Allow resize of images with internal snapshots
        block: Add blk_new_with_bs() helper
        iotests: use python logging for iotests.log()
        iotests: Mark verify functions as private
        iotest 258: use script_main
        iotests: add script_initialize
        iotests: add hmp helper with logging
        iotests: limit line length to 79 chars
        iotests: touch up log function signature
        iotests: drop pre-Python 3.4 compatibility code
        iotests: alphabetize standard imports
        iotests: add pylintrc file
        ...
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      ea1329bb
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2020-05-04' into staging · f19d118b
      Peter Maydell authored
      
      nbd patches for 2020-05-04
      
      - reduce client-side fragmentation of NBD trim and status requests
      - fix iotest 41 when run in deep tree
      - fix socket activation in qemu-nbd
      
      # gpg: Signature made Mon 04 May 2020 22:12:21 BST
      # gpg:                using RSA key 71C2CC22B1C4602927D2F3AAA7A16B4A2527436A
      # gpg: Good signature from "Eric Blake <eblake@redhat.com>" [full]
      # gpg:                 aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>" [full]
      # gpg:                 aka "[jpeg image of size 6874]" [full]
      # Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2  F3AA A7A1 6B4A 2527 436A
      
      * remotes/ericb/tags/pull-nbd-2020-05-04:
        block/nbd-client: drop max_block restriction from discard
        block/nbd-client: drop max_block restriction from block_status
        iotests/041: Fix NBD socket path
        tools: Fix use of fcntl(F_SETFD) during socket activation
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      f19d118b
    • Peter Maydell's avatar
      Merge remote-tracking branch... · a2261b27
      Peter Maydell authored
      Merge remote-tracking branch 'remotes/vivier2/tags/trivial-branch-for-5.1-pull-request' into staging
      
      trivial patches (20200504)
      
      Silent static analyzer warning
      Remove dead assignments
      Support -chardev serial on macOS
      Update MAINTAINERS
      Some cosmetic changes
      
      # gpg: Signature made Mon 04 May 2020 16:45:18 BST
      # gpg:                using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
      # gpg:                issuer "laurent@vivier.eu"
      # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full]
      # gpg:                 aka "Laurent Vivier <laurent@vivier.eu>" [full]
      # gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full]
      # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C
      
      * remotes/vivier2/tags/trivial-branch-for-5.1-pull-request:
        hw/timer/pxa2xx_timer: Add assertion to silent static analyzer warning
        hw/timer/stm32f2xx_timer: Remove dead assignment
        hw/gpio/aspeed_gpio: Remove dead assignment
        hw/isa/i82378: Remove dead assignment
        hw/ide/sii3112: Remove dead assignment
        hw/input/adb-kbd: Remove dead assignment
        hw/i2c/pm_smbus: Remove dead assignment
        blockdev: Remove dead assignment
        block: Avoid dead assignment
        Compress lines for immediate return
        chardev: Add macOS to list of OSes that support -chardev serial
        MAINTAINERS: Update Keith Busch's email address
        elf_ops: Don't try to g_mapped_file_unref(NULL)
        hw/mem/pc-dimm: Fix line over 80 characters warning
        hw/mem/pc-dimm: Print slot number on error at pc_dimm_pre_plug()
        MAINTAINERS: Mark the LatticeMico32 target as orphan
        timer/exynos4210_mct: Remove redundant statement in exynos4210_mct_write()
        display/blizzard: use extract16() for fix clang analyzer warning in blizzard_draw_line16_32()
        scsi/esp-pci: add g_assert() for fix clang analyzer warning in esp_pci_io_write()
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      a2261b27
    • Vladimir Sementsov-Ogievskiy's avatar
      block/block-copy: use aio-task-pool API · 4ce5dd3e
      Vladimir Sementsov-Ogievskiy authored
      
      Run block_copy iterations in parallel in aio tasks.
      
      Changes:
        - BlockCopyTask becomes aio task structure. Add zeroes field to pass
          it to block_copy_do_copy
        - add call state - it's a state of one call of block_copy(), shared
          between parallel tasks. For now used only to keep information about
          first error: is it read or not.
        - convert block_copy_dirty_clusters to aio-task loop.
      
      Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Message-Id: <20200429130847.28124-6-vsementsov@virtuozzo.com>
      Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
      4ce5dd3e
    • Vladimir Sementsov-Ogievskiy's avatar
      block/block-copy: refactor task creation · 42ac2144
      Vladimir Sementsov-Ogievskiy authored
      
      Instead of just relying on the comment "Called only on full-dirty
      region" in block_copy_task_create() let's move initial dirty area
      search directly to block_copy_task_create(). Let's also use effective
      bdrv_dirty_bitmap_next_dirty_area instead of looping through all
      non-dirty clusters.
      
      Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
      Message-Id: <20200429130847.28124-5-vsementsov@virtuozzo.com>
      Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
      42ac2144
    • Vladimir Sementsov-Ogievskiy's avatar
      block/block-copy: add state pointer to BlockCopyTask · 1348a657
      Vladimir Sementsov-Ogievskiy authored
      
      We are going to use aio-task-pool API, so we'll need state pointer in
      BlockCopyTask anyway. Add it now and use where possible.
      
      Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
      Message-Id: <20200429130847.28124-4-vsementsov@virtuozzo.com>
      Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
      1348a657
    • Vladimir Sementsov-Ogievskiy's avatar
      block/block-copy: alloc task on each iteration · f13e60a9
      Vladimir Sementsov-Ogievskiy authored
      
      We are going to use aio-task-pool API, so tasks will be handled in
      parallel. We need therefore separate allocated task on each iteration.
      Introduce this logic now.
      
      Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
      Message-Id: <20200429130847.28124-3-vsementsov@virtuozzo.com>
      Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
      f13e60a9
    • Vladimir Sementsov-Ogievskiy's avatar
      block/block-copy: rename in-flight requests to tasks · e9407785
      Vladimir Sementsov-Ogievskiy authored
      
      We are going to use aio-task-pool API and extend in-flight request
      structure to be a successor of AioTask, so rename things appropriately.
      
      Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
      Message-Id: <20200429130847.28124-2-vsementsov@virtuozzo.com>
      Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
      e9407785
    • Maxim Levitsky's avatar
      Fix iotest 153 · 44e808c1
      Maxim Levitsky authored
      
      Commit f62514b3 made qemu-img reject -o "" but this test uses it.
      Since this test only tries to do a dry-run run of qemu-img amend,
      replace the -o "" with dummy -o "size=$size".
      
      Fixes: f62514b3
      
      Signed-off-by: default avatarMaxim Levitsky <mlevitsk@redhat.com>
      Message-Id: <20200504131959.9533-1-mlevitsk@redhat.com>
      Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
      44e808c1
    • Eric Blake's avatar
      block: Comment cleanups · f4649069
      Eric Blake authored
      
      It's been a while since we got rid of the sector-based bdrv_read and
      bdrv_write (commit 2e11d756); let's finish the job on a few remaining
      comments.
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Message-Id: <20200428213807.776655-1-eblake@redhat.com>
      Reviewed-by: default avatarAlberto Garcia <berto@igalia.com>
      Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
      f4649069
    • Eric Blake's avatar
      qcow2: Tweak comment about bitmaps vs. resize · ee1244a2
      Eric Blake authored
      
      Our comment did not actually match the code.  Rewrite the comment to
      be less sensitive to any future changes to qcow2-bitmap.c that might
      implement scenarios that we currently reject.
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
      Message-Id: <20200428192648.749066-4-eblake@redhat.com>
      Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
      ee1244a2
    • Eric Blake's avatar
      qcow2: Allow resize of images with internal snapshots · 7fa140ab
      Eric Blake authored
      
      We originally refused to allow resize of images with internal
      snapshots because the v2 image format did not require the tracking of
      snapshot size, making it impossible to safely revert to a snapshot
      with a different size than the current view of the image.  But the
      snapshot size tracking was rectified in v3, and our recent fixes to
      qemu-img amend (see 0a85af35) guarantee that we always have a valid
      snapshot size.  Thus, we no longer need to artificially limit image
      resizes, but it does become one more thing that would prevent a
      downgrade back to v2.  And now that we support different-sized
      snapshots, it's also easy to fix reverting to a snapshot to apply the
      new size.
      
      Upgrade iotest 61 to cover this (we previously had NO coverage of
      refusal to resize while snapshots exist).  Note that the amend process
      can fail but still have effects: in particular, since we break things
      into upgrade, resize, downgrade, a failure during resize does not roll
      back changes made during upgrade, nor does failure in downgrade roll
      back a resize.  But this situation is pre-existing even without this
      patch; and without journaling, the best we could do is minimize the
      chance of partial failure by collecting all changes prior to doing any
      writes - which adds a lot of complexity but could still fail with EIO.
      On the other hand, we are careful that even if we have partial
      modification but then fail, the image is left viable (that is, we are
      careful to sequence things so that after each successful cluster
      write, there may be transient leaked clusters but no corrupt
      metadata).  And complicating the code to make it more transaction-like
      is not worth the effort: a user can always request multiple 'qemu-img
      amend' changing one thing each, if they need finer-grained control
      over detecting the first failure than what they get by letting qemu
      decide how to sequence multiple changes.
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
      Message-Id: <20200428192648.749066-3-eblake@redhat.com>
      Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
      7fa140ab
    • Eric Blake's avatar
      block: Add blk_new_with_bs() helper · a3aeeab5
      Eric Blake authored
      
      There are several callers that need to create a new block backend from
      an existing BDS; make the task slightly easier with a common helper
      routine.
      
      Suggested-by: default avatarMax Reitz <mreitz@redhat.com>
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Message-Id: <20200424190903.522087-2-eblake@redhat.com>
      [mreitz: Set @ret only in error paths, see
       https://lists.nongnu.org/archive/html/qemu-block/2020-04/msg01216.html
      
      ]
      Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
      Message-Id: <20200428192648.749066-2-eblake@redhat.com>
      Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
      a3aeeab5
    • John Snow's avatar
      iotests: use python logging for iotests.log() · 52ea799e
      John Snow authored
      We can turn logging on/off globally instead of per-function.
      
      Remove use_log from run_job, and use python logging to turn on
      diffable output when we run through a script entry point.
      
      iotest 245 changes output order due to buffering reasons.
      
      An extended note on python logging:
      
      A NullHandler is added to `qemu.iotests` to stop output from being
      generated if this code is used as a library without configuring logging.
      A NullHandler is only needed at the root, so a duplicate handler is not
      needed for `qemu.iotests.diff_io`.
      
      When logging is not configured, messages at the 'WARNING' levels or
      above are printed with default settings. The NullHandler stops this from
      occurring, which is considered good hygiene for code used as a library.
      
      See https://docs.python.org/3/howto/logging.html#library-config
      
      When logging is actually enabled (always at the behest of an explicit
      call by a client script), a root logger is implicitly created at the
      root, which allows messages to propagate upwards and be handled/emitted
      from the root logger with default settings.
      
      When we want iotest logging, we attach a handler to the
      qemu.iotests.diff_io logger and disable propagation to avoid possible
      double-printing.
      
      For more information on python logging infrastructure, I highly
      recommend downloading the pip package `logging_tree`, which provides
      convenient visualizations of the hierarchical logging configuration
      under different circumstances.
      
      See https://pypi.org/project/logging_tree/
      
       for more information.
      
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
      Message-Id: <20200331000014.11581-15-jsnow@redhat.com>
      Reviewed-by: default avatarKevin Wolf <kwolf@redhat.com>
      Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
      52ea799e
Loading