[Devel] [PATCH RH9 6/9] dm-qcow2: Use handle_md_page() instead of md_page_find_or_postpone()
Kirill Tkhai
ktkhai at virtuozzo.com
Sun Mar 6 13:28:27 MSK 2022
This is to make further modifications easier.
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
drivers/md/dm-qcow2-map.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/md/dm-qcow2-map.c b/drivers/md/dm-qcow2-map.c
index 6a600b1c870f..0bfcd5716908 100644
--- a/drivers/md/dm-qcow2-map.c
+++ b/drivers/md/dm-qcow2-map.c
@@ -2282,8 +2282,8 @@ static int relocate_refcount_table(struct qcow2 *qcow2, struct qio **qio)
WARN_ON_ONCE(1);
goto err_free_r2_pages;
}
- md = md_page_find_or_postpone(qcow2, r1.page_id, NULL);
- if (WARN_ON_ONCE(!md))
+ ret = handle_md_page(qcow2, r1.page_id, NULL, &md);
+ if (WARN_ON_ONCE(ret <= 0))
goto err_free_r2_pages;
spin_lock_irq(&qcow2->md_pages_lock);
set_u64_to_be_page(md->page, r1.index_in_page, i);
@@ -2311,8 +2311,8 @@ static int relocate_refcount_table(struct qcow2 *qcow2, struct qio **qio)
err_free_r2_pages:
for (i = end; i < r2_end; i += clu_size) {
- md = md_page_find_or_postpone(qcow2, i >> PAGE_SHIFT, NULL);
- if (!md)
+ ret = handle_md_page(qcow2, i >> PAGE_SHIFT, NULL, &md);
+ if (ret <= 0)
break;
spin_lock_irq(&qcow2->md_pages_lock);
md_page_erase(qcow2, md);
More information about the Devel
mailing list