From f54e6321a2efa01ea22cd6538c1e0e00b38c01fd Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 24 Jul 2008 17:26:24 -0700 Subject: [PATCH] imsm: use component_size not total array size in container_content_imsm Also kill setting ->array.size as nothing appears to be using it. Signed-off-by: Dan Williams --- super-intel.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/super-intel.c b/super-intel.c index 44958e4..7ff6d8b 100644 --- a/super-intel.c +++ b/super-intel.c @@ -1683,7 +1683,6 @@ static struct mdinfo *container_content_imsm(struct supertype *st) struct imsm_vol *vol = &dev->vol; struct imsm_map *map = vol->map; struct mdinfo *this; - __u64 sz; int slot; this = malloc(sizeof(*this)); @@ -1714,11 +1713,7 @@ static struct mdinfo *container_content_imsm(struct supertype *st) memset(this->uuid, 0, sizeof(this->uuid)); - sz = __le32_to_cpu(dev->size_high); - sz <<= 32; - sz += __le32_to_cpu(dev->size_low); - this->component_size = sz; - this->array.size = this->component_size / 2; + this->component_size = __le32_to_cpu(map->blocks_per_member); for (slot = 0 ; slot < map->num_members; slot++) { struct imsm_disk *disk;