NeilBrown: Examine/Detail: report raid6 layout

Martin F. Krafft madduck at alioth.debian.org
Wed Jan 27 02:00:47 UTC 2010


Module: mdadm
Branch: build
Commit: fe77a154b1be42c65f15f0dad363f100de923489
URL:    http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=fe77a154b1be42c65f15f0dad363f100de923489

Author: NeilBrown <neilb at suse.de>
Date:   Tue Jul 14 15:12:29 2009 +1000

Examine/Detail:  report raid6 layout

Somehow this was missing before...

Signed-off-by: NeilBrown <neilb at suse.de>

---

 Detail.c |    4 ++++
 super0.c |    8 ++++++++
 super1.c |    8 ++++++++
 3 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/Detail.c b/Detail.c
index 54db558..e3bcfc4 100644
--- 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);
diff --git a/super0.c b/super0.c
index 3f02ed4..60c5145 100644
--- 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);
diff --git a/super1.c b/super1.c
index 35ef771..7683f1e 100644
--- 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 :");




More information about the pkg-mdadm-commits mailing list