Skip to content

Commit

Permalink
dm raid1: add mirror_set to struct mirror
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jbrassow authored and kergon committed Oct 20, 2007
1 parent 6b3df0d commit aa5617c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/md/dm-raid1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit aa5617c

Please sign in to comment.