[Devel] [PATCH RHEL9 COMMIT] dm-ploop: drop redundant md_lock on md->status bits handling
Konstantin Khorenko
khorenko at virtuozzo.com
Wed Jun 25 14:10:20 MSK 2025
The commit is pushed to "branch-rh9-5.14.0-427.55.1.vz9.82.x-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git
after rh9-5.14.0-427.55.1.el9
------>
commit a9efb915cf9438c20f74a61b0733daf50794dc51
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date: Tue Jun 17 15:49:48 2025 +0300
dm-ploop: drop redundant md_lock on md->status bits handling
md->status bits are protected by ploop->bat_lock,
md->md_lock is used to protect in-memory BAT copy, md->wait_llist in
particular.
Fixes: 1a12832fd864 ("dm-ploop: fix resize and grow to use the new way of updating md pages")
Found while working on https://virtuozzo.atlassian.net/browse/VSTOR-107975
Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
Reviewed-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
Reviewed-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
Feature: dm-ploop: ploop target driver
---
drivers/md/dm-ploop-map.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index e1a199f09c97f..11767dd919503 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -2727,16 +2727,13 @@ int ploop_prepare_reloc_index_wb(struct ploop *ploop,
err = -EIO;
spin_lock_irq(&ploop->bat_lock);
- spin_lock(&md->md_lock);
/* Keep this test to be the same as in delay_if_md_busy */
if (test_bit(MD_WRITEBACK, &md->status) || test_bit(MD_UPDATING, &md->status)) {
err = -EBUSY;
- spin_unlock(&md->md_lock);
goto out_error;
} else {
set_bit(MD_UPDATING, &md->status);
}
- spin_unlock(&md->md_lock);
err = ploop_prepare_bat_update(ploop, md, type);
if (err)
More information about the Devel
mailing list