imsm_fix_size_mismatch() is invoked to fix the problem, but it couldn't proceed due to migration check. This patch allows for intended behavior. Additionally remove some dead code. Signed-off-by: Lukasz Florczak <lukasz.florczak@xxxxxxxxxxxxxxx> --- super-intel.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/super-intel.c b/super-intel.c index d5fad102..be6aec90 100644 --- a/super-intel.c +++ b/super-intel.c @@ -11757,7 +11757,7 @@ static int imsm_fix_size_mismatch(struct supertype *st, int subarray_index) unsigned long long d_size = imsm_dev_size(dev); int u_size; - if (calc_size == d_size || dev->vol.migr_type == MIGR_GEN_MIGR) + if (calc_size == d_size) continue; /* There is a difference, confirm that imsm_dev_size is @@ -11772,10 +11772,7 @@ static int imsm_fix_size_mismatch(struct supertype *st, int subarray_index) geo.size = d_size; u_size = imsm_create_metadata_update_for_size_change(st, &geo, &update); - if (u_size < 1) { - dprintf("imsm: Cannot prepare size change update\n"); - goto exit; - } + imsm_update_metadata_locally(st, update, u_size); if (st->update_tail) { append_metadata_update(st, update, u_size); -- 2.27.0