All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] imsm: change wrong size verification
@ 2021-04-21 14:50 Mariusz Tkaczyk
  2021-05-06 20:40 ` Jes Sorensen
  0 siblings, 1 reply; 2+ messages in thread
From: Mariusz Tkaczyk @ 2021-04-21 14:50 UTC (permalink / raw)
  To: jes; +Cc: linux-raid

Expectation that size is always rounded is incorrect.
Just confirm that size is smaller to be certain that update is safe.

Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
---
 super-intel.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/super-intel.c b/super-intel.c
index 6617dd6d..a7052530 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -11817,12 +11817,12 @@ static int imsm_fix_size_mismatch(struct supertype *st, int subarray_index)
 		if (calc_size == d_size || dev->vol.migr_type == MIGR_GEN_MIGR)
 			continue;
 
-		/* There is a difference, verify that imsm_dev_size is
-		 * rounded correctly and push update.
+		/* There is a difference, confirm that imsm_dev_size is
+		 * smaller and push update.
 		 */
-		if (d_size != round_size_to_mb(d_size, disc_count)) {
-			dprintf("imsm: Size of volume %d is not rounded correctly\n",
-				 i);
+		if (d_size > calc_size) {
+			pr_err("imsm: dev size of subarray %d is incorrect\n",
+				i);
 			goto exit;
 		}
 		memset(&geo, 0, sizeof(struct geo_params));
-- 
2.26.2


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

* Re: [PATCH] imsm: change wrong size verification
  2021-04-21 14:50 [PATCH] imsm: change wrong size verification Mariusz Tkaczyk
@ 2021-05-06 20:40 ` Jes Sorensen
  0 siblings, 0 replies; 2+ messages in thread
From: Jes Sorensen @ 2021-05-06 20:40 UTC (permalink / raw)
  To: Mariusz Tkaczyk; +Cc: linux-raid

On 4/21/21 10:50 AM, Mariusz Tkaczyk wrote:
> Expectation that size is always rounded is incorrect.
> Just confirm that size is smaller to be certain that update is safe.
> 
> Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
> ---
>  super-intel.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)

Applied!

Thanks,
Jes


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

end of thread, other threads:[~2021-05-06 20:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-21 14:50 [PATCH] imsm: change wrong size verification Mariusz Tkaczyk
2021-05-06 20:40 ` Jes Sorensen

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.