summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d998b73)
Tracking RAID0 arrays doesn't really work. There is no need,
and there are some sysfs files which won't exist when the array
appears and then won't be opened when the level is changed.
So simply ignore RAID0 and LINEAR arrays - don't add them when they
appear and if an array we are monitoring turns into one of these,
discard it promptly.
Signed-off-by: NeilBrown <neilb@suse.de>
if (mdstat->level) {
int level = map_name(pers, mdstat->level);
if (mdstat->level) {
int level = map_name(pers, mdstat->level);
- if (a->info.array.level != level && level >= 0) {
+ if (level == 0 || level == LEVEL_LINEAR) {
+ a->container = NULL;
+ return;
+ }
+ else if (a->info.array.level != level && level > 0) {
struct active_array *newa = duplicate_aa(a);
if (newa) {
newa->info.array.level = level;
struct active_array *newa = duplicate_aa(a);
if (newa) {
newa->info.array.level = level;
char buf[40];
/* check if array is ready to be monitored */
char buf[40];
/* check if array is ready to be monitored */
+ if (!mdstat->active || !mdstat->level)
+ return;
+ if (strcmp(mdstat->level, "raid0") == 0 ||
+ strcmp(mdstat->level, "linear") == 0)
return;
mdi = sysfs_read(-1, mdstat->devnum,
return;
mdi = sysfs_read(-1, mdstat->devnum,
/* once an array has been deactivated we want to
* ask the manager to discard it.
*/
/* once an array has been deactivated we want to
* ask the manager to discard it.
*/
- if (!a->container || (a->info.array.level == 0)) {
if (discard_this) {
ap = &(*ap)->next;
continue;
if (discard_this) {
ap = &(*ap)->next;
continue;