[Devel] [PATCH hci-8.1 1/7] drivers/md/dm-qcow2: repeat md page lookup if it was inserted in parallel

Konstantin Khorenko khorenko at virtuozzo.com
Thu Nov 5 00:35:09 MSK 2026


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

On Thu, 29 Oct 2026 17:03:40 +0300, Andrey Zhadchenko wrote:
> teach __handle_md_page() to work around -EEXIST by retrying.

Item 3 of the cover letter reply: say in the message what fails
without this patch, and add a Fixes tag for 412d5a4f7bf1b
("dm/dm-qcow2: add llseek_hole").

Why: the race is already there. qcow2_llseek_hole() runs
parse_metadata() in process context, in parallel with the main kwork.
When both miss the same md page, the one that loses the insert gets
-EEXIST: a guest I/O ends with EIO, or lseek returns -EEXIST. So this
is a fix on its own, not only a preparation for the fast path.

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team



More information about the Devel mailing list