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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux