]> git.ipfire.org Git - thirdparty/mdadm.git/commit - super-ddf.c
DDF: fix detection of failed devices during assembly.
authorNeilBrown <neilb@suse.de>
Mon, 20 Jan 2014 04:27:29 +0000 (15:27 +1100)
committerNeilBrown <neilb@suse.de>
Mon, 20 Jan 2014 04:27:29 +0000 (15:27 +1100)
commitf0e876ce03a63f150bb87b2734c139bc8bb285b2
tree20e58a8eb0db2622e0c5912f83ba55e2d20fda14
parent284546ef89168c9003da192a177cae774199f889
DDF: fix detection of failed devices during assembly.

When we call "getinfo_super", we report the working/failed status
of the particular device, and also (via the 'map') the working/failed
status of every other device that this metadata is aware of.

It is important that the way we calculate "working or failed" is
consistent.
As it is, getinfo_super_ddf() will report a spare as "working", but
every other device will see it as "failed", which leads to failure to
assemble arrays with spares.

For getinfo_super_ddf (i.e. for the container), a device is assumed
"working" unless flagged as DDF_Failed.
For getinfo_super_ddf_bvd (for a member array), a device is assumed
"failed" unless DDF_Online is set, and DDF_Failed is not set.

Reported-by: "David F." <df7729@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
super-ddf.c