mirror of
https://gitee.com/openharmony/kernel_linux
synced 2025-03-04 09:37:44 +00:00
dm raid1: add mirror_set to struct mirror
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>
This commit is contained in:
parent
6b3df0d7a5
commit
aa5617c553
@ -114,6 +114,7 @@ struct region {
|
|||||||
* Mirror set structures.
|
* Mirror set structures.
|
||||||
*---------------------------------------------------------------*/
|
*---------------------------------------------------------------*/
|
||||||
struct mirror {
|
struct mirror {
|
||||||
|
struct mirror_set *ms;
|
||||||
atomic_t error_count;
|
atomic_t error_count;
|
||||||
struct dm_dev *dev;
|
struct dm_dev *dev;
|
||||||
sector_t offset;
|
sector_t offset;
|
||||||
@ -1017,6 +1018,7 @@ static int get_mirror(struct mirror_set *ms, struct dm_target *ti,
|
|||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ms->mirror[mirror].ms = ms;
|
||||||
ms->mirror[mirror].offset = offset;
|
ms->mirror[mirror].offset = offset;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user