qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH v3 09/10] block: drive_backup transaction callba


From: Max Reitz
Subject: Re: [Qemu-block] [PATCH v3 09/10] block: drive_backup transaction callback support
Date: Thu, 23 Apr 2015 17:46:02 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

On 23.04.2015 02:04, John Snow wrote:
This patch actually implements the transactional callback system
for the drive_backup action.

(1) We manually pick up a reference to the bitmap if present to allow
     its cleanup to be delayed until after all drive_backup jobs launched
     by the transaction have fully completed.

(2) We create a functional closure that envelops the original drive_backup
     callback, to be able to intercept the completion status and return code
     for the job.

(3) We add the drive_backup_cb method for the drive_backup action, which
     unpacks the completion information and invokes the final cleanup.

(4) backup_transaction_complete will perform the final cleanup on the
     backup job.

(5) In the case of transaction cancellation, drive_backup_cb is still
     responsible for cleaning up the mess we may have already made.

Signed-off-by: John Snow <address@hidden>
---
  block/backup.c            |  9 ++++++++
  blockdev.c                | 53 ++++++++++++++++++++++++++++++++++++++++++++---
  include/block/block_int.h |  8 +++++++
  3 files changed, 67 insertions(+), 3 deletions(-)

Reviewed-by: Max Reitz <address@hidden>



reply via email to

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