NeilBrown de01dfadf2 md: Ensure an md array never has too many devices.
Each different metadata format supported by md supports a
different maximum number of devices.
We really should be enforcing this maximum in the kernel, but
we aren't quite doing that properly.

We currently only enforce it at the 'hot_add' point, which is an
older interface which is not used by current userspace.

We need to also enforce it at 'add_new_disk' time for active arrays
and at 'do_md_run' time when starting a new array.

So move the test from 'hot_add' into 'bind_rdev_to_array' which is
called from both 'hot_add' and 'add_new_disk, and add a new
test in 'analyse_sbs' which is called from 'do_md_run'.

This bug (or missing feature) has been around "forever" and so
the patch is suitable for any -stable that is currently maintained.

Cc: stable@kernel.org

Signed-off-by: NeilBrown <neilb@suse.de>
2009-02-06 18:02:46 +11:00
..
2006-01-01 22:21:50 +01:00
2007-10-20 02:01:11 +01:00
2005-04-16 15:20:36 -07:00
2009-01-06 03:05:10 +00:00
2008-10-21 17:44:59 +01:00
2009-01-06 03:05:01 +00:00
2009-01-06 03:05:12 +00:00
2009-01-06 03:05:10 +00:00
2007-10-20 02:01:26 +01:00
2009-01-06 03:05:12 +00:00
2009-01-06 03:05:12 +00:00
2008-02-06 10:41:18 -08:00
2005-09-17 11:49:58 -07:00
2005-04-16 15:20:36 -07:00
2007-10-29 07:41:32 -07:00
2005-04-16 15:20:36 -07:00
2007-10-29 07:41:32 -07:00
2007-10-29 07:41:32 -07:00
2007-10-29 07:41:32 -07:00
2005-04-16 15:20:36 -07:00