OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
* [Devel] [PATCH hci-8.2 v2] dm-qcow2: log the image, offset and ext_l2 word of an invalid entry
@ 2026-11-19 13:08 Denis V. Lunev
  2026-11-19 13:24 ` Andrey Zhadchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Denis V. Lunev @ 2026-11-19 13:08 UTC (permalink / raw)
  To: alexander.ivanov, vasileios.almpanis; +Cc: devel

From: Denis V. Lunev <den@openvz.org>

parse_l2() reports an ext_l2 entry with allocated subclusters and no
cluster by l2->index_in_page and the page id. On ext_l2 images
index_in_page counts u64 words, two per entry, so the number it calls
the entry is twice the entry's index within the page. The ext_l2 word
that makes the entry invalid is not shown, nor is the image of a chain
the entry is in.

Print the image id as the get_img_name and get_img_fd messages take it,
the file offset where the entry starts, which can be looked up in that
image as is, and the ext_l2 word, which follows it.

https://virtuozzo.atlassian.net/browse/VSTOR-156041

Feature: dm-qcow2: block device over QCOW2 files driver
Signed-off-by: Denis V. Lunev <den@openvz.org>
---

Applies on top of the series "dm-qcow2: fix the revert of a failed L2
writeback".

v2: print img_id as is, say the offset is where the entry starts, keep
"invalid" in the line.
v1: http://lore.virtuozzo.com/kernel/20261119114828.766329-1-den@openvz.org/

 drivers/md/dm-qcow2-map.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/md/dm-qcow2-map.c b/drivers/md/dm-qcow2-map.c
index 89e569d09133..40138f26bf07 100644
--- a/drivers/md/dm-qcow2-map.c
+++ b/drivers/md/dm-qcow2-map.c
@@ -1980,9 +1980,11 @@ static loff_t parse_l2(struct qcow2 *qcow2, struct qcow2_map *map,
 		if (WARN_ON_ONCE(all_zeroes || (ext_l2 & (ext_l2 >> 32))))
 			goto out;
 		if (!pos && (u32)ext_l2) {
-			pr_err_ratelimited(QCOW2_FMT("invalid ext_l2 entry %u in page %llu"),
+			pr_err_ratelimited(QCOW2_FMT("img %u: invalid L2 entry at %#llx, ext_l2 %#llx"),
 					   qcow2_device_name(qcow2->tgt->ti),
-					   l2->index_in_page, l2->md->id);
+					   qcow2->img_id,
+					   (l2->md->id << PAGE_SHIFT) +
+					   l2->index_in_page * sizeof(u64), ext_l2);
 			goto out;
 		}
 
-- 
2.55.0

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Devel] [PATCH hci-8.2 v2] dm-qcow2: log the image, offset and ext_l2 word of an invalid entry
  2026-11-19 13:08 [Devel] [PATCH hci-8.2 v2] dm-qcow2: log the image, offset and ext_l2 word of an invalid entry Denis V. Lunev
@ 2026-11-19 13:24 ` Andrey Zhadchenko
  2026-11-19 16:35 ` Konstantin Khorenko
  2026-11-19 16:36 ` Konstantin Khorenko
  2 siblings, 0 replies; 4+ messages in thread
From: Andrey Zhadchenko @ 2026-11-19 13:24 UTC (permalink / raw)
  To: Denis V. Lunev, alexander.ivanov, vasileios.almpanis; +Cc: devel

Reviewed-by: Andrey Zhadchenko <andrey.zhadchenko@virtuozzo.com>

