A request that allocates an L2 table waits for the L1 writeback on the page wait list. If the writeback fails, the L1 entry is reverted and the request is dispatched again, so it allocates another L2 table and dirties L1 once more. With a persistent write error the request never completes.
Queue the request on the wbd dependent list instead, like requests waiting for an L2 update. It is dispatched again after a successful writeback and ends with the error after a failed one. https://virtuozzo.atlassian.net/browse/VSTOR-148171 Feature: dm-qcow2: block device over QCOW2 files driver Fixes: 222b6f1291c1c ("dm-qcow2: Introduce driver to create block devices over QCOW2 files") Signed-off-by: Alexander Ivanov <[email protected]> --- drivers/md/dm-qcow2-map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-qcow2-map.c b/drivers/md/dm-qcow2-map.c index 995f611ae5bb..7f61ff67646c 100644 --- a/drivers/md/dm-qcow2-map.c +++ b/drivers/md/dm-qcow2-map.c @@ -2616,7 +2616,7 @@ static int prepare_l1l2_allocation(struct qcow2 *qcow2, struct qio *qio, * 2)For COW from backing file this is must. */ spin_lock_irq(&qcow2->md_pages_lock); - list_add_tail(&qio->link, &map->l1.md->wait_list); + list_add_tail(&qio->link, &map->l1.md->wbd->dependent_list); spin_unlock_irq(&qcow2->md_pages_lock); return 0; } -- 2.53.0 _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
