All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mdadm: Fix array size mismatch after grow
@ 2022-04-07  7:02 Lukasz Florczak
  2022-04-07 10:59 ` Paul Menzel
  0 siblings, 1 reply; 2+ messages in thread
From: Lukasz Florczak @ 2022-04-07  7:02 UTC (permalink / raw)
  To: linux-raid; +Cc: jes, colyli

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@linux.intel.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-07 11:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-07  7:02 [PATCH] mdadm: Fix array size mismatch after grow Lukasz Florczak
2022-04-07 10:59 ` Paul Menzel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.