On 11/19/26 14:08, Denis V. Lunev wrote:
> From: Denis V. Lunev <den@openvz.org>
> 
> parse_l2() reports an ext_l2 entry with allocated subclusters and no
> cluster by l2->index_in_page and the page id. On ext_l2 images
> index_in_page counts u64 words, two per entry, so the number it calls
> the entry is twice the entry's index within the page. The ext_l2 word
> that makes the entry invalid is not shown, nor is the image of a chain
> the entry is in.
> 
> Print the image id as the get_img_name and get_img_fd messages take it,
> the file offset where the entry starts, which can be looked up in that
> image as is, and the ext_l2 word, which follows it.
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-156041
> 
> Feature: dm-qcow2: block device over QCOW2 files driver
> Signed-off-by: Denis V. Lunev <den@openvz.org>
> ---
> 
> Applies on top of the series "dm-qcow2: fix the revert of a failed L2
> writeback".
> 
> v2: print img_id as is, say the offset is where the entry starts, keep
> "invalid" in the line.
> v1: http://lore.virtuozzo.com/kernel/20261119114828.766329-1-den@openvz.org/
> 
>   drivers/md/dm-qcow2-map.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/md/dm-qcow2-map.c b/drivers/md/dm-qcow2-map.c
> index 89e569d09133..40138f26bf07 100644
> --- a/drivers/md/dm-qcow2-map.c
> +++ b/drivers/md/dm-qcow2-map.c
> @@ -1980,9 +1980,11 @@ static loff_t parse_l2(struct qcow2 *qcow2, struct qcow2_map *map,
>   		if (WARN_ON_ONCE(all_zeroes || (ext_l2 & (ext_l2 >> 32))))
>   			goto out;
>   		if (!pos && (u32)ext_l2) {
> -			pr_err_ratelimited(QCOW2_FMT("invalid ext_l2 entry %u in page %llu"),
> +			pr_err_ratelimited(QCOW2_FMT("img %u: invalid L2 entry at %#llx, ext_l2 %#llx"),
>   					   qcow2_device_name(qcow2->tgt->ti),
> -					   l2->index_in_page, l2->md->id);
> +					   qcow2->img_id,
> +					   (l2->md->id << PAGE_SHIFT) +
> +					   l2->index_in_page * sizeof(u64), ext_l2);
>   			goto out;
>   		}
>   

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Devel] [PATCH hci-8.2 v2] dm-qcow2: log the image, offset and ext_l2 word of an invalid entry
  2026-11-19 13:08 [Devel] [PATCH hci-8.2 v2] dm-qcow2: log the image, offset and ext_l2 word of an invalid entry Denis V. Lunev
  2026-11-19 13:24 ` Andrey Zhadchenko
@ 2026-11-19 16:35 ` Konstantin Khorenko
  2026-11-19 16:36 ` Konstantin Khorenko
  2 siblings, 0 replies; 4+ messages in thread
From: Konstantin Khorenko @ 2026-11-19 16:35 UTC (permalink / raw)
  To: Denis V. Lunev; +Cc: devel

Applying as is, thanks.

On Thu, 19 Nov 2026 14:08:35 +0100, Denis V. Lunev wrote:
> Print the image id as the get_img_name and get_img_fd messages take it,

All v1 items are done.

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Devel] [PATCH hci-8.2 v2] dm-qcow2: log the image, offset and ext_l2 word of an invalid entry
  2026-11-19 13:08 [Devel] [PATCH hci-8.2 v2] dm-qcow2: log the image, offset and ext_l2 word of an invalid entry Denis V. Lunev
  2026-11-19 13:24 ` Andrey Zhadchenko
  2026-11-19 16:35 ` Konstantin Khorenko
@ 2026-11-19 16:36 ` Konstantin Khorenko
  2 siblings, 0 replies; 4+ messages in thread
From: Konstantin Khorenko @ 2026-11-19 16:36 UTC (permalink / raw)
  To: alexander.ivanov, vasileios.almpanis, Denis V. Lunev; +Cc: devel

On Thu, 19 Nov 2026 14:08:35 +0100, Denis V. Lunev wrote:
> dm-qcow2: log the image, offset and ext_l2 word of an invalid entry

Applied to branch-rh10-6.12.0-211.75.1.26.x.vz10-ovz, will be released in rh10-6.12.0-211.75.1.26.4.vz10, thanks!

[1/1] dm-qcow2: log the image, offset and ext_l2 word of an invalid entry
      https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/0901e10a09f0

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team


_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-19 16:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-19 13:08 [Devel] [PATCH hci-8.2 v2] dm-qcow2: log the image, offset and ext_l2 word of an invalid entry Denis V. Lunev
2026-11-19 13:24 ` Andrey Zhadchenko
2026-11-19 16:35 ` Konstantin Khorenko
2026-11-19 16:36 ` Konstantin Khorenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox