Skip to contentSkip to conversation

dm raid1: add mirror_set to struct mirror

PATCH In review Alasdair G Kergon 1 participant 1 message Oct 12, 2007 Device mapper

lore
Share & tools
lore

Alasdair G Kergon

author maintainer
#0 lore raw

PATCH 25/25 dm raid1: add mirror_set to struct mirror

From: Jonathan Brassow <[email protected]>

Store a pointer to the owning mirror_set structure within each mirror structure for a subsequent patch to use.

---
 drivers/md/dm-raid1.c |    2 ++
 1 files changed, 2 insertions(+)
drivers/md/dm-raid1.c +2 -0
Index: linux-2.6.23/drivers/md/dm-raid1.c
===================================================================
@@ -114,6 +114,7 @@ struct region {
  * Mirror set structures.
  *---------------------------------------------------------------*/
 struct mirror {
+	struct mirror_set *ms;
 	atomic_t error_count;
 	struct dm_dev *dev;
 	sector_t offset;
@@ -1017,6 +1018,7 @@ static int get_mirror(struct mirror_set 
 		return -ENXIO;
 	}
 
+	ms->mirror[mirror].ms = ms;
 	ms->mirror[mirror].offset = offset;
 
 	return 0;