mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
blockjobs: add PENDING status and event
For jobs utilizing the new manual workflow, we intend to prohibit them from modifying the block graph until the management layer provides an explicit ACK via block-job-finalize to move the process forward. To distinguish this runstate from "ready" or "waiting," we add a new "pending" event and status. For now, the transition from PENDING to CONCLUDED/ABORTING is automatic, but a future commit will add the explicit block-job-finalize step. Transitions: Waiting -> Pending: Normal transition. Pending -> Concluded: Normal transition. Pending -> Aborting: Late transactional failures and cancellations. Removed Transitions: Waiting -> Concluded: Jobs must go to PENDING first. Verbs: Cancel: Can be applied to a pending job. +---------+ |UNDEFINED| +--+------+ | +--v----+ +---------+CREATED+-----------------+ | +--+----+ | | | | | +--+----+ +------+ | +---------+RUNNING<----->PAUSED| | | +--+-+--+ +------+ | | | | | | | +------------------+ | | | | | | +--v--+ +-------+ | | +---------+READY<------->STANDBY| | | | +--+--+ +-------+ | | | | | | | +--v----+ | | +---------+WAITING<---------------+ | | +--+----+ | | | | | +--v----+ | +---------+PENDING| | | +--+----+ | | | | +--v-----+ +--v------+ | |ABORTING+--->CONCLUDED| | +--------+ +--+------+ | | | +--v-+ | |NULL<--------------------+ +----+ Signed-off-by: John Snow <jsnow@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
e8af5686ff
commit
5f241594c4
3 changed files with 78 additions and 25 deletions
|
@ -1005,6 +1005,11 @@
|
|||
# to the waiting state. This status will likely not be visible for
|
||||
# the last job in a transaction.
|
||||
#
|
||||
# @pending: The job has finished its work, but has finalization steps that it
|
||||
# needs to make prior to completing. These changes may require
|
||||
# manual intervention by the management process if manual was set
|
||||
# to true. These changes may still fail.
|
||||
#
|
||||
# @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.
|
||||
# This status may not be visible to the management process.
|
||||
|
@ -1019,7 +1024,7 @@
|
|||
##
|
||||
{ 'enum': 'BlockJobStatus',
|
||||
'data': ['undefined', 'created', 'running', 'paused', 'ready', 'standby',
|
||||
'waiting', 'aborting', 'concluded', 'null' ] }
|
||||
'waiting', 'pending', 'aborting', 'concluded', 'null' ] }
|
||||
|
||||
##
|
||||
# @BlockJobInfo:
|
||||
|
@ -4265,6 +4270,30 @@
|
|||
'offset': 'int',
|
||||
'speed' : 'int' } }
|
||||
|
||||
##
|
||||
# @BLOCK_JOB_PENDING:
|
||||
#
|
||||
# Emitted when a block job is awaiting explicit authorization to finalize graph
|
||||
# changes via @block-job-finalize. If this job is part of a transaction, it will
|
||||
# not emit this event until the transaction has converged first.
|
||||
#
|
||||
# @type: job type
|
||||
#
|
||||
# @id: The job identifier.
|
||||
#
|
||||
# Since: 2.12
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# <- { "event": "BLOCK_JOB_WAITING",
|
||||
# "data": { "device": "drive0", "type": "mirror" },
|
||||
# "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
|
||||
#
|
||||
##
|
||||
{ 'event': 'BLOCK_JOB_PENDING',
|
||||
'data': { 'type' : 'BlockJobType',
|
||||
'id' : 'str' } }
|
||||
|
||||
##
|
||||
# @PreallocMode:
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue