Patent ID: 8458580

Claim:
A magnetic disk controller for controlling writing of data into a magnetic disk, comprising: an encoding unit that encodes a plurality of pieces of writing data into a plurality of encoded pieces of writing data; an error check code generating unit that generates error check codes associated with the encoded pieces of writing data; a first buffer that stores a first encoded piece of writing data and a first error check code associated with the first encoded piece, wherein the first encoded piece is encoded by the encoding unit from a first piece of writing data, and wherein the first error check code is generated by the error check code generating unit; a second buffer that stores a second encoded piece of writing data and a second error check code associated with the second encoded piece, wherein the second encoded piece is encoded by the encoding unit from a second piece of writing data, and wherein the second error check code is generated by the error check code generating unit; and a buffer control unit that, in a first period, concurrently with storing the first encoded piece and the first error check code into the first buffer, stores the second piece of writing data into the second buffer, and in a second period following the first period, concurrently with a writing of the first encoded piece and the first error check code from the first buffer into a first sector of the magnetic disk, stores the second encoded piece and the second error check code into the second buffer, replacing the second piece of writing data.