diff mbox series

[v3,1/3] Manage: do not check array state when drive is removed

Message ID 20221227055044.18168-2-kinga.tanska@intel.com (mailing list archive)
State Accepted, archived
Headers show
Series Incremental mode: remove safety verification | expand

Commit Message

Kinga Tanska Dec. 27, 2022, 5:50 a.m. UTC
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>
---
 Manage.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/Manage.c b/Manage.c
index b1d0e630..157a2b98 100644
--- a/Manage.c
+++ b/Manage.c
@@ -1322,8 +1322,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;