mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-25 00:52:45 -04:00
md: add ->takeover method to support changing the personality managing an array
Implement this for RAID6 to be able to 'takeover' a RAID5 array. The new RAID6 will use a layout which places Q on the last device, and that device will be missing. If there are any available spares, one will immediately have Q recovered onto it. Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
@@ -321,6 +321,16 @@ struct mdk_personality
|
||||
* others - reserved
|
||||
*/
|
||||
void (*quiesce) (mddev_t *mddev, int state);
|
||||
/* takeover is used to transition an array from one
|
||||
* personality to another. The new personality must be able
|
||||
* to handle the data in the current layout.
|
||||
* e.g. 2drive raid1 -> 2drive raid5
|
||||
* ndrive raid5 -> degraded n+1drive raid6 with special layout
|
||||
* If the takeover succeeds, a new 'private' structure is returned.
|
||||
* This needs to be installed and then ->run used to activate the
|
||||
* array.
|
||||
*/
|
||||
void *(*takeover) (mddev_t *mddev);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user