qcow2: fix parallel rewrite and discard
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | iotests: add qcow2-discard-during-rewritetests/ tests/ | +93 | 0 replies | |
| 2/2 | block/qcow2: introduce inflight writes counters: fix discardblock/ block/ block/ +1 more | +186 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH v1 0/2] qcow2: fix parallel rewrite and discard
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
Signature · 1 line
2.29.2