aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Brassow <jbrassow@redhat.com>2007-05-09 05:33:07 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-09 15:30:48 -0400
commitf5353cd7c9cd10cdf9d62a5487f3db77b7b68105 (patch)
tree25c3f22f87d2d6aff90768764a6aa7d7d1c45936
parent26b9f228703f0518a90e7513d6fe7b6abeed5138 (diff)
dm raid1: fix to commit pending clear region requests
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. Signed-off-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/md/dm-raid1.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c
index bde904606099..85d254edd9be 100644
--- a/drivers/md/dm-raid1.c
+++ b/drivers/md/dm-raid1.c
@@ -405,8 +405,7 @@ static void rh_update_states(struct region_hash *rh)
405 mempool_free(reg, rh->region_pool); 405 mempool_free(reg, rh->region_pool);
406 } 406 }
407 407
408 if (!list_empty(&recovered)) 408 rh->log->type->flush(rh->log);
409 rh->log->type->flush(rh->log);
410 409
411 list_for_each_entry_safe (reg, next, &clean, list) 410 list_for_each_entry_safe (reg, next, &clean, list)
412 mempool_free(reg, rh->region_pool); 411 mempool_free(reg, rh->region_pool);