[Devel] [PATCH hci-8.2] dm-qcow2: log the image, offset and ext_l2 word of an invalid entry

Konstantin Khorenko khorenko at virtuozzo.com
Thu Nov 19 15:17:09 MSK 2026


I won't apply this version, please send v2 with the changes below.

- Print qcow2->img_id as is (or the file with %pD), not img_id + 1.
- Say whose offset it is: the entry starts there, the ext_l2 word is
  8 bytes later.
- Keep "invalid" in the line.
- Drop "as the table status does" from the message.

On Thu, 19 Nov 2026 12:48:28 +0100, Denis V. Lunev wrote:
> +			pr_err_ratelimited(QCOW2_FMT("img %u: ext_l2 %#llx at %#llx, no cluster"),
> 					   qcow2_device_name(qcow2->tgt->ti),
> +					   qcow2->img_id + 1, ext_l2,

img_id is 0-based, and get_img_name, get_img_fd and
set_fault_injection take it as is. The table status prints img_id + 1
of the top image only, which is the number of images. So in a chain of
two an entry in the base image is logged as "img 1", and
"get_img_name 1" returns the top delta.

"ext_l2 %#llx at %#llx" reads as the offset of the ext_l2 word, while
the offset is of the L2 entry; parse_l2() reads ext_l2 from
index_in_page + 1. And an operator who got -EIO greps for "invalid".

As 4/4 of "dm-qcow2: fix the revert of a failed L2 writeback" is not
committed yet, I will fold v2 into it when applying that series.

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team



More information about the Devel mailing list