From: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
To: Vincent Vanlaer <libvirt-e6954efa@volkihar.be>, qemu-devel@nongnu.org
Cc: John Snow <jsnow@redhat.com>, Kevin Wolf <kwolf@redhat.com>,
qemu-block@nongnu.org, Hanna Reitz <hreitz@redhat.com>
Subject: Re: [PATCH v4 0/5] block: allow commit to unmap zero blocks
Date: Mon, 18 Nov 2024 10:57:28 +0300 [thread overview]
Message-ID: <6eaf3d9f-d80f-4a4c-bd4f-853d0b43b46c@yandex-team.ru> (raw)
In-Reply-To: <20241026163010.2865002-1-libvirt-e6954efa@volkihar.be>
On 26.10.24 19:30, Vincent Vanlaer wrote:
> This patch series adds support for zero blocks in non-active commits.
> The first three patches in the series refactor the relevant code, patch
> four makes the actual changes, and the last patch adds a test for the
> new functionality.
>
> ---
>
> Changes since v3:
> - minor reformating based on checkpatch.pl
> - moved tracepoint in commit_iteration before first possible return on
> error
> - renamed the handle_error label in commit_iteration to fail and
> prevented the happy path from passing through this label
> - moved test script to the tests/qemu-iotests/tests folder and named it
> commit-zero-blocks
>
> Changes since v2:
> - moved main loop of commit_run to a separate function and refactored
> the error handling.
> - call blk_co_pwrite_zero even if the size of the zero region does not
> align with the sectors of the base image. This removes the need for
> the CommitMethod enum
>
> Changes since v1:
> - split up the implementation in three separate commits
> - removed accidentally left over includes from testing
>
> Vincent Vanlaer (5):
> block: get type of block allocation in commit_run
> block: move commit_run loop to separate function
> block: refactor error handling of commit_iteration
> block: allow commit to unmap zero blocks
> block: add test non-active commit with zeroed data
>
> block/commit.c | 116 +++++++++++++-----
> tests/qemu-iotests/tests/commit-zero-blocks | 96 +++++++++++++++
> .../qemu-iotests/tests/commit-zero-blocks.out | 54 ++++++++
> 3 files changed, 232 insertions(+), 34 deletions(-)
> create mode 100755 tests/qemu-iotests/tests/commit-zero-blocks
> create mode 100644 tests/qemu-iotests/tests/commit-zero-blocks.out
>
Thanks, applied to my block branch,
with
diff --git a/block/commit.c b/block/commit.c
index 5c24c8b80a..bfd969b13f 100644
--- a/block/commit.c
+++ b/block/commit.c
@@ -172,7 +172,8 @@ static int commit_iteration(CommitBlockJob *s, int64_t offset,
*requested_bytes = bytes;
return 0;
-fail:;
+
+fail:
BlockErrorAction action = block_job_error_action(&s->common, s->on_error,
error_in_source, -ret);
if (action == BLOCK_ERROR_ACTION_REPORT) {
change to patch 3.
Unfortunately, I've missed soft-freeze on 05.11. Will send PR when 10.0 development phase opens.
--
Best regards,
Vladimir
prev parent reply other threads:[~2024-11-18 7:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-26 16:30 [PATCH v4 0/5] block: allow commit to unmap zero blocks Vincent Vanlaer
2024-10-26 16:30 ` [PATCH v4 1/5] block: get type of block allocation in commit_run Vincent Vanlaer
2024-10-26 16:30 ` [PATCH v4 2/5] block: move commit_run loop to separate function Vincent Vanlaer
2024-10-26 16:30 ` [PATCH v4 3/5] block: refactor error handling of commit_iteration Vincent Vanlaer
2024-11-18 7:37 ` Vladimir Sementsov-Ogievskiy
2024-11-18 7:47 ` Vladimir Sementsov-Ogievskiy
2024-10-26 16:30 ` [PATCH v4 4/5] block: allow commit to unmap zero blocks Vincent Vanlaer
2024-10-26 16:30 ` [PATCH v4 5/5] block: add test non-active commit with zeroed data Vincent Vanlaer
2024-11-18 7:57 ` Vladimir Sementsov-Ogievskiy [this message]
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=6eaf3d9f-d80f-4a4c-bd4f-853d0b43b46c@yandex-team.ru \
--to=vsementsov@yandex-team.ru \
--cc=hreitz@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=libvirt-e6954efa@volkihar.be \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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 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).