[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 0/2] qcow2: fix parallel rewrite and discard
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[PATCH v1 0/2] qcow2: fix parallel rewrite and discard |
Date: |
Thu, 25 Feb 2021 13:10:37 +0300 |
Hi all! It occurs that nothing prevents discarding and reallocating host
cluster during data writing. This way data writing will pollute another
flash allocated cluster of data or metadata.
Here is my suggestion to fix it basing on improved refcounts model. Look
at 02 for details.
I don't insist on this version, and will soon send a v2, based on
CoRwLock, as Kevin suggested, which should look simpler. Still, with v1
we keep possibility of relatively async discard.. Doesn't seem worth the
complexity.. But I'd like to share my idea of additional "runtime"
reference counters for clusters, as it may be needed later if we face
problems with more restrictive CoRwLock or may be for some other task.
So here is it.
Vladimir Sementsov-Ogievskiy (2):
iotests: add qcow2-discard-during-rewrite
block/qcow2: introduce inflight writes counters: fix discard
block/qcow2.h | 9 +
block/qcow2-refcount.c | 154 +++++++++++++++++-
block/qcow2.c | 26 ++-
.../tests/qcow2-discard-during-rewrite | 72 ++++++++
.../tests/qcow2-discard-during-rewrite.out | 21 +++
5 files changed, 278 insertions(+), 4 deletions(-)
create mode 100755 tests/qemu-iotests/tests/qcow2-discard-during-rewrite
create mode 100644 tests/qemu-iotests/tests/qcow2-discard-during-rewrite.out
--
2.29.2
- [PATCH v1 0/2] qcow2: fix parallel rewrite and discard,
Vladimir Sementsov-Ogievskiy <=