Thread (6 messages) 6 messages, 3 authors, 2023-01-05
STALE1290d
Revisions (3)
  1. v1 [diff vs current]
  2. v2 [diff vs current]
  3. v3 current

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

From: Kinga Tanska <hidden>
Date: 2022-12-27 12:49:02
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 Manage.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
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;
-- 
2.26.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help