]> Pileus Git - ~andy/linux/commit
MD RAID10: Improve redundancy for 'far' and 'offset' algorithms (part 2)
authorJonathan Brassow <jbrassow@redhat.com>
Thu, 21 Feb 2013 02:28:10 +0000 (13:28 +1100)
committerNeilBrown <neilb@suse.de>
Tue, 26 Feb 2013 00:55:33 +0000 (11:55 +1100)
commit9a3152ab024867100f2f50d124b998d05fb1c3f6
tree15b97c56d117340fa5db609ced6e0d51a91f2f37
parent475901aff15841fb0a81e7546517407779a9b061
MD RAID10: Improve redundancy for 'far' and 'offset' algorithms (part 2)

MD RAID10:  Improve redundancy for 'far' and 'offset' algorithms (part 2)

This patch addresses raid arrays that have a number of devices that cannot
be evenly divided by 'far_copies'.  (E.g. 5 devices, far_copies = 2)  This
case must be handled differently because it causes that last set to be of
a different size than the rest of the sets.  We must compute a new modulo
for this last set so that copied chunks are properly wrapped around.

Example use_far_sets=1, far_copies=2, near_copies=1, devices=5:
                "far" algorithm
        dev1 dev2 dev3 dev4 dev5
==== ==== ==== ==== ====
[ A   B ] [ C    D   E ]
        [ G   H ] [ I    J   K ]
                    ...
        [ B   A ] [ E    C   D ] --> nominal set of 2 and last set of 3
        [ H   G ] [ K    I   J ]     []'s show far/offset sets

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid10.c