]> git.baikalelectronics.ru Git - kernel.git/commit
md: integrate spares into array at earliest opportunity.
authorNeilBrown <neilb@suse.de>
Mon, 14 Dec 2009 01:50:06 +0000 (12:50 +1100)
committerNeilBrown <neilb@suse.de>
Mon, 14 Dec 2009 01:51:41 +0000 (12:51 +1100)
commitfaf2648512ca70fb9e37cc0c8271f5dcebe67e2a
tree56006efccad176da1b806978faf60d77c817e6ac
parenta4ceb2e720d54417237163b0f3589ebe354d9118
md: integrate spares into array at earliest opportunity.

As v1.x metadata can record that a member of the array is
not completely recovered, it make sense to record that a
spare has become a regular member of the array at the earliest
opportunity.
So remove the tests on "recovery_offset > 0" in super_1_sync
as they really aren't needed, and schedule a metadata update
immediately after adding spares to a degraded array.

This means that if a crash happens immediately after a recovery
starts, the new device will be included in the array and recovery will
continue from wherever it was up to.  Previously this didn't happen
unless recovery was at least 1/16 of the way through.

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