]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Examine/Detail: report raid6 layout
authorNeilBrown <neilb@suse.de>
Tue, 14 Jul 2009 05:12:29 +0000 (15:12 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 14 Jul 2009 05:12:29 +0000 (15:12 +1000)
Somehow this was missing before...

Signed-off-by: NeilBrown <neilb@suse.de>
Detail.c
super0.c
super1.c

index 54db558b48dd8664f9f660d3a3a25642ecc32e8e..e3bcfc4e17e9df7c5f5b234096301330236df4da 100644 (file)
--- a/Detail.c
+++ b/Detail.c
@@ -312,6 +312,10 @@ int Detail(char *dev, int brief, int export, int test, char *homehost)
                        c = map_num(r5layout, array.layout);
                        printf("         Layout : %s\n", c?c:"-unknown-");
                }
+               if (array.level == 6) {
+                       c = map_num(r6layout, array.layout);
+                       printf("         Layout : %s\n", c?c:"-unknown-");
+               }
                if (array.level == 10) {
                        printf("         Layout :");
                        print_r10_layout(array.layout);
index 3f02ed403435bcaf4c5196e931539627c7ba8495..60c51454bf80ae03a756491d19b6270ccaa229ef 100644 (file)
--- a/super0.c
+++ b/super0.c
@@ -154,6 +154,10 @@ static void examine_super0(struct supertype *st, char *homehost)
                                c = map_num(r5layout, sb->new_layout);
                                printf("     New Layout : %s\n", c?c:"-unknown-");
                        }
+                       if (sb->level == 6) {
+                               c = map_num(r6layout, sb->new_layout);
+                               printf("     New Layout : %s\n", c?c:"-unknown-");
+                       }
                        if (sb->level == 10) {
                                printf("     New Layout : near=%d, %s=%d\n",
                                       sb->new_layout&255,
@@ -187,6 +191,10 @@ static void examine_super0(struct supertype *st, char *homehost)
                c = map_num(r5layout, sb->layout);
                printf("         Layout : %s\n", c?c:"-unknown-");
        }
+       if (sb->level == 6) {
+               c = map_num(r6layout, sb->layout);
+               printf("         Layout : %s\n", c?c:"-unknown-");
+       }
        if (sb->level == 10) {
                printf("         Layout :");
                print_r10_layout(sb->layout);
index 35ef771a613c9b29db436737ae621a9ada692822..7683f1e7ef15bb209771eecae9a934545d5c3e8b 100644 (file)
--- a/super1.c
+++ b/super1.c
@@ -305,6 +305,10 @@ static void examine_super1(struct supertype *st, char *homehost)
                                c = map_num(r5layout, __le32_to_cpu(sb->new_layout));
                                printf("     New Layout : %s\n", c?c:"-unknown-");
                        }
+                       if (__le32_to_cpu(sb->level) == 6) {
+                               c = map_num(r6layout, __le32_to_cpu(sb->new_layout));
+                               printf("     New Layout : %s\n", c?c:"-unknown-");
+                       }
                        if (__le32_to_cpu(sb->level) == 10) {
                                printf("     New Layout :");
                                print_r10_layout(__le32_to_cpu(sb->new_layout));
@@ -336,6 +340,10 @@ static void examine_super1(struct supertype *st, char *homehost)
                c = map_num(r5layout, __le32_to_cpu(sb->layout));
                printf("         Layout : %s\n", c?c:"-unknown-");
        }
+       if (__le32_to_cpu(sb->level) == 6) {
+               c = map_num(r6layout, __le32_to_cpu(sb->layout));
+               printf("         Layout : %s\n", c?c:"-unknown-");
+       }
        if (__le32_to_cpu(sb->level) == 10) {
                int lo = __le32_to_cpu(sb->layout);
                printf("         Layout :");