Patent ID: 8144414

Claim:
A computer-implemented method for writing data on multitrack tape in a tape drive, said method comprising: partitioning said data into m(2 n +k) data blocks, wherein each data block has a logical array of rows and columns of data bytes and wherein m and n are positive integers and k is initially an integer f 0; error-correction coding a first row and a first column of said logical array of said data block to produce an encoded block; assigning said first error-correction coded row of said encoded block to a respective location in a logical interleave array having L rows and 2 n +k columns of locations; writing a sequence of said first error-correction coded row and another error-correction coded row assigned to respective columns of said 2 n +k columns of said logical interleave array simultaneously in respective data tracks on said multitrack tape; assigning a respective block number (N b ) to a m(2 n +k) number of said encoded blocks, wherein N b =0, 1, 2, . . . , m(2 n +k)−1; and assigning a respective row number (N r ) to said first error-correction coded row of said encoded block, wherein N r =0, 1, 2, . . . , N 2 −1 and wherein N 2 is the number of all error-correction coded rows in said encoded block, wherein the step of assigning said first error-correction coded row of said encoded block to a respective location in a logical interleave array is performed such that: (i) the minimum Euclidean distance on said multitrack tape between said first error-correction coded row of said encoded block and said another error-correction coded row of said encoded block is maximized, and (ii) the following equation N b +m(2 n +k)N r =mod(r,m)+m(2 n +k)*floor(r/m)+m*mod(t−p*mod(floor(r/m), 2 n +k), 2 n +k) is satisfied, wherein r is a row in said respective location in said logical interleave array and r≧0 and r≦L−1, wherein t is a column in said respective location in said logical interleave array and t≧0 and t≦(2 n +k)−1, and wherein p is a positive integer satisfying gcd(p, 2 n +k)=1, wherein the value of p is selected to maximize said minimum Euclidean distance.