summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2006-06-26 12:26:01 +1000
committerNeil Brown <neilb@suse.de>2006-06-26 12:26:01 +1000
commitc3684618b7cc50a12a651bf2f83f62b24ba95bcd (patch)
tree5519331310e9a1bb678a6bf3463cb678b41f6fd3
parent38dbfd8a8ff75e97d89b1862db6ef821810fc3c2 (diff)
downloadmdadm-c3684618b7cc50a12a651bf2f83f62b24ba95bcd.tar.gz
mdadm-c3684618b7cc50a12a651bf2f83f62b24ba95bcd.tar.xz
mdadm-c3684618b7cc50a12a651bf2f83f62b24ba95bcd.zip
Add 'Array Slot' line to --examine for version-1 superblocks
to make it a bit easier to see what is happening.
-rw-r--r--ChangeLog2
-rw-r--r--super1.c12
2 files changed, 14 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 4c45f55..c6b1a13 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@ Changes Prior to this release
- Fix problem with compiling with gcc-2 compilers
- Fix compile problem of post-incrmenting a variable in a macro arg.
- Stop map_dev from returning [0:0], as that breaks things.
+ - Add 'Array Slot' line to --examine for version-1 superblocks
+ to make it a bit easier to see what is happening.
Changes Prior to 2.5.1 release
- Various fixes for gcc warnings
diff --git a/super1.c b/super1.c
index bcfe573..6862155 100644
--- a/super1.c
+++ b/super1.c
@@ -277,6 +277,18 @@ static void examine_super1(void *sbv, char *homehost)
default: break;
}
printf("\n");
+ printf(" Array Slot : %d (", __le32_to_cpu(sb->dev_number));
+ for (i= __le32_to_cpu(sb->max_dev); i> 0 ; i--)
+ if (__le16_to_cpu(sb->dev_roles[i-1]) != 0xffff)
+ break;
+ for (d=0; d < i; d++) {
+ int role = __le16_to_cpu(sb->dev_roles[d]);
+ if (d) printf(", ");
+ if (role == 0xffff) printf("empty");
+ else if(role == 0xfffe) printf("failed");
+ else printf("%d", role);
+ }
+ printf(")\n");
printf(" Array State : ");
for (d=0; d<__le32_to_cpu(sb->raid_disks); d++) {
int cnt = 0;