All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Cc: qemu-block@nongnu.org,  qemu-devel@nongnu.org,
	 eblake@redhat.com, xiechanglong.d@gmail.com,
	 wencongyang2@huawei.com,  hreitz@redhat.com, kwolf@redhat.com,
	 jsnow@redhat.com,  f.ebner@proxmox.com
Subject: Re: [PATCH v4 4/5] qapi: blockdev-backup: add discard-source parameter
Date: Wed, 13 Mar 2024 17:08:48 +0100	[thread overview]
Message-ID: <87o7bicdwv.fsf@pond.sub.org> (raw)
In-Reply-To: <20240313152822.626493-5-vsementsov@yandex-team.ru> (Vladimir Sementsov-Ogievskiy's message of "Wed, 13 Mar 2024 18:28:21 +0300")

Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> writes:

> Add a parameter that enables discard-after-copy. That is mostly useful
> in "push backup with fleecing" scheme, when source is snapshot-access
> format driver node, based on copy-before-write filter snapshot-access
> API:
>
> [guest]      [snapshot-access] ~~ blockdev-backup ~~> [backup target]
>    |            |
>    | root       | file
>    v            v
> [copy-before-write]
>    |             |
>    | file        | target
>    v             v
> [active disk]   [temp.img]
>
> In this case discard-after-copy does two things:
>
>  - discard data in temp.img to save disk space
>  - avoid further copy-before-write operation in discarded area
>
> Note that we have to declare WRITE permission on source in
> copy-before-write filter, for discard to work. Still we can't take it
> unconditionally, as it will break normal backup from RO source. So, we
> have to add a parameter and pass it thorough bdrv_open flags.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
> Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
> Tested-by: Fiona Ebner <f.ebner@proxmox.com>

[...]

> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index 1874f880a8..2ef52ae9a7 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -1610,6 +1610,9 @@
>  #     node specified by @drive.  If this option is not given, a node
>  #     name is autogenerated.  (Since: 4.2)
>  #
> +# @discard-source: Discard blocks on source which are already copied

"have been copied"?

> +#     to the target.  (Since 9.1)
> +#
>  # @x-perf: Performance options.  (Since 6.0)
>  #
>  # Features:
> @@ -1631,6 +1634,7 @@
>              '*on-target-error': 'BlockdevOnError',
>              '*auto-finalize': 'bool', '*auto-dismiss': 'bool',
>              '*filter-node-name': 'str',
> +            '*discard-source': 'bool',
>              '*x-perf': { 'type': 'BackupPerf',
>                           'features': [ 'unstable' ] } } }

QAPI schema
Acked-by: Markus Armbruster <armbru@redhat.com>



  reply	other threads:[~2024-03-13 16:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-13 15:28 [PATCH v4 0/5] backup: discard-source parameter Vladimir Sementsov-Ogievskiy
2024-03-13 15:28 ` [PATCH v4 1/5] block/copy-before-write: fix permission Vladimir Sementsov-Ogievskiy
2024-03-13 15:28 ` [PATCH v4 2/5] block/copy-before-write: support unligned snapshot-discard Vladimir Sementsov-Ogievskiy
2024-03-13 15:28 ` [PATCH v4 3/5] block/copy-before-write: create block_copy bitmap in filter node Vladimir Sementsov-Ogievskiy
2024-03-13 15:28 ` [PATCH v4 4/5] qapi: blockdev-backup: add discard-source parameter Vladimir Sementsov-Ogievskiy
2024-03-13 16:08   ` Markus Armbruster [this message]
2024-03-14 13:44     ` Vladimir Sementsov-Ogievskiy
2024-03-13 15:28 ` [PATCH v4 5/5] iotests: add backup-discard-source Vladimir Sementsov-Ogievskiy
2024-06-11 17:49   ` Kevin Wolf
2024-06-12 19:21     ` Vladimir Sementsov-Ogievskiy
2024-06-13  8:02       ` Kevin Wolf
2024-06-20 14:15         ` Vladimir Sementsov-Ogievskiy
2024-04-05 13:46 ` [PATCH v4 0/5] backup: discard-source parameter Vladimir Sementsov-Ogievskiy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o7bicdwv.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=f.ebner@proxmox.com \
    --cc=hreitz@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@yandex-team.ru \
    --cc=wencongyang2@huawei.com \
    --cc=xiechanglong.d@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.