mdadm/0101-imsm-make-freesize-required-to-volume-autolayout.patch

51 lines
1.6 KiB
Diff
Raw Normal View History

From 4f3efc34644d06f55fc650e4aa6b5a6ec22cea5f Mon Sep 17 00:00:00 2001
From: Kinga Stefaniuk <kinga.stefaniuk@intel.com>
Date: Tue, 11 Jun 2024 07:58:49 +0200
Subject: [PATCH 101/157] imsm: make freesize required to volume autolayout
Autolayout_imsm() shall be executed when IMSM_NO_PLATFORM=1 is set.
It was fixed by listed commit, checking super->orom was removed, but
also checking freesize. Freesize is not set for operations on RAID
volume with no size update, that's why it is not required to have
this value and always run autolayout_imsm().
Fix it by making autolayout_imsm() dependent on freesize.
Fixes: 46f192 ("imsm: fix first volume autolayout with IMSM_NO_PLATFORM")
Signed-off-by: Kinga Stefaniuk <kinga.stefaniuk@intel.com>
---
super-intel.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/super-intel.c b/super-intel.c
index 29652196..ef3f5da1 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -7749,7 +7749,7 @@ static int validate_geometry_imsm(struct supertype *st, int level, int layout,
verbose))
return 0;
- if (super->orom && freesize) {
+ if (super->orom) {
int count = count_volumes(super->hba, super->orom->dpa, verbose);
if (super->orom->vphba <= count) {
@@ -7759,9 +7759,11 @@ static int validate_geometry_imsm(struct supertype *st, int level, int layout,
}
}
- rv = autolayout_imsm(super, raiddisks, size, *chunk, freesize);
- if (rv != IMSM_STATUS_OK)
- return 0;
+ if (freesize) {
+ rv = autolayout_imsm(super, raiddisks, size, *chunk, freesize);
+ if (rv != IMSM_STATUS_OK)
+ return 0;
+ }
return 1;
}
--
2.41.0