From: Pawel Baldysiak Date: Thu, 28 Sep 2017 12:41:15 +0000 (+0200) Subject: imsm: Write empty PPL header if assembling regular clean array. X-Git-Tag: mdadm-4.1-rc1~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50b9c10da0e7c153744b548680147dc8cc7c4c72;p=thirdparty%2Fmdadm.git imsm: Write empty PPL header if assembling regular clean array. If array was initially assembled with kernel without PPL support - initial header was never written to the drive. If initial resync was completed and system is rebooted to kernel with PPL support - mdadm prevents from assembling normal clean array due to lack of valid PPL. Write empty header when assemble normal clean array, so the its assamble is no longer blocked. Signed-off-by: Pawel Baldysiak Signed-off-by: Jes Sorensen --- diff --git a/super-intel.c b/super-intel.c index 7b2327ba..501d0c3c 100644 --- a/super-intel.c +++ b/super-intel.c @@ -6225,7 +6225,9 @@ out: } if (ret == 1) { - if (map->map_state == IMSM_T_STATE_UNINITIALIZED) + if (map->map_state == IMSM_T_STATE_UNINITIALIZED || + (map->map_state == IMSM_T_STATE_NORMAL && + !(dev->vol.dirty & RAIDVOL_DIRTY))) ret = st->ss->write_init_ppl(st, info, d->fd); else info->mismatch_cnt++;