[Top][All Lists]

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

Re: [PATCH RFC 0/3] mirror: rework soft-cancelling READY mirror

From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH RFC 0/3] mirror: rework soft-cancelling READY mirror
Date: Tue, 27 Jul 2021 19:56:38 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0

27.07.2021 19:47, Vladimir Sementsov-Ogievskiy wrote:
Hi all!

That's an alternative to (part of) Max's
"[PATCH for-6.1? v2 0/7] mirror: Handle errors after READY cancel"
and shows' my idea of handling soft-cancelling READY mirror case
directly in qmp_block_job_cancel. And cleanup all other job cancelling

That's untested draft, don't take it to heart :)

Side idea:

Instead of this all we can do the following:

1. Add new interface as alternative to soft-cancelling READY mirror.

It may be argument to job-complete qmp command, or some separate command to 
change job parameters, or just an option for blockdev-mirror command (may be 
our users actually know what they want when they start the job).

2. Deprecate block-job-cancel command (with recommendation to use job-cancel 
and new interface [1] instead)

3. Wait for 3 releases and apply patch 3, improved by dropping block-job-cancel 
at all.

This way, deprecated interface remains buggy until dropped, but that's not bad. 
It's good actually :)

Vladimir Sementsov-Ogievskiy (3):
   job: add job_complete_ex with do_graph_change argument
   job: use complete(do_graph_change=false) to handle soft cancel
   job: drop force argument of *job*cancel

  include/qemu/job.h               | 19 ++++++++----------
  block/backup.c                   |  2 +-
  block/mirror.c                   | 33 +++++++++++++++++---------------
  blockdev.c                       | 13 +++++++++++--
  job-qmp.c                        |  2 +-
  job.c                            | 27 ++++++++++++++------------
  tests/unit/test-bdrv-drain.c     |  2 +-
  tests/unit/test-block-iothread.c |  2 +-
  tests/unit/test-blockjob-txn.c   |  8 ++++----
  tests/unit/test-blockjob.c       |  4 ++--
  10 files changed, 62 insertions(+), 50 deletions(-)

Best regards,

reply via email to

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