]> git.ipfire.org Git - thirdparty/mdadm.git/commit - mdadm.h
imsm: create mdinfo list of disks in a container from supertype
authorAnna Czarnowska <anna.czarnowska@intel.com>
Mon, 22 Nov 2010 09:58:07 +0000 (20:58 +1100)
committerNeilBrown <neilb@suse.de>
Mon, 22 Nov 2010 09:58:07 +0000 (20:58 +1100)
commit5c4cd5da70b4ed1a5518caa234c38eab502a37e4
tree24b55b918b0873594dff65d974902a71ce64172c
parentc3621c0a5fe2344681388cf0439bdf978736d2a6
imsm: create mdinfo list of disks in a container from supertype

If getinfo_super is called on a container supertype we only get information
on first disk. As a parameter it uses reference to preallocated
mdinfo structure. Amending getinfo_super to return full list of disks
would require ammending all previous calls and subsequently freeing memory
allocated for mdinfo list.
Function container_content that returns a mdinfo list is written
specifically for assembly, performing actions not needed to just fill
mdinfo. It also does not include spares so is unsuitable.
As an alternative a new function getinfo_super_disks is created
to obtain information about all disks states in array.
Existing function sysfs_free is used to free memory
allocated by getinfo_super_disks.

Signed-off-by: Anna Czarnowska <anna.czarnowska@intel.com>
Signed-off-by: Marcin Labun <marcin.labun@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
mdadm.h
super-intel.c