diff options
author | NeilBrown <neilb@suse.de> | 2010-06-15 09:36:03 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-06-24 13:33:24 +1000 |
commit | e93f68a1fc6244c05ad8fae28e75835ec74ab34e (patch) | |
tree | d282978aac8f6fcec512be2a6e61287bbb6241b1 /drivers/md/raid10.h | |
parent | 0544a21db02c1d8883158fd6f323364f830a120a (diff) | |
download | linux-rpi-e93f68a1fc6244c05ad8fae28e75835ec74ab34e.tar.gz linux-rpi-e93f68a1fc6244c05ad8fae28e75835ec74ab34e.tar.bz2 linux-rpi-e93f68a1fc6244c05ad8fae28e75835ec74ab34e.zip |
md: fix handling of array level takeover that re-arranges devices.
Most array level changes leave the list of devices largely unchanged,
possibly causing one at the end to become redundant.
However conversions between RAID0 and RAID10 need to renumber
all devices (except 0).
This renumbering is currently being done in the ->run method when the
new personality takes over. However this is too late as the common
code in md.c might already have invalidated some of the devices if
they had a ->raid_disk number that appeared to high.
Moving it into the ->takeover method is too early as the array is
still active at that time and wrong ->raid_disk numbers could cause
confusion.
So add a ->new_raid_disk field to mdk_rdev_s and use it to communicate
the new raid_disk number.
Now the common code knows exactly which devices need to be renumbered,
and which can be invalidated, and can do it all at a convenient time
when the array is suspend.
It can also update some symlinks in sysfs which previously were not be
updated correctly.
Reported-by: Maciej Trela <maciej.trela@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid10.h')
-rw-r--r-- | drivers/md/raid10.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/md/raid10.h b/drivers/md/raid10.h index 3824a087e17c..2316ac2e8e21 100644 --- a/drivers/md/raid10.h +++ b/drivers/md/raid10.h @@ -38,11 +38,6 @@ struct r10_private_data_s { int chunk_shift; /* shift from chunks to sectors */ sector_t chunk_mask; - int scale_disks; /* When starting array, multiply - * each ->raid_disk by this. - * Need for raid0->raid10 migration - */ - struct list_head retry_list; /* queue pending writes and submit them on unplug */ struct bio_list pending_bio_list; |