imsm: Apply checkpoint metadata update for general migration
mdmon has to update checkpoint information in metadata during general migration according to received metadata update. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
c17608eac3
commit
0ec5d470e0
|
@ -6914,6 +6914,24 @@ static void imsm_process_update(struct supertype *st,
|
||||||
mpb = super->anchor;
|
mpb = super->anchor;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
case update_general_migration_checkpoint: {
|
||||||
|
struct intel_dev *id;
|
||||||
|
struct imsm_update_general_migration_checkpoint *u =
|
||||||
|
(void *)update->buf;
|
||||||
|
|
||||||
|
dprintf("imsm: process_update() "
|
||||||
|
"for update_general_migration_checkpoint called\n");
|
||||||
|
|
||||||
|
/* find device under general migration */
|
||||||
|
for (id = super->devlist ; id; id = id->next) {
|
||||||
|
if (is_gen_migration(id->dev)) {
|
||||||
|
id->dev->vol.curr_migr_unit =
|
||||||
|
__cpu_to_le32(u->curr_migr_unit);
|
||||||
|
super->updates_pending++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case update_takeover: {
|
case update_takeover: {
|
||||||
struct imsm_update_takeover *u = (void *)update->buf;
|
struct imsm_update_takeover *u = (void *)update->buf;
|
||||||
if (apply_takeover_update(u, super, &update->space_list)) {
|
if (apply_takeover_update(u, super, &update->space_list)) {
|
||||||
|
@ -7251,6 +7269,10 @@ static void imsm_prepare_update(struct supertype *st,
|
||||||
size_t len = 0;
|
size_t len = 0;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
case update_general_migration_checkpoint:
|
||||||
|
dprintf("imsm: prepare_update() "
|
||||||
|
"for update_general_migration_checkpoint called\n");
|
||||||
|
break;
|
||||||
case update_takeover: {
|
case update_takeover: {
|
||||||
struct imsm_update_takeover *u = (void *)update->buf;
|
struct imsm_update_takeover *u = (void *)update->buf;
|
||||||
if (u->direction == R0_TO_R10) {
|
if (u->direction == R0_TO_R10) {
|
||||||
|
|
Loading…
Reference in New Issue