[Devel] [PATCH RH9 v2 7/8] dm/dm-ploop: allow to check if cluster is locked

Andrey Zhadchenko andrey.zhadchenko at virtuozzo.com
Wed Aug 16 12:32:54 MSK 2023


When looking for SEEK_HOLE, we would like to check if cluster is locked
without valid pio

Feature: dm: implement SEEK_HOLE for dm-qcow2 and dm-ploop
https://jira.vzint.dev/browse/PSBM-145746
Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
---
 drivers/md/dm-ploop-map.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index 640cf8428d9b..3f0803cb8e47 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -1294,7 +1294,7 @@ static bool ploop_postpone_if_cluster_locked(struct ploop *ploop,
 
 	spin_lock_irq(&ploop->deferred_lock);
 	e_h = ploop_find_lk_of_cluster(ploop, clu);
-	if (e_h)
+	if (e_h && pio)
 		ploop_add_endio_pio(e_h, pio);
 	spin_unlock_irq(&ploop->deferred_lock);
 
-- 
2.39.3



More information about the Devel mailing list