1. 28 4月, 2015 7 次提交
  2. 19 3月, 2015 1 次提交
  3. 17 3月, 2015 1 次提交
  4. 26 2月, 2015 3 次提交
  5. 18 2月, 2015 2 次提交
    • M
      hmp: Name HMP command handler functions hmp_COMMAND() · 3e5a50d6
      Markus Armbruster 提交于
      Some are called do_COMMAND() (old ones, usually), some hmp_COMMAND(),
      and sometimes COMMAND pointlessly differs in spelling.
      
      Normalize to hmp_COMMAND(), where COMMAND is exactly the command name
      with '-' replaced by '_'.
      
      Exceptions:
      
      * do_device_add() and client_migrate_info() *not* renamed to
        hmp_device_add(), hmp_client_migrate_info(), because they're also
        QMP handlers.  They still need to be converted to QAPI.
      
      * do_memory_dump(), do_physical_memory_dump(), do_ioport_read(),
        do_ioport_write() renamed do hmp_* instead of hmp_x(), hmp_xp(),
        hmp_i(), hmp_o(), because those names are too cryptic for my taste.
      
      * do_info_help() renamed to hmp_info_help() instead of hmp_info(),
        because it only covers help.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      3e5a50d6
    • M
      error: Use error_report_err() where appropriate · 565f65d2
      Markus Armbruster 提交于
      Coccinelle semantic patch:
      
          @@
          expression E;
          @@
          -    error_report("%s", error_get_pretty(E));
          -    error_free(E);
          +    error_report_err(E);
          @@
          expression E, S;
          @@
          -    error_report("%s", error_get_pretty(E));
          +    error_report_err(E);
          (
               exit(S);
          |
               abort();
          )
      
      Trivial manual touch-ups in block/sheepdog.c.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      565f65d2
  6. 16 2月, 2015 1 次提交
  7. 07 2月, 2015 3 次提交
  8. 13 1月, 2015 3 次提交
  9. 10 12月, 2014 8 次提交
  10. 03 11月, 2014 8 次提交
    • S
      block: let commit blockjob run in BDS AioContext · 9e85cd5c
      Stefan Hajnoczi 提交于
      The commit block job must run in the BlockDriverState AioContext so that
      it works with dataplane.
      
      Acquire the AioContext in blockdev.c so starting the block job is safe.
      One detail here is that the bdrv_drain_all() must be moved inside the
      aio_context_acquire() region so requests cannot sneak in between the
      drain and acquire.
      
      The completion code in block/commit.c must perform backing chain
      manipulation and bdrv_reopen() from the main loop.  Use
      block_job_defer_to_main_loop() to achieve that.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Message-id: 1413889440-32577-11-git-send-email-stefanha@redhat.com
      9e85cd5c
    • S
      block: let mirror blockjob run in BDS AioContext · 5a7e7a0b
      Stefan Hajnoczi 提交于
      The mirror block job must run in the BlockDriverState AioContext so that
      it works with dataplane.
      
      Acquire the AioContext in blockdev.c so starting the block job is safe.
      
      Note that to_replace is treated separately from other BlockDriverStates
      in that it does not need to be in the same AioContext.  Explicitly
      acquire/release to_replace's AioContext when accessing it.
      
      The completion code in block/mirror.c must perform BDS graph
      manipulation and bdrv_reopen() from the main loop.  Use
      block_job_defer_to_main_loop() to achieve that.
      
      The bdrv_drain_all() call is not allowed outside the main loop since it
      could lead to lock ordering problems.  Use bdrv_drain(bs) instead
      because we have acquired the AioContext so nothing else can sneak in
      I/O.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Message-id: 1413889440-32577-10-git-send-email-stefanha@redhat.com
      5a7e7a0b
    • S
      block: let stream blockjob run in BDS AioContext · f3e69beb
      Stefan Hajnoczi 提交于
      The stream block job must run in the BlockDriverState AioContext so that
      it works with dataplane.
      
      The basics of acquiring the AioContext are easy in blockdev.c.
      
      The tricky part is the completion code which drops part of the backing
      file chain.  This must be done in the main loop where bdrv_unref() and
      bdrv_close() are safe to call.  Use block_job_defer_to_main_loop() to
      achieve that.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Message-id: 1413889440-32577-9-git-send-email-stefanha@redhat.com
      f3e69beb
    • S
      block: let backup blockjob run in BDS AioContext · 761731b1
      Stefan Hajnoczi 提交于
      The backup block job must run in the BlockDriverState AioContext so that
      it works with dataplane.
      
      The basics of acquiring the AioContext are easy in blockdev.c.
      
      The completion code in block/backup.c must call bdrv_unref() from the
      main loop.  Use block_job_defer_to_main_loop() to achieve that.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Message-id: 1413889440-32577-8-git-send-email-stefanha@redhat.com
      761731b1
    • S
      blockdev: add note that block_job_cb() must be thread-safe · 723c5d93
      Stefan Hajnoczi 提交于
      This function is correct but we should document the constraint that
      everything must be thread-safe.
      
      Emitting QMP events and scheduling BHs are both thread-safe so nothing
      needs to be done here.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Message-id: 1413889440-32577-5-git-send-email-stefanha@redhat.com
      723c5d93
    • S
      blockdev: acquire AioContext in blockdev_mark_auto_del() · 91fddb0d
      Stefan Hajnoczi 提交于
      When an emulated storage controller is unrealized it will call
      blockdev_mark_auto_del().  This will cancel any running block job (and
      that eventually releases its reference to the BDS so it can be freed).
      
      Since the block job may be executing in another AioContext we must
      acquire/release to ensure thread safety.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Message-id: 1413889440-32577-4-git-send-email-stefanha@redhat.com
      91fddb0d
    • S
      blockdev: acquire AioContext in do_qmp_query_block_jobs_one() · 69691e72
      Stefan Hajnoczi 提交于
      Make sure that query-block-jobs acquires the BlockDriverState
      AioContext so that the blockjob isn't running in another thread while we
      access its state.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Message-id: 1413889440-32577-3-git-send-email-stefanha@redhat.com
      69691e72
    • S
      block: acquire AioContext in generic blockjob QMP commands · 3d948cdf
      Stefan Hajnoczi 提交于
      block-job-set-speed, block-job-cancel, block-job-pause,
      block-job-resume, and block-job-complete must acquire the
      BlockDriverState AioContext so that it is safe to access bs.
      
      At the moment bs->job is always NULL when dataplane is active because op
      blockers prevent blockjobs from starting.  Once the rest of the blockjob
      API has been made aware of AioContext we can drop the op blocker.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Message-id: 1413889440-32577-2-git-send-email-stefanha@redhat.com
      3d948cdf
  11. 20 10月, 2014 3 次提交