[PATCH pyblock 1/2] Use libdmraid's status instead of figuring out if a set is degraded ourselves

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

 



Before this patch we checked (rs->total_devs != rs->found_devs) to see if a
set is degraded. This can lead to false positives, such as for example
with Promise RAID 10, see:
http://bugzilla.redhat.com/show_bug.cgi?id=524168

This patch modifies pyblock to instead use libdmraid's status field to
check for degraded sets.
---
 dmraid.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dmraid.c b/dmraid.c
index 6d4e7b7..2faf026 100644
--- a/dmraid.c
+++ b/dmraid.c
@@ -942,7 +942,7 @@ pydmraid_raidset_get(PyObject *self, void *data)
 		return PyLong_FromUnsignedLong(rs->found_devs);
 	} else if (!strcmp(attr, "degraded")) {
 		PyObject *ret = Py_False;
-		if (rs->total_devs != rs->found_devs)
+		if (S_INCONSISTENT(rs->status))
 			ret = Py_True;
 		Py_INCREF(ret);
 		return ret;
-- 
1.6.5.rc2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux