dcavalca / rpms / mdadm

Forked from rpms/mdadm 3 years ago
Clone

Blame SOURCES/imsm-write-initial-ppl-on-a-disk-added-for-rebuild.patch

2c1b57
From 2ec9d182ea5821ec2f7234ff3c0cf07ae9f43cb4 Mon Sep 17 00:00:00 2001
2c1b57
From: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
2c1b57
Date: Thu, 28 Sep 2017 14:41:18 +0200
2c1b57
Subject: [PATCH 12/12] imsm: write initial ppl on a disk added for
2c1b57
 rebuild
2c1b57
2c1b57
When rebuild is initiated by the UEFI driver it is possible that the new
2c1b57
disk will not contain a valid ppl header. Just write the initial ppl
2c1b57
and don't abort assembly.
2c1b57
2c1b57
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
2c1b57
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
2c1b57
---
2c1b57
 super-intel.c | 5 ++++-
2c1b57
 1 file changed, 4 insertions(+), 1 deletion(-)
2c1b57
2c1b57
diff --git a/super-intel.c b/super-intel.c
2c1b57
index cf5d822..536cb61 100644
2c1b57
--- a/super-intel.c
2c1b57
+++ b/super-intel.c
2c1b57
@@ -6227,7 +6227,10 @@ out:
2c1b57
 
2c1b57
 		if (map->map_state == IMSM_T_STATE_UNINITIALIZED ||
2c1b57
 		   (map->map_state == IMSM_T_STATE_NORMAL &&
2c1b57
-		   !(dev->vol.dirty & RAIDVOL_DIRTY)))
2c1b57
+		   !(dev->vol.dirty & RAIDVOL_DIRTY)) ||
2c1b57
+		   (dev->vol.migr_state == MIGR_REBUILD &&
2c1b57
+		    dev->vol.curr_migr_unit == 0 &&
2c1b57
+		    get_imsm_disk_idx(dev, disk->disk.raid_disk, MAP_1) != idx))
2c1b57
 			ret = st->ss->write_init_ppl(st, info, d->fd);
2c1b57
 		else
2c1b57
 			info->mismatch_cnt++;
2c1b57
-- 
2c1b57
2.7.4
2c1b57