]> git.baikalelectronics.ru Git - kernel.git/commit
md/raid10: fix "enough" function for detecting if array is failed.
authorNeilBrown <neilb@suse.de>
Thu, 27 Sep 2012 02:35:21 +0000 (12:35 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 27 Sep 2012 02:35:21 +0000 (12:35 +1000)
commitf2095d707e48e65a267fca1247fb9928853d486a
tree5c2e31a8cbbfabf83d4251c8299ade26934f79fb
parent3378addee948bc208b2898904550b499cc69b1db
md/raid10: fix "enough" function for detecting if array is failed.

The 'enough' function is written to work with 'near' arrays only
in that is implicitly assumes that the offset from one 'group' of
devices to the next is the same as the number of copies.
In reality it is the number of 'near' copies.

So change it to make this number explicit.

This bug makes it possible to run arrays without enough drives
present, which is dangerous.
It is appropriate for an -stable kernel, but will almost certainly
need to be modified for some of them.

Cc: stable@vger.kernel.org
Reported-by: Jakub Husák <jakub@gooseman.cz>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid10.c