1. 28 1月, 2020 1 次提交
  2. 28 10月, 2019 1 次提交
    • M
      block: Add @exact parameter to bdrv_co_truncate() · c80d8b06
      Max Reitz 提交于
      We have two drivers (iscsi and file-posix) that (in some cases) return
      success from their .bdrv_co_truncate() implementation if the block
      device is larger than the requested offset, but cannot be shrunk.  Some
      callers do not want that behavior, so this patch adds a new parameter
      that they can use to turn off that behavior.
      
      This patch just adds the parameter and lets the block/io.c and
      block/block-backend.c functions pass it around.  All other callers
      always pass false and none of the implementations evaluate it, so that
      this patch does not change existing behavior.  Future patches take care
      of that.
      Suggested-by: NMaxim Levitsky <mlevitsk@redhat.com>
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Message-id: 20190918095144.955-5-mreitz@redhat.com
      Reviewed-by: NMaxim Levitsky <mlevitsk@redhat.com>
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      c80d8b06
  3. 25 10月, 2019 1 次提交
  4. 18 10月, 2019 4 次提交
  5. 10 10月, 2019 1 次提交
    • V
      block/backup: use backup-top instead of write notifiers · 00e30f05
      Vladimir Sementsov-Ogievskiy 提交于
      Drop write notifiers and use filter node instead.
      
      = Changes =
      
      1. Add filter-node-name argument for backup qmp api. We have to do it
      in this commit, as 257 needs to be fixed.
      
      2. There are no more write notifiers here, so is_write_notifier
      parameter is dropped from block-copy paths.
      
      3. To sync with in-flight requests at job finish we now have drained
      removing of the filter, we don't need rw-lock.
      
      4. Block-copy is now using BdrvChildren instead of BlockBackends
      
      5. As backup-top owns these children, we also move block-copy state
      into backup-top's ownership.
      
      = Iotest changes =
      
      56: op-blocker doesn't shoot now, as we set it on source, but then
      check on filter, when trying to start second backup.
      To keep the test we instead can catch another collision: both jobs will
      get 'drive0' job-id, as job-id parameter is unspecified. To prevent
      interleaving with file-posix locks (as they are dependent on config)
      let's use another target for second backup.
      
      Also, it's obvious now that we'd like to drop this op-blocker at all
      and add a test-case for two backups from one node (to different
      destinations) actually works. But not in these series.
      
      141: Output changed: prepatch, "Node is in use" comes from bdrv_has_blk
      check inside qmp_blockdev_del. But we've dropped block-copy blk
      objects, so no more blk objects on source bs (job blk is on backup-top
      filter bs). New message is from op-blocker, which is the next check in
      qmp_blockdev_add.
      
      257: The test wants to emulate guest write during backup. They should
      go to filter node, not to original source node, of course. Therefore we
      need to specify filter node name and use it.
      Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Message-id: 20191001131409.14202-6-vsementsov@virtuozzo.com
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      00e30f05
  6. 19 8月, 2019 1 次提交
    • M
      mirror: Fix bdrv_has_zero_init() use · cdf3bc93
      Max Reitz 提交于
      bdrv_has_zero_init() only has meaning for newly created images or image
      areas.  If the mirror job itself did not create the image, it cannot
      rely on bdrv_has_zero_init()'s result to carry any meaning.
      
      This is the case for drive-mirror with mode=existing and always for
      blockdev-mirror.
      
      Note that we only have to zero-initialize the target with sync=full,
      because other modes actually do not promise that the target will contain
      the same data as the source after the job -- sync=top only promises to
      copy anything allocated in the top layer, and sync=none will only copy
      new I/O.  (Which is how mirror has always handled it.)
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Message-id: 20190724171239.8764-3-mreitz@redhat.com
      Reviewed-by: NMaxim Levitsky <mlevitsk@redhat.com>
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      cdf3bc93
  7. 17 8月, 2019 9 次提交
  8. 16 8月, 2019 2 次提交
    • M
      sysemu: Split sysemu/runstate.h off sysemu/sysemu.h · 54d31236
      Markus Armbruster 提交于
      sysemu/sysemu.h is a rather unfocused dumping ground for stuff related
      to the system-emulator.  Evidence:
      
      * It's included widely: in my "build everything" tree, changing
        sysemu/sysemu.h still triggers a recompile of some 1100 out of 6600
        objects (not counting tests and objects that don't depend on
        qemu/osdep.h, down from 5400 due to the previous two commits).
      
      * It pulls in more than a dozen additional headers.
      
      Split stuff related to run state management into its own header
      sysemu/runstate.h.
      
      Touching sysemu/sysemu.h now recompiles some 850 objects.  qemu/uuid.h
      also drops from 1100 to 850, and qapi/qapi-types-run-state.h from 4400
      to 4200.  Touching new sysemu/runstate.h recompiles some 500 objects.
      
      Since I'm touching MAINTAINERS to add sysemu/runstate.h anyway, also
      add qemu/main-loop.h.
      Suggested-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20190812052359.30071-30-armbru@redhat.com>
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      [Unbreak OS-X build]
      54d31236
    • M
      Include qemu/main-loop.h less · db725815
      Markus Armbruster 提交于
      In my "build everything" tree, changing qemu/main-loop.h triggers a
      recompile of some 5600 out of 6600 objects (not counting tests and
      objects that don't depend on qemu/osdep.h).  It includes block/aio.h,
      which in turn includes qemu/event_notifier.h, qemu/notify.h,
      qemu/processor.h, qemu/qsp.h, qemu/queue.h, qemu/thread-posix.h,
      qemu/thread.h, qemu/timer.h, and a few more.
      
      Include qemu/main-loop.h only where it's needed.  Touching it now
      recompiles only some 1700 objects.  For block/aio.h and
      qemu/event_notifier.h, these numbers drop from 5600 to 2800.  For the
      others, they shrink only slightly.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20190812052359.30071-21-armbru@redhat.com>
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Tested-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      db725815
  9. 24 6月, 2019 1 次提交
  10. 18 6月, 2019 2 次提交
  11. 14 6月, 2019 2 次提交
  12. 04 6月, 2019 3 次提交
  13. 29 5月, 2019 2 次提交
  14. 19 4月, 2019 1 次提交
  15. 19 3月, 2019 1 次提交
  16. 13 3月, 2019 8 次提交