[Devel] [PATCH hci-8.1 v11 00/10] dm-qcow2: truncate unused tail of image on suspend
Konstantin Khorenko
khorenko at virtuozzo.com
Mon Nov 9 18:42:38 MSK 2026
I won't apply this version, please send v12 with the changes below.
On 11/9/26 15:01, Alexander Ivanov wrote:
> Alexander Ivanov (10):
> dm-qcow2: add qcow2_md_page_read_sync() helper
> dm-qcow2: drop duplicate prefix from QC_ERR/QC_INFO messages
> dm-qcow2: extend the file for a new refblock in allocate_cluster()
> dm-qcow2: complete wbd before ending the data qio
> dm-qcow2: flush lower md before clearing dirty bit on merge failure
> dm-qcow2: keep the dirty bit of an image that needs check
> dm-qcow2: flag the image for check if reftable relocation fails late
> dm-qcow2: leak clusters allocated for a failed L1/L2 writeback
> dm-qcow2: retry R1/R2 writeback that failed with ENOSPC
> dm-qcow2: truncate unused tail of image on suspend
What to change for v12:
1. Patch 8, code: in prepare_l1l2_allocation(), queue the qio that
allocates an L2-table cluster for an L1 update on
l1.md->wbd->dependent_list instead of l1.md->wait_list, so a failed
L1 writeback ends it with the error instead of sending it back to
allocate another cluster. The new loop in complete_wbd() then has to
skip a qio without ext.
2. Patch 8, commit message: say what is leaked: one cluster per failed
L1/L2 write of a request.
3. Patch 9, comment and commit message: a page that failed before the
flush gets up to two attempts during it, not "once" or "one more
try". MD_DIRTY is dropped when the write is submitted, not by the
failure.
4. Patch 9, commit message: say that with patch 8 a request whose L2
write keeps failing with ENOSPC leaks one data cluster on every
resubmission, until the space is back.
5. Patch 10, commit message: the scan is skipped on md_writeback_error,
which a late reftable relocation failure (patch 7) sets too, not only
a failed R1/R2 writeback.
6. Cover letter: the patch 9 line of the changelog says "once" as well,
fix it as in item 3.
Separate patches, not needed for v12:
1. A REQ_OP_FLUSH whose fsync fails with ENOSPC ends with
BLK_STS_NOSPC, and qrq_endio() hits WARN_ON_ONCE(!op_is_write())
for it. This is older than the series.
--
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
More information about the Devel
mailing list