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

Andrey Zhadchenko andrey.zhadchenko at virtuozzo.com
Mon Jul 24 10:09:42 MSK 2023


We want to check if cluster is locked without valid pio when seeking
holes

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 589d49429cf9..b9c152f2a636 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -1296,7 +1296,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