]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Manage: do not check array state when drive is removed
authorKinga Tanska <kinga.tanska@intel.com>
Tue, 27 Dec 2022 05:50:42 +0000 (06:50 +0100)
committerJes Sorensen <jes@trained-monkey.org>
Thu, 5 Jan 2023 03:37:30 +0000 (22:37 -0500)
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

index 594e3d2cc045828a34df615f86ff58d4373ffed2..4d6e54b1e045a4ce5e12678f4c3c9b4bebf71934 100644 (file)
--- 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;