Skip to contentSkip to conversation

dm raid1: fix to commit pending clear region requests

PATCH In review Alasdair G Kergon 1 participant 1 message May 8, 2007 Device mapper

lore
Share & tools
lore

Alasdair G Kergon

author maintainer
#0 lore raw

PATCH 24/26 dm raid1: fix to commit pending clear region requests

From: Jonathan Brassow <[email protected]>

With the code as it is, it is possible for oustanding clear region requests never to get flushed when a mirror is deactivated or suspended. This means there will always be some resync work required when a mirror is activated, even though it may very well be in-sync.

Always requesting the flush doesn't hurt us. This is because the log tracks whether any changes occurred and, if not, no flush is performed.

---
 drivers/md/dm-raid1.c |    3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)
drivers/md/dm-raid1.c +1 -2
Index: linux-2.6.21/drivers/md/dm-raid1.c
===================================================================
@@ -405,8 +405,7 @@ static void rh_update_states(struct regi
 		mempool_free(reg, rh->region_pool);
 	}
 
-	if (!list_empty(&recovered))
-		rh->log->type->flush(rh->log);
+	rh->log->type->flush(rh->log);
 
 	list_for_each_entry_safe (reg, next, &clean, list)
 		mempool_free(reg, rh->region_pool);