summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2010-06-15 18:41:57 -0700
committerDan Williams <dan.j.williams@intel.com>2010-06-15 18:41:57 -0700
commit0d80bb2f97e876379fb0ba732e8e97894ebe3de9 (patch)
tree63e49ff857a09388099809fdcfc575ae3661c605
parent0bd16cf2173695726f1ed2f9372c613003d80f9a (diff)
downloadmdadm-0d80bb2f97e876379fb0ba732e8e97894ebe3de9.zip
mdadm-0d80bb2f97e876379fb0ba732e8e97894ebe3de9.tar.gz
mdadm-0d80bb2f97e876379fb0ba732e8e97894ebe3de9.tar.xz
imsm: dump each disk's view of the slot state
Allow --examine to determine which disk might have a stale view of the per-disk out-of-sync state. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
-rw-r--r--super-intel.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/super-intel.c b/super-intel.c
index e212d9a..b88e6a9 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -641,7 +641,7 @@ static __u64 blocks_per_migr_unit(struct imsm_dev *dev);
static void print_imsm_dev(struct imsm_dev *dev, char *uuid, int disk_idx)
{
__u64 sz;
- int slot;
+ int slot, i;
struct imsm_map *map = get_imsm_map(dev, 0);
__u32 ord;
@@ -650,6 +650,12 @@ static void print_imsm_dev(struct imsm_dev *dev, char *uuid, int disk_idx)
printf(" UUID : %s\n", uuid);
printf(" RAID Level : %d\n", get_imsm_raid_level(map));
printf(" Members : %d\n", map->num_members);
+ printf(" Slots : [");
+ for (i = 0; i < map->num_members; i++) {
+ ord = get_imsm_ord_tbl_ent(dev, i);
+ printf("%s", ord & IMSM_ORD_REBUILD ? "_" : "U");
+ }
+ printf("]\n");
slot = get_imsm_disk_slot(map, disk_idx);
if (slot >= 0) {
ord = get_imsm_ord_tbl_ent(dev, slot);