qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC v4 08/21] blockjobs: add ABORTING state


From: Eric Blake
Subject: Re: [Qemu-devel] [RFC v4 08/21] blockjobs: add ABORTING state
Date: Tue, 27 Feb 2018 13:34:58 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 02/23/2018 05:51 PM, John Snow wrote:
Add a new state ABORTING.

This makes transitions from normative states to error states explicit
in the STM, and serves as a disambiguation for which states may complete
normally when normal end-states (CONCLUDED) are added in future commits.

Notably, Paused/Standby jobs do not transition directly to aborting,
as they must wake up first and cooperate in their cancellation.

Transitions:
Running -> Aborting: can be cancelled or encounter an error
Ready   -> Aborting: can be cancelled or encounter an error

Verbs:
None. The job must finish cleaning itself up and report its final status.

              +---------+
              |UNDEFINED|
              +--+------+
                 |
              +--v----+
              |CREATED|
              +--+----+
                 |
              +--v----+     +------+
    +---------+RUNNING<----->PAUSED|
    |         +--+----+     +------+
    |            |
    |         +--v--+       +-------+
    +---------+READY<------->STANDBY|
    |         +-----+       +-------+
    |
+--v-----+
|ABORTING|
+--------+

Signed-off-by: John Snow <address@hidden>
---
  blockjob.c           | 31 ++++++++++++++++++-------------
  qapi/block-core.json |  7 ++++++-
  2 files changed, 24 insertions(+), 14 deletions(-)


+++ b/qapi/block-core.json
@@ -996,10 +996,15 @@
  # @standby: The job is ready, but paused. This is nearly identical to @paused.
  #           The job may return to @ready or otherwise be canceled.
  #
+# @aborting: The job is in the process of being aborted, and will finish with
+#            an error. The job will afterwards report that it is @concluded.

@concluded isn't defined yet, but I'm okay with the minor future reference, as it's less churn to get to the description that works at the end of the series.

Reviewed-by: Eric Blake <address@hidden>

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]