qemu-e2k/include/qemu
Hanna Reitz 73895f3838 jobs: Give Job.force_cancel more meaning
We largely have two cancel modes for jobs:

First, there is actual cancelling.  The job is terminated as soon as
possible, without trying to reach a consistent result.

Second, we have mirror in the READY state.  Technically, the job is not
really cancelled, but it just is a different completion mode.  The job
can still run for an indefinite amount of time while it tries to reach a
consistent result.

We want to be able to clearly distinguish which cancel mode a job is in
(when it has been cancelled).  We can use Job.force_cancel for this, but
right now it only reflects cancel requests from the user with
force=true, but clearly, jobs that do not even distinguish between
force=false and force=true are effectively always force-cancelled.

So this patch has Job.force_cancel signify whether the job will
terminate as soon as possible (force_cancel=true) or whether it will
effectively remain running despite being "cancelled"
(force_cancel=false).

To this end, we let jobs that provide JobDriver.cancel() tell the
generic job code whether they will terminate as soon as possible or not,
and for jobs that do not provide that method we assume they will.

Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20211006151940.214590-7-hreitz@redhat.com>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
2021-10-07 10:42:34 +02:00
..
accel.h accel-cpu: make cpu_realizefn return a bool 2021-05-10 15:41:50 -04:00
atomic.h qemu/atomic: Add aligned_{int64,uint64}_t types 2021-07-21 07:45:38 -10:00
atomic128.h docs: fix references to docs/devel/atomics.rst 2021-06-02 06:51:09 +02:00
base64.h nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
bcd.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
bitmap.h bitmap: Add bitmap_copy_with_{src|dst}_offset() 2019-07-15 15:39:02 +02:00
bitops.h bitops.h: revert db1ffc32dd ("qemu/bitops.h: add bitrev8 implementation") 2021-07-26 06:56:41 -10:00
bswap.h include/qemu/bswap.h: Handle being included outside extern "C" block 2021-05-10 17:21:54 +01:00
buffer.h nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
cacheflush.h util: Enhance flush_icache_range with separate data pointer 2021-01-07 05:09:41 -10:00
co-shared-resource.h co-shared-resource: protect with a mutex 2021-06-25 14:24:24 +03:00
compiler.h configure: Remove probe for _Static_assert 2021-06-16 15:03:26 +02:00
config-file.h qemu-config: parse configuration files to a QDict 2021-06-04 13:50:01 +02:00
coroutine.h co-queue: drop extra coroutine_fn marks 2021-06-18 10:59:52 -05:00
coroutine_int.h coroutine: support SafeStack in ucontext backend 2020-06-23 15:46:05 +01:00
cpuid.h util: add util function buffer_zero_avx512() 2020-03-16 23:02:21 +01:00
crc-ccitt.h util: Add CRC16 (CCITT) calculation routines 2021-01-24 20:10:54 +01:00
crc32c.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
ctype.h qemu-common: Move qemu_isalnum() etc. to qemu/ctype.h 2019-06-11 20:22:09 +02:00
cutils.h cutils: replace strdup with g_strdup 2020-11-03 09:42:52 -05:00
datadir.h vl: extract softmmu/datadir.c 2020-12-10 12:15:18 -05:00
dbus.h util: add dbus helper unit 2020-01-06 18:41:32 +04:00
drm.h Clean up ill-advised or unusual header guards 2019-05-13 08:58:55 +02:00
envlist.h misc: move include files to include/qemu/ 2012-12-19 08:32:39 +01:00
error-report.h error: rename error_with_timestamp to message_with_timestamp 2021-02-01 10:50:55 +00:00
event_notifier.h event_notifier: handle initialization failure better 2021-02-08 14:43:55 +01:00
fifo8.h utils/fifo8: add VMSTATE_FIFO8_TEST macro 2021-02-07 20:38:34 +00:00
fifo32.h hw: Clean up includes 2016-06-07 18:19:23 +03:00
filemonitor.h nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
futex.h futex: add missing header guards 2017-10-16 20:57:13 +03:00
guest-random.h util: Add qemu_guest_getrandom and associated routines 2019-05-22 12:38:54 -04:00
hbitmap.h block/dirty-bitmap: improve _next_dirty_area API 2020-03-18 14:03:46 -04:00
help_option.h keyval: Parse help options 2020-10-15 16:06:27 +02:00
host-utils.h host-utils: introduce uabs64() 2021-09-29 19:37:38 +10:00
id.h net: Use id_generate() in the network subsystem, too 2021-03-09 21:47:45 +01:00
int128.h include/qemu/int128.h: introduce bswap128s 2021-08-27 12:43:11 +10:00
iov.h util/iov: make qemu_iovec_init_extended() honest 2021-02-03 08:00:33 -06:00
iova-tree.h util: remove redundant include of glib.h and add osdep.h 2018-06-29 12:22:28 +01:00
jhash.h Clean up ill-advised or unusual header guards 2019-05-13 08:58:55 +02:00
job.h jobs: Give Job.force_cancel more meaning 2021-10-07 10:42:34 +02:00
lockable.h include/qemu/lockable: Use _Generic instead of QEMU_GENERIC 2021-06-16 15:03:26 +02:00
log-for-trace.h log-for-trace.h: Split out parts of log.h used by trace.h 2018-03-12 11:10:20 +00:00
log.h qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
main-loop.h util/async: add a human-readable name to BHs for debugging 2021-07-05 11:40:32 +01:00
memfd.h linux-user: add memfd_create 2019-09-11 08:46:17 +02:00
mmap-alloc.h util/mmap-alloc: Pass flags instead of separate bools to qemu_ram_mmap() 2021-06-15 20:27:38 +02:00
module.h modules: check arch and block load on mismatch 2021-07-09 18:20:27 +02:00
notify.h xen / notify: introduce a new XenWatchList abstraction 2019-09-24 12:18:47 +01:00
nvdimm-utils.h Clean up includes 2020-12-10 17:16:44 +01:00
option.h qemu-option: remove now-dead code 2021-07-06 08:33:51 +02:00
option_int.h qemu/queue.h: simplify reverse access to QTAILQ 2019-01-11 15:46:55 +01:00
osdep.h osdep: fix HAVE_BROKEN_SIZE_MAX case 2021-07-09 18:19:00 +02:00
path.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
plugin-memory.h plugins: fix-up handling of internal hostaddr for 32 bit 2021-07-14 14:33:53 +01:00
plugin.h tcg/plugins: implement a qemu_plugin_user_exit helper 2021-07-23 17:22:16 +01:00
pmem.h Clean up decorations and whitespace around header guards 2019-05-13 08:58:55 +02:00
processor.h Drop remaining bits of ia64 host support 2018-02-05 18:09:45 +01:00
progress_meter.h progressmeter: protect with a mutex 2021-06-25 14:24:24 +03:00
qdist.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
qemu-options.h remove qemu-options* from root directory 2021-05-26 14:49:46 +02:00
qemu-plugin.h plugins/api: added a boolean parsing plugin api 2021-09-02 11:29:34 +01:00
qemu-print.h qemu-print: New qemu_fprintf(), qemu_vfprintf() 2019-04-18 22:18:59 +02:00
qht.h qht: constify qht_statistics_init 2018-09-26 08:55:54 -07:00
qsp.h qsp: Simplify how qsp_report() prints 2019-04-18 22:18:59 +02:00
queue.h qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
range.h Include qemu/queue.h slightly less 2019-08-16 13:31:52 +02:00
ratelimit.h ratelimit: treat zero speed as unlimited 2021-06-25 14:22:21 +03:00
rcu.h qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
rcu_queue.h qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
readline.h readline: add a free function 2018-01-16 14:54:50 +01:00
selfmap.h Remove leading underscores from QEMU defines 2021-06-21 05:49:01 +02:00
seqlock.h qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
sockets.h qemu-sockets: introduce socket_address_parse_named_fd() 2021-06-18 10:59:53 -05:00
stats64.h qemu/atomic: Add aligned_{int64,uint64}_t types 2021-07-21 07:45:38 -10:00
sys_membarrier.h Normalize header guard symbol definition. 2019-05-13 08:58:55 +02:00
systemd.h Normalize header guard symbol definition. 2019-05-13 08:58:55 +02:00
thread-posix.h util: Use unique type for QemuRecMutex in thread-posix.h 2021-06-16 15:03:26 +02:00
thread-win32.h util: Use real functions for thread-posix QemuRecMutex 2021-06-16 15:03:26 +02:00
thread.h util: Pass file+line to qemu_rec_mutex_unlock_impl 2021-06-16 15:03:26 +02:00
throttle-options.h block: add throttle block filter driver 2017-09-06 10:12:02 +02:00
throttle.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
timed-average.h include: Clean up includes 2016-02-23 12:43:05 +00:00
timer.h spapr: rollback 'unplug timeout' for CPU hotunplugs 2021-04-12 12:27:14 +10:00
transactions.h util: add transactions.c 2021-04-30 12:27:47 +02:00
tsan.h include/qemu: Added tsan.h for annotations. 2020-06-16 14:49:05 +01:00
typedefs.h exec: Move TranslationBlock typedef to qemu/typedefs.h 2021-02-18 08:19:08 +00:00
unicode.h json: Reject invalid UTF-8 sequences 2018-08-24 20:26:37 +02:00
units.h block: Eliminate the S_1KiB, S_2KiB, ... macros 2019-02-01 13:46:45 +01:00
uri.h Remove unused function declarations 2016-09-15 15:32:22 +03:00
userfaultfd.h migration: introduce UFFD-WP low-level interface helpers 2021-02-08 11:19:51 +00:00
uuid.h acpi: nvdimm: change NVDIMM_UUID_LE to a common macro 2020-05-14 15:03:08 +01:00
vfio-helpers.h util/vfio-helpers: Pass Error handle to qemu_vfio_dma_map() 2021-09-07 09:08:24 +01:00
vhost-user-server.h libvhost-user: make it a meson subproject 2020-12-08 13:48:58 -05:00
win_dump_defs.h dump: move Windows dump structures definitions 2018-10-02 19:09:12 +02:00
xattr.h include: Fix typos found by codespell 2017-01-24 23:26:52 +03:00
xxhash.h target/arm: Implement an IMPDEF pauth algorithm 2021-01-19 14:38:51 +00:00
yank.h yank: Remove dependency on qiochannel 2021-04-01 15:27:44 +04:00