From: Kinga Tanska Date: Tue, 27 Dec 2022 05:50:42 +0000 (+0100) Subject: Manage: do not check array state when drive is removed X-Git-Tag: mdadm-4.3~97 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3e7b7eb1dfedd7cbd9a3800e884941f67d94c96;p=thirdparty%2Fmdadm.git 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 Signed-off-by: Jes Sorensen --- 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;