On 05/12/2018 9:07 AM, Guoqing Jiang wrote:> Pls re-compile mdadm with this, and see if it works.
diff --git a/util.c b/util.c index c26cf5f3f78b..bd00ebde06a9 100644 --- a/util.c +++ b/util.c @@ -1919,6 +1919,7 @@ int set_array_info(int mdfd, struct supertype *st, struct mdinfo *info) * and older kernels */ mdu_array_info_t inf; + struct mdinfo info1; int rv; if (st->ss->external) @@ -1927,6 +1928,11 @@ int set_array_info(int mdfd, struct supertype *st, struct mdinfo *info) memset(&inf, 0, sizeof(inf)); inf.major_version = info->array.major_version; inf.minor_version = info->array.minor_version; + + /* set the correct level based on sb */ + st->ss->getinfo_super(st, &info1, NULL); + inf.level = info1.array.level; + rv = md_set_array_info(mdfd, &inf); return rv;
I tried this just now, but it doesn't seem to have any effect.