qcow2: Update multiple refcounts at once
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 | qcow2: Refactor update_refcountblock/ | +56 | 0 replies | |
| 2/2 | qcow2: Update multiple refcounts at onceblock/ | +36 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [Qemu-devel] [PATCH 0/2] qcow2: Update multiple refcounts at once
When updating the refcount of a range of cluste, qcow2 currently processes single clusters, so for each cluster there is a separate write to the dis image. This series changes this behaviour to change the refcount of all cluters in the same refcount block before writing anything to disk, saving some write operations.
The influence of this change is highest when lots of large request frequently allocate multiple clusters at once - growing an empty image during FS creation or installation. The allocation itself is already optimized for this case, refcount updates are an important missing piece: I trief mke2fs on an empty image (cache=off) and it went down from 7:15 min to 1:59 min. Even with writeback caching we still gain a small percentage (with the right qemu-io test case even a huge one, but I guess this doesn't matter in practice).
I'm fairly confident that this series is correct, it has passed the test scripts I have here and some manual testing. However, given the recent qcow2 history I don't feel completely comfortable with touching this part of qcow2, so please run this with all test cases you all have for it. And give it a thorough review, of course.
Kevin Wolf (2):
qcow2: Refactor update_refcount
qcow2: Update multiple refcounts at once
block/qcow2.c | 118 ++++++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 88 insertions(+), 30 deletions(-)