Smaller checkpoint can be stored when metadata is not in migration state (this means when there is no second map). Without this additional condition it can occur that during array start/stop sequence checkpoint was roll back to 0. Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx> --- super-intel.c | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/super-intel.c b/super-intel.c index cd409e9..4e3de8a 100644 --- a/super-intel.c +++ b/super-intel.c @@ -5335,9 +5335,15 @@ mark_checkpoint: */ if (units32 == units && __le32_to_cpu(dev->vol.curr_migr_unit) != units32) { - dprintf("imsm: mark checkpoint (%u)\n", units32); - dev->vol.curr_migr_unit = __cpu_to_le32(units32); - super->updates_pending++; + struct imsm_map *map2 = get_imsm_map(dev, 1); + if ((__le32_to_cpu(dev->vol.curr_migr_unit) < units32) + || (map2 == NULL)) { + dprintf("imsm: mark checkpoint (%u)\n", + units32); + dev->vol.curr_migr_unit = + __cpu_to_le32(units32); + super->updates_pending++; + } } } -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html