Bug in RAID10 'enough' when far_copies=2?
"Wesley W. Terpstra" <[email protected]>
| Newsgroups | gmane.linux.raid |
|---|---|
| Message-ID | <CAA-O0XhEPBYb92+b99UnRpBP2z10fGiqAGrtvkK8A9ihtA=Qzg@mail.gmail.com> |
Consider an array with raid_disks=4, near_copies=1, far_copies=2. The function "enough" in raid10.c requires all four of these equations to be true: Eqn0 := 0 || 1 // device 0 or 1 is present Eqn1 := 1 || 2 Eqn2 := 2 || 3 Eqn3 := 3 || 0 This behavior is specific to far_copies=2. When near_copies=2, only Eqn0 and Eqn2 are required. The documentation claims that for this configuration, the layout is: A1 A2 A3 A4 A5 A6 A7 A8 .. .. .. .. A2 A1 A4 A3 A6 A5 A8 A7 In this situation, the array should NOT be possible to reassemble from (0, 1) or (2, 3). The 'enough' function rejects those; Eqn2 and Eqn0 fail respectively. The 'enough' function accepts (0, 2) and (1, 3), which seems correct. However, the 'enough' function REJECTS (1, 2) and (0, 3) due to Eqn3 and Eqn1 respectively. According to the documented layout, 'enough' should accept these configurations.