diff options
author | Dan Williams <dan.j.williams@intel.com> | 2008-11-04 20:50:39 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2008-11-04 20:50:39 +1100 |
commit | 44470971ce9f1467c0eed4c5ec94acfc8eab4c68 (patch) | |
tree | 3a93ecb56f911d5dabd4dbbf753448c754655298 /super-intel.c | |
parent | 197e3eb690a1088d3572d96e28ad79228a91f766 (diff) | |
download | mdadm-44470971ce9f1467c0eed4c5ec94acfc8eab4c68.tar.gz mdadm-44470971ce9f1467c0eed4c5ec94acfc8eab4c68.tar.xz mdadm-44470971ce9f1467c0eed4c5ec94acfc8eab4c68.zip |
imsm: display member array uuid in examine_super_imsm
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super-intel.c')
-rw-r--r-- | super-intel.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/super-intel.c b/super-intel.c index 7ecc09f..eca1de7 100644 --- a/super-intel.c +++ b/super-intel.c @@ -482,9 +482,7 @@ static __u32 imsm_reserved_sectors(struct intel_super *super, struct dl *dl) } #ifndef MDASSEMBLE -static void getinfo_super_imsm(struct supertype *st, struct mdinfo *info); - -static void print_imsm_dev(struct imsm_dev *dev, int index) +static void print_imsm_dev(struct imsm_dev *dev, char *uuid, int disk_idx) { __u64 sz; int slot; @@ -493,10 +491,11 @@ static void print_imsm_dev(struct imsm_dev *dev, int index) printf("\n"); printf("[%.16s]:\n", dev->volume); + printf(" UUID : %s\n", uuid); printf(" RAID Level : %d\n", get_imsm_raid_level(map)); printf(" Members : %d\n", map->num_members); for (slot = 0; slot < map->num_members; slot++) - if (index == get_imsm_disk_idx(dev, slot)) + if (disk_idx== get_imsm_disk_idx(dev, slot)) break; if (slot < map->num_members) { ord = get_imsm_ord_tbl_ent(dev, slot); @@ -556,6 +555,8 @@ static void print_imsm_disk(struct imsm_super *mpb, int index, __u32 reserved) human_size(sz * 512)); } +static void getinfo_super_imsm(struct supertype *st, struct mdinfo *info); + static void examine_super_imsm(struct supertype *st, char *homehost) { struct intel_super *super = st->sb; @@ -595,8 +596,15 @@ static void examine_super_imsm(struct supertype *st, char *homehost) printf(" Spare Blocks : %d\n", __le32_to_cpu(log->reserved_spare_block_count)); printf(" First Spare : %llx\n", __le64_to_cpu(log->first_spare_lba)); } - for (i = 0; i < mpb->num_raid_devs; i++) - print_imsm_dev(__get_imsm_dev(mpb, i), super->disks->index); + for (i = 0; i < mpb->num_raid_devs; i++) { + struct mdinfo info; + struct imsm_dev *dev = __get_imsm_dev(mpb, i); + + super->current_vol = i; + getinfo_super_imsm(st, &info); + fname_from_uuid(st, &info, nbuf, '-'); + print_imsm_dev(dev, nbuf + 5, super->disks->index); + } for (i = 0; i < mpb->num_disks; i++) { if (i == super->disks->index) continue; @@ -604,8 +612,6 @@ static void examine_super_imsm(struct supertype *st, char *homehost) } } -static void getinfo_super_imsm(struct supertype *st, struct mdinfo *info); - static void brief_examine_super_imsm(struct supertype *st) { /* We just write a generic IMSM ARRAY entry */ @@ -627,7 +633,8 @@ static void brief_examine_super_imsm(struct supertype *st) super->current_vol = i; getinfo_super_imsm(st, &info); fname_from_uuid(st, &info, nbuf1,'-'); - printf("ARRAY /dev/md/%.16s container=%s member=%d auto=mdp UUID=%s\n", + printf("ARRAY /dev/md/%.16s container=%s\n" + " member=%d auto=mdp UUID=%s\n", dev->volume, nbuf + 5, i, nbuf1 + 5); } } |