[Devel] [PATCH hci-8.2 v2 1/2] dm-qcow2: zero qio pages with memzero_page() instead of kmap()
no-reply at sashiko.virtuozzo.com
no-reply at sashiko.virtuozzo.com
Thu Nov 19 15:56:19 MSK 2026
> From: Denis V. Lunev <den at openvz.org>
>
> zero_fill_iter_bvec() maps each page with kmap(), which may sleep, but
> parse_l2() calls it through perform_zero_read() with md_pages_lock
> held: a read of a cluster whose L2 entry is dirty or under writeback
> reads as zeroes. A debug kernel then prints "BUG: sleeping function
> called from invalid context" from the dm-qcow2 worker.
>
> The loop also walks multi-page bvecs and clears across page boundaries
> through the mapping of the first page, which works only without
> highmem.
>
> Walk single-page segments and clear each with memzero_page().
>
> https://virtuozzo.atlassian.net/browse/VSTOR-155987
>
> Fixes: 222b6f1291c1 ("dm-qcow2: Introduce driver to create block devices over QCOW2 files")
> Feature: dm-qcow2: block device over QCOW2 files driver
> Signed-off-by: Denis V. Lunev <den at openvz.org>
Sashiko has reviewed this patch and found no issues.
Carry the trailer below into the next revision and Sashiko will not review this patch again.
Reviewed-by: Sashiko <no-reply at sashiko.virtuozzo.com>
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261119125121.861804-1-den@openvz.org?part=1
More information about the Devel
mailing list