qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/5] block: allow commit to unmap zero blocks
@ 2024-10-26 16:30 Vincent Vanlaer
  2024-10-26 16:30 ` [PATCH v4 1/5] block: get type of block allocation in commit_run Vincent Vanlaer
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Vincent Vanlaer @ 2024-10-26 16:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Vladimir Sementsov-Ogievskiy, Kevin Wolf, qemu-block,
	Hanna Reitz, Vincent Vanlaer

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

-- 
2.44.1



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

end of thread, other threads:[~2024-11-18  7:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH v4 0/5] block: allow commit to unmap zero blocks Vladimir Sementsov-Ogievskiy

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).