DDF: get_extents: don't allocate space on failed disks
We should skip known failed disks when allocating space for new arrays. This fixes the problem with 10ddf-fail-spare. Signed-off-by: Martin Wilck <mwilck@arcor.de> Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
6b924b1e9f
commit
60056e1c3d
|
@ -2390,6 +2390,10 @@ static struct extent *get_extents(struct ddf_super *ddf, struct dl *dl)
|
|||
struct extent *rv;
|
||||
int n = 0;
|
||||
unsigned int i;
|
||||
__u16 state = be16_to_cpu(ddf->phys->entries[dl->pdnum].state);
|
||||
|
||||
if ((state & (DDF_Online|DDF_Failed|DDF_Missing)) != DDF_Online)
|
||||
return NULL;
|
||||
|
||||
rv = xmalloc(sizeof(struct extent) * (ddf->max_part + 2));
|
||||
|
||||
|
|
Loading…
Reference in New Issue