NeilBrown 02e5f5c0a0 md: fix calculation of stacking limits on level change.
The various ->run routines of md personalities assume that the 'queue'
has been initialised by the blk_set_stacking_limits() call in
md_alloc().

However when the level is changed (by level_store()) the ->run routine
for the new level is called for an array which has already had the
stacking limits modified.  This can result in incorrect final
settings.

So call blk_set_stacking_limits() before ->run in level_store().

A specific consequence of this bug is that it causes
discard_granularity to be set incorrectly when reshaping a RAID4 to a
RAID0.

This is suitable for any -stable kernel since 3.3 in which
blk_set_stacking_limits() was introduced.

Cc: stable@vger.kernel.org (3.3+)
Reported-and-tested-by: "Baldysiak, Pawel" <pawel.baldysiak@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
2013-11-14 15:16:15 +11:00
..
2013-11-01 08:24:41 +01:00
2013-10-19 13:05:38 -07:00
2013-10-28 14:39:03 -07:00
2013-11-11 17:05:37 +09:00
2013-10-19 13:02:47 -07:00
2013-11-11 17:34:56 +09:00
2013-11-11 17:05:37 +09:00
2013-09-26 20:47:25 -07:00
2013-11-11 17:34:56 +09:00
2013-10-31 15:28:23 -07:00
2013-11-07 15:07:58 +09:00
2013-11-11 16:42:43 +09:00
2013-11-11 16:42:43 +09:00
2013-11-11 16:42:43 +09:00
2013-10-19 13:05:38 -07:00
2013-11-11 17:05:37 +09:00
2013-10-24 16:18:40 +01:00
2013-10-01 22:06:15 +01:00
2013-11-07 09:41:06 +09:00
2013-11-11 17:34:56 +09:00
2013-10-29 16:58:18 -07:00