Skip to contentSkip to conversation

dm raid1: switch rh_in_sync to blocking in do_reads

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 25/26 dm raid1: switch rh_in_sync to blocking in do_reads

From: Jonathan Brassow <[email protected]>

The call to rh_in_sync() in do_reads() should be allowed to block. It is in the mirror worker thread which already permits blocking operations. This will be needed to support clustered mirroring which will perform network operations.

---
 drivers/md/dm-raid1.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
drivers/md/dm-raid1.c +1 -1
Index: linux-2.6.21/drivers/md/dm-raid1.c
===================================================================
@@ -741,7 +741,7 @@ static void do_reads(struct mirror_set *
 		/*
 		 * We can only read balance if the region is in sync.
 		 */
-		if (rh_in_sync(&ms->rh, region, 0))
+		if (rh_in_sync(&ms->rh, region, 1))
 			m = choose_mirror(ms, bio->bi_sector);
 		else
 			m = ms->default_mirror;