qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] mirror: allow switching from background to active mode
@ 2023-02-24 14:48 Fiona Ebner
  2023-02-24 14:48 ` [PATCH 1/9] blockjob: introduce block-job-change QMP command Fiona Ebner
                   ` (9 more replies)
  0 siblings, 10 replies; 23+ messages in thread
From: Fiona Ebner @ 2023-02-24 14:48 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, armbru, eblake, hreitz, kwolf, vsementsov, jsnow, den,
	t.lamprecht, alexander.ivanov

With active mode, the guest write speed is limited by the synchronous
writes to the mirror target. For this reason, management applications
might want to start out in background mode and only switch to active
mode later, when certain conditions are met. This series adds a
block-job-change QMP command to acheive that, as well as
job-type-specific information when querying block jobs, which
can be used to decide when the switch should happen.

For now, only the direction background -> active is supported.

The information added upon querying is whether the target is actively
synced, the total data sent, and the remaining dirty bytes.

Initially, I tried to go for a more general 'job-change' command, but
I couldn't figure out a way to avoid mutual inclusion between
block-core.json and job.json.

Fiona Ebner (9):
  blockjob: introduce block-job-change QMP command
  block/mirror: set actively_synced even after the job is ready
  mirror: implement mirror_change method
  qapi/block-core: use JobType for BlockJobInfo's type
  qapi/block-core: turn BlockJobInfo into a union
  blockjob: query driver-specific info via a new 'query' driver method
  mirror: return mirror-specific information upon query
  mirror: return the remaining dirty bytes upon query
  mirror: return the total number of bytes sent upon query

 block/mirror.c                 | 61 ++++++++++++++++++++++++++++++--
 block/monitor/block-hmp-cmds.c |  4 +--
 blockdev.c                     | 14 ++++++++
 blockjob.c                     | 26 +++++++++++++-
 include/block/blockjob.h       | 11 ++++++
 include/block/blockjob_int.h   | 10 ++++++
 job.c                          |  1 +
 qapi/block-core.json           | 63 ++++++++++++++++++++++++++++++++--
 qapi/job.json                  |  4 ++-
 9 files changed, 184 insertions(+), 10 deletions(-)

-- 
2.30.2




^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2023-03-03  7:48 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-24 14:48 [PATCH 0/9] mirror: allow switching from background to active mode Fiona Ebner
2023-02-24 14:48 ` [PATCH 1/9] blockjob: introduce block-job-change QMP command Fiona Ebner
2023-02-24 14:48 ` [PATCH 2/9] block/mirror: set actively_synced even after the job is ready Fiona Ebner
2023-03-01 14:34   ` Vladimir Sementsov-Ogievskiy
2023-02-24 14:48 ` [PATCH 3/9] mirror: implement mirror_change method Fiona Ebner
2023-03-01 15:18   ` Vladimir Sementsov-Ogievskiy
2023-03-02 10:00     ` Fiona Ebner
2023-02-24 14:48 ` [PATCH 4/9] qapi/block-core: use JobType for BlockJobInfo's type Fiona Ebner
2023-03-01 16:27   ` Vladimir Sementsov-Ogievskiy
2023-02-24 14:48 ` [PATCH 5/9] qapi/block-core: turn BlockJobInfo into a union Fiona Ebner
2023-03-01 16:28   ` Vladimir Sementsov-Ogievskiy
2023-02-24 14:48 ` [PATCH 6/9] blockjob: query driver-specific info via a new 'query' driver method Fiona Ebner
2023-02-24 14:48 ` [PATCH 7/9] mirror: return mirror-specific information upon query Fiona Ebner
2023-02-24 14:48 ` [PATCH 8/9] mirror: return the remaining dirty bytes " Fiona Ebner
2023-03-01 16:31   ` Vladimir Sementsov-Ogievskiy
2023-03-02 10:00     ` Fiona Ebner
2023-03-02 10:13       ` Vladimir Sementsov-Ogievskiy
2023-03-02 12:34         ` Fiona Ebner
2023-03-02 16:31           ` Vladimir Sementsov-Ogievskiy
2023-03-03  7:47             ` Fiona Ebner
2023-02-24 14:48 ` [PATCH 9/9] mirror: return the total number of bytes sent " Fiona Ebner
2023-03-01 14:34 ` [PATCH 0/9] mirror: allow switching from background to active mode Vladimir Sementsov-Ogievskiy
2023-03-01 14:49   ` Fiona Ebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).