[Devel] [PATCH hci-8.1 1/2] dm-ploop: fix a failed merge failing every later merge on the host
Denis V. Lunev
den at openvz.org
Wed Oct 28 16:21:03 MSK 2026
From: Denis V. Lunev <den at openvz.org>
ploop_process_merge_latest_snapshot() collects the status of its fake
merge pios in a function-local static. It is never reset and it is
shared by every ploop device, so once a single pio fails, every later
merge on any device stops after its first pio and returns that old
error, until the module is reloaded. A failure on one device also
aborts a merge running on another.
Keep the status on the stack. The pios carry a pointer to it, so the
function must not return while one of them is outstanding: every exit
already waits for service_pios to drain.
Fixes: 6ddad5a4d226 ("dm-ploop: Add ploop target driver")
Signed-off-by: Denis V. Lunev <den at openvz.org>
Reviewed-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
Feature: dm-ploop: ploop target driver
---
drivers/md/dm-ploop-cmd.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/md/dm-ploop-cmd.c b/drivers/md/dm-ploop-cmd.c
index 5fa78e6cff9a..9084ca37f45b 100644
--- a/drivers/md/dm-ploop-cmd.c
+++ b/drivers/md/dm-ploop-cmd.c
@@ -671,7 +671,7 @@ static void service_pio_endio(struct pio *pio, void *data, blk_status_t status)
static int ploop_process_merge_latest_snapshot(struct ploop *ploop)
{
- static blk_status_t service_status;
+ blk_status_t service_status = BLK_STS_OK;
struct bio_vec bvec = {0};
struct pio *pio;
int ret = 0;
--
2.53.0
More information about the Devel
mailing list