mdadm/0080-Manage-do-not-check-array-state-when-drive-is-remove.patch
Xiao Ni 02e1f69890 Update to latest upstream
There some bugs need to be fixed.

bug2127101 Reshape is started with not allowed chunk size
patch (super-intel: make freesize not required for chunk size migration)

bug2139789 Installation hangs after RAID degradation
bug2149292 mdadm: Couldn't open /dev/vda3 for write - not zeroing
patch (mdadm/udev: Don't handle change event on raw devices)

bug2151209 Can't remove disk when unplugging a disk
patch (incremental, manage: do not verify if remove is safe)

bug2148945 mdadm --fail /dev/md0 /dev/pmem1s failed
patch (Manage: do not check array state when drive is removed)

Resolves: rhbz#2127101, rhbz#2139789, rhbz#2149292, rhbz#2151209, rhbz#2148945

Signed-off-by: Xiao Ni <xni@redhat.com>
2023-01-06 21:58:10 +08:00

34 lines
1000 B
Diff

From b3e7b7eb1dfedd7cbd9a3800e884941f67d94c96 Mon Sep 17 00:00:00 2001
From: Kinga Tanska <kinga.tanska@intel.com>
Date: Tue, 27 Dec 2022 06:50:42 +0100
Subject: [PATCH 80/83] Manage: do not check array state when drive is removed
Array state doesn't need to be checked when drive is
removed, but until now clean state was required. Result
of the is_remove_safe() function will be independent
from array state.
Signed-off-by: Kinga Tanska <kinga.tanska@intel.com>
Signed-off-by: Jes Sorensen <jes@trained-monkey.org>
---
Manage.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/Manage.c b/Manage.c
index 594e3d2c..4d6e54b1 100644
--- a/Manage.c
+++ b/Manage.c
@@ -1321,8 +1321,7 @@ bool is_remove_safe(mdu_array_info_t *array, const int fd, char *devname, const
sysfs_free(mdi);
bool is_enough = enough(array->level, array->raid_disks,
- array->layout, (array->state & 1),
- avail);
+ array->layout, 1, avail);
free(avail);
return is_enough;
--
2.38.1