]> git.baikalelectronics.ru Git - kernel.git/commit
md: don't set_capacity before array is active.
authorNeilBrown <neilb@suse.de>
Wed, 16 Feb 2011 02:58:38 +0000 (13:58 +1100)
committerNeilBrown <neilb@suse.de>
Wed, 16 Feb 2011 02:58:38 +0000 (13:58 +1100)
commitb43461339d2d832826d9acbad4af7dcd8c240c61
tree03d1ae0fe73404a3bd7850d89c415f3412977693
parent23d7aa3e542ed21954e2d0238335123b62824301
md: don't set_capacity before array is active.

If the desired size of an array is set (via sysfs) before the array is
active (which is the normal sequence), we currrently call set_capacity
immediately.
This means that a subsequent 'open' (as can be caused by some
udev-triggers program) will notice the new size and try to probe for
partitions.  However as the array isn't quite ready yet the read will
fail.  Then when the array is read, as the size doesn't change again
we don't try to re-probe.

So when setting array size via sysfs, only call set_capacity if the
array is already active.

Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/md.c