9 Star 0 Fork 13

src-anolis-os/mdadm

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0082-super-intel-make-freesize-not-required-for-chunk-siz.patch 1.76 KB
一键复制 编辑 原始数据 按行查看 历史
小龙 提交于 2023-05-16 18:45 . update to mdadm-4.2-7.el8
From 071f839ea549e2a384cd13bba445245cd87e48b1 Mon Sep 17 00:00:00 2001
From: Kinga Tanska <kinga.tanska@intel.com>
Date: Fri, 28 Oct 2022 04:51:17 +0200
Subject: [PATCH 82/83] super-intel: make freesize not required for chunk size
migration
Freesize is needed to be set for migrations where size of RAID could
be changed - expand. It tells how many free space is determined for
members. In chunk size migartion freesize is not needed to be set,
pointer shouldn't be checked if exists. This commit moves check to
condition which contains size calculations, instead of checking it
always at the first step.
Fix return value when superblock is not set.
Signed-off-by: Kinga Tanska <kinga.tanska@intel.com>
Signed-off-by: Jes Sorensen <jes@trained-monkey.org>
---
super-intel.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/super-intel.c b/super-intel.c
index 1f5f6eda..89fac626 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -7719,11 +7719,11 @@ static int validate_geometry_imsm(struct supertype *st, int level, int layout,
struct intel_super *super = st->sb;
/*
- * Autolayout mode, st->sb and freesize must be set.
+ * Autolayout mode, st->sb must be set.
*/
- if (!super || !freesize) {
- pr_vrb("freesize and superblock must be set for autolayout, aborting\n");
- return 1;
+ if (!super) {
+ pr_vrb("superblock must be set for autolayout, aborting\n");
+ return 0;
}
if (!validate_geometry_imsm_orom(st->sb, level, layout,
@@ -7731,7 +7731,7 @@ static int validate_geometry_imsm(struct supertype *st, int level, int layout,
verbose))
return 0;
- if (super->orom) {
+ if (super->orom && freesize) {
imsm_status_t rv;
int count = count_volumes(super->hba, super->orom->dpa,
verbose);
--
2.38.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-anolis-os/mdadm.git
git@gitee.com:src-anolis-os/mdadm.git
src-anolis-os
mdadm
mdadm
a8

搜索帮助