[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-raid
Subject: [RFC mdadm PATCH 01/11] sysfs: fix sysfs_set_array() to accept valid negative array levels
From: Dan Williams <dan.j.williams () intel ! com>
Date: 2014-04-24 7:22:22
Message-ID: 20140424072222.4515.47283.stgit () viggo ! jf ! intel ! com
[Download RAW message or body]
From: Dan Williams <dan.j.william@intel.com>
Assume this FIXME was to prevent loading a personality for containers.
Fix it up to accept the values that correlate with the actual md kernel
personalities.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
sysfs.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/sysfs.c b/sysfs.c
index 9a1d856960e8..4cbd4e5d051b 100644
--- a/sysfs.c
+++ b/sysfs.c
@@ -628,8 +628,9 @@ int sysfs_set_array(struct mdinfo *info, int vers)
return 1;
}
}
- if (info->array.level < 0)
- return 0; /* FIXME */
+ /* containers have no personality, they're rather bland */
+ if (info->array.level <= LEVEL_CONTAINER)
+ return 0;
rv |= sysfs_set_str(info, NULL, "level",
map_num(pers, info->array.level));
if (info->reshape_active && info->delta_disks != UnSet)
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic