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
Signed-off-by: Vincent Vanlaer
Tested-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
tests/qemu-iotests/tests/commit-zero-blocks | 96 +++
.../qemu-iotests/tests/commit-zero-blocks.out | 54 +++
2 files changed, 150 insertions
bdrv_co_common_block_status_above not only returns whether the block is
allocated, but also if it contains zeroes.
Signed-off-by: Vincent Vanlaer
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
block/commit.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/block
Non-active block commits do not discard blocks only containing zeros,
causing images to lose sparseness after the commit. This commit fixes
that by writing zero blocks using blk_co_pwrite_zeroes rather than
writing them out as any other arbitrary data.
Signed-off-by: Vincent Vanlaer
Reviewed-by
Signed-off-by: Vincent Vanlaer
---
block/commit.c | 61 --
1 file changed, 34 insertions(+), 27 deletions(-)
diff --git a/block/commit.c b/block/commit.c
index 078e54f51f..5c24c8b80a 100644
--- a/block/commit.c
+++ b/block/commit.c
@@ -129,51
Signed-off-by: Vincent Vanlaer
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
block/commit.c | 89 +-
1 file changed, 52 insertions(+), 37 deletions(-)
diff --git a/block/commit.c b/block/commit.c
index 8dee25b313..078e54f51f 100644
--- a/block
Non-active block commits do not discard blocks only containing zeros,
causing images to lose sparseness after the commit. This commit fixes
that by writing zero blocks using blk_co_pwrite_zeroes rather than
writing them out as any other arbitrary data.
Signed-off-by: Vincent Vanlaer
---
block
Signed-off-by: Vincent Vanlaer
---
block/commit.c | 85 --
1 file changed, 48 insertions(+), 37 deletions(-)
diff --git a/block/commit.c b/block/commit.c
index 8dee25b313..9eedd1fa47 100644
--- a/block/commit.c
+++ b/block/commit.c
@@ -128,6
bdrv_co_common_block_status_above not only returns whether the block is
allocated, but also if it contains zeroes.
Signed-off-by: Vincent Vanlaer
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
block/commit.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/block
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
Signed-off-by: Vincent Vanlaer
---
tests/qemu-iotests/315 | 95 ++
tests/qemu-iotests/315.out | 54 ++
2 files changed, 149 insertions(+)
create mode 100755 tests/qemu-iotests/315
create mode 100644 tests/qemu-iotests/315.out
diff
Signed-off-by: Vincent Vanlaer
---
block/commit.c | 37 ++---
1 file changed, 22 insertions(+), 15 deletions(-)
diff --git a/block/commit.c b/block/commit.c
index 9eedd1fa47..288e413be3 100644
--- a/block/commit.c
+++ b/block/commit.c
@@ -130,7 +130,6 @@ static
On 2/08/2024 12:58, Vladimir Sementsov-Ogievskiy wrote:
On 14.07.24 00:56, Vincent Vanlaer wrote:
Non-active block commits do not discard blocks only containing zeros,
causing images to lose sparseness after the commit. This commit fixes
that by writing zero blocks using blk_co_pwrite_zeroes
Non-active block commits do not discard blocks only containing zeros,
causing images to lose sparseness after the commit. This commit fixes
that by writing zero blocks using blk_co_pwrite_zeroes rather than
writing them out as any other arbitrary data.
Signed-off-by: Vincent Vanlaer
---
block
Signed-off-by: Vincent Vanlaer
---
block/commit.c | 39 ---
1 file changed, 28 insertions(+), 11 deletions(-)
diff --git a/block/commit.c b/block/commit.c
index 8dee25b313..fb54fc9560 100644
--- a/block/commit.c
+++ b/block/commit.c
@@ -128,6 +128,11
bdrv_co_common_block_status_above not only returns whether the block is
allocated, but also if it contains zeroes.
Signed-off-by: Vincent Vanlaer
---
block/commit.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/block/commit.c b/block/commit.c
index 7c3fdcb0ca
Signed-off-by: Vincent Vanlaer
---
tests/qemu-iotests/315 | 95 ++
tests/qemu-iotests/315.out | 54 ++
2 files changed, 149 insertions(+)
create mode 100755 tests/qemu-iotests/315
create mode 100644 tests/qemu-iotests/315.out
diff
- removed accidentally left over includes from testing
Vincent Vanlaer (4):
block: get type of block allocation in commit_run
block: refactor commit_run for multiple write types
block: allow commit to unmap zero blocks
block: add test non-active commit with zeroed data
block/commit.c
This patch series adds support for zero blocks in non-active commits.
The first patch in the series contains the actual changes to the commit
code, the second patch adds a test for the new functionality.
Vincent Vanlaer (2):
block: allow commit to unmap zero blocks
block: add test non-active
Non-active block commits do not discard blocks only containing zeros,
causing images to lose sparseness after the commit. This commit fixes
that by writing zero blocks using blk_co_pwrite_zeroes rather than
writing them out as any oother arbitrary data.
Signed-off-by: Vincent Vanlaer
---
block
Signed-off-by: Vincent Vanlaer
---
tests/qemu-iotests/315 | 95 ++
tests/qemu-iotests/315.out | 54 ++
2 files changed, 149 insertions(+)
create mode 100755 tests/qemu-iotests/315
create mode 100644 tests/qemu-iotests/315.out
diff
21 matches
Mail list logo