]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
dm raid1: add mirror_set to struct mirror
authorJonathan Brassow <jbrassow@redhat.com>
Fri, 19 Oct 2007 21:47:58 +0000 (22:47 +0100)
committerAlasdair G Kergon <agk@redhat.com>
Sat, 20 Oct 2007 01:01:22 +0000 (02:01 +0100)
Store a pointer to the owning mirror_set structure within each mirror
structure for a subsequent patch to use.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-raid1.c

index 8aafbb7ec574b702dd35c51900d204b5b7a906ce..31123d4a6b9cc39dbeec455d50b540b97ac99c06 100644 (file)
@@ -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 *ms, struct dm_target *ti,
                return -ENXIO;
        }
 
+       ms->mirror[mirror].ms = ms;
        ms->mirror[mirror].offset = offset;
 
        return 0;