qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v7 4/4] block: apply COR-filter to block-stream jobs


From: Andrey Shinkevich
Subject: Re: [PATCH v7 4/4] block: apply COR-filter to block-stream jobs
Date: Fri, 28 Aug 2020 19:28:39 +0300
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.9.0

On 24.08.2020 14:30, Vladimir Sementsov-Ogievskiy wrote:
24.08.2020 11:31, Andrey Shinkevich wrote:
This patch completes the series with the COR-filter insertion for
block-stream operations. Adding the filter makes it possible for copied
regions to be discarded in backing files during the block-stream job,
what will reduce the disk overuse.
The COR-filter insertion incurs changes in the iotests case
245:test_block_stream_4 that reopens the backing chain during a
block-stream job. There are changes in the iotests #030 as well.
The iotests case 030:test_stream_parallel was deleted due to multiple
conflicts between the concurrent job operations over the same backing
chain. The base backing node for one job is the top node for another
job. It may change due to the filter node inserted into the backing
chain while both jobs are running. Another issue is that the parts of
the backing chain are being frozen by the running job and may not be
changed by the concurrent job when needed. The concept of the parallel
jobs with common nodes is considered vital no more.

Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
---
  block/stream.c             | 58 +++++++++++++++++++++++++++++++++++-----------   tests/qemu-iotests/030     | 50 ++++-----------------------------------
  tests/qemu-iotests/030.out |  4 ++--
  tests/qemu-iotests/245     | 19 +++++++++++----
  4 files changed, 65 insertions(+), 66 deletions(-)

diff --git a/block/stream.c b/block/stream.c
index 8bf6b6d..e927fed 100644
--- a/block/stream.c
+++ b/block/stream.c
...
@@ -307,5 +332,10 @@ fail:
      if (bs_read_only) {
          bdrv_reopen_set_read_only(bs, true, NULL);
      }
-    bdrv_unfreeze_backing_chain(bs, above_base);
+    if () {
+        bdrv_unfreeze_backing_chain(cor_filter_bs, above_base);
+        bdrv_cor_filter_drop(cor_filter_bs);
+    } else {
+        bdrv_unfreeze_backing_chain(bs, above_base);

as I see, in this case chain is not yet frozen


When cor_filter_bs is NULL, only bs - above_base chain is frozen at this point.

Andrey


+    }
  }
diff --git a/tests/qemu-iotests/030 b/tests/qemu-iotests/030
index 1cdd7e2..fec9d89 100755
--- a/tests/qemu-iotests/030
+++ b/tests/qemu-iotests/030
...



reply via email to

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