]> git.ipfire.org Git - thirdparty/mdadm.git/commit
DDF: fix removal of failed devices.
authorNeilBrown <neilb@suse.de>
Mon, 5 Aug 2013 04:56:23 +0000 (14:56 +1000)
committerNeilBrown <neilb@suse.de>
Mon, 5 Aug 2013 05:10:05 +0000 (15:10 +1000)
commit92939eb29175a0dc7c9c46ff70f95b76b693b796
treeb3da94274774a499d1699c8fd636bd7cd8bc6e52
parent9540cc244dfc56d40f686d8f63aa5b6d73663bcf
DDF: fix removal of failed devices.

Commit c7079c84 arrange for DDF to forget about any device
that is failed and not still marked as part of any array.

However such devices could still be part of the container and this
removal and updating of 'pdnum' can result in multiple devices having
the same pdnum.  This in turn easily leads to confusion and
corruption.

So only discard pd entries for devices which are failed, not listed in
any virtual device, and for which we don't have a handle on the
device.

pd entries will not get removed until a new device is added after
the device has been removed from the container, either by
"mdadm --remove" or by assembling without the failed devices.

Reported-by: Albert Pauw <albert.pauw@gmail.com>
Analysed-by: Martin Wilck <mwilck@arcor.de>
Signed-off-by: NeilBrown <neilb@suse.de>
super-ddf.c