The present invention relates generally to writing data to magnetic tape and, in particular, to rewriting data in the event an error is detected in the originally written data.
In the Linear Tape Open (LTO) tape drives, data packets (each of which includes a block of data and related overhead) are written on tape tracks in structures known as synchronized codeword objects (SCO). SCOs consist of two encoded data units, each with an associated header, and added synchronization patterns. The encoded data unit consists of m interleaved Reed-Solomon codewords, designated by the term Codeword Interleave-m (“CWI-m”). In LTO generations 1 to 4, m=2 and SCOs consist of two CWI-2s with the associated headers and added synchronization patterns. In LTO, a structure of two CWI-m's with the associated headers is referred to as a codeword object (“CO”). In LTO-1 to LTO-4, the minimum unit that can be written is a set of T COs, where T is the number of physical tracks on the tape that are written simultaneously.
During magnetic tape recording, errors may be detected by using a read-while-write process in which data is read and verified immediately after being written. If an error is detected, the tape drive rewrites the same data to ensure that at least one correct instance of the data exists on the tape. In the LTO 1-4 standard, because the minimum unit that can be written is a CO set, the minimum unit that can be rewritten is also a CO set. In future LTO generations, format efficiency will be improved by increasing the length of the codeword object. However, the penalty for rewriting codeword objects will increase in a corresponding manner.
For example, in a tape cartridge having an actual capacity of 1680 GB, an average of 5% of the capacity, or approximately 80 GB, may be reserved for rewriting CWI-2s, resulting in a nominal (useful) capacity of 1600 GB. If the number of SCOs which are rewritten remains the same, the space needed for the rewrites doubles to approximately 160 GB, reducing the nominal capacity of the cartridge by approximately another 80 GB to 1680−160=1520 GB. Such a loss in cartridge capacity is significant.
Method and apparatus are provided for rewriting data to magnetic tape when an error is detected in a codeword object. The method includes forming a first synchronized codeword object (SCO) having first and second encoded processed user data units and one or more sync patterns. The first SCO is one of T SCOs in a first SCO set. The first user data unit is one of T user data unit in a first user data unit set within the first SCO set and the second user data unit is one of T user data unit in a second user data unit set within the first SCO set, where T is the number of physical tracks on the tape to which data is written simultaneously. The first SCO set is written to a first position on magnetic tape and read the first SCO set after the data is written.
When an error is detected in one of the user data units, a second SCO is formed to include the user data unit set having the defective user data unit and, only if an error is not detected in a user data unit in the other user data unit set, to not include the other user data unit, the second SCO being one of T SCOs in a second SCO set. The second SCO set is then rewritten to a position on the tape later than the first position.
In some embodiments, the encoded processed user data units comprises m interleaved Reed-Solomon codewords (CWI-m) and an associated header. In some of those embodiments, m=4 or 8, although m may equal other numbers as well. In a further embodiment, the one or more sync patterns comprise a forward sync pattern before the first encoded processed user data unit, a re-sync pattern between the first and second user data units and a reverse sync pattern following the second user data unit.
Thus, the efficiency of incorporating longer user data units, such as double-length CWI-4s for example, in SCOs is preserved while reducing the penalty when data must be rewritten following the detection of an error.
Some of the functional units described in this specification have been labeled as modules in order to more particularly emphasize their implementation independence. For example, a module may be implemented as a hardware circuit comprising custom VLSI circuits or gate arrays, off-the-shelf semiconductors such as logic chips, transistors, or other discrete components. A module may also be implemented in programmable hardware devices such as field programmable gate arrays, programmable array logic, programmable logic devices or the like. Modules may also be implemented in software for execution by various types of processors. An identified module of executable code may, for instance, comprise one or more physical or logical blocks of computer instructions which may, for instance, be organized as an object, procedure, or function. A module of executable code could be a single instruction, or many instructions, and may even be distributed over several different code segments, among different programs, and across several memory devices
Furthermore, the described features, structures, or characteristics of the invention may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided, such as examples of programming, software modules, hardware modules, hardware circuits, etc., to provide a thorough understanding of embodiments of the invention. One skilled in the relevant art will recognize, however, that the invention can be practiced without one or more of the specific details, or with other methods, components and so forth. In other instances, well-known structures, materials, or operations are not shown or described in detail to avoid obscuring aspects of the invention.
When the data is read back from the tape 120, a read head 122 detects the data and passes it to a read channel. The data is then processed in a de-formatter 126 to generate codeword objects (COs) and which are error checked and verified in a verifier 128. The data is then decoded and the resulting user data is sent to the requesting host.
Turning to
While rewriting an SCO 600 of
It is important to note that while the present invention has been described in the context of a fully functioning data processing system, those of ordinary skill in the art will appreciate that the processes of the present invention are capable of being distributed in the form of a computer storage readable medium of instructions and a variety of forms and that the present invention applies regardless of the particular type of signal bearing media actually used to carry out the distribution. Examples of computer readable storage media include recordable-type media such as a floppy disk, a hard disk drive, a RAM, and CD-ROMs.
The description of the present invention has been presented for purposes of illustration and description, but is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiment was chosen and described in order to best explain the principles of the invention, the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated. Moreover, although described above with respect to methods and systems, the need in the art may also be met with a computer program product containing instructions for rewriting data to magnetic tape or a method for deploying computing infrastructure comprising integrating computer readable code into a computing system for rewriting data to magnetic tape
The present application is related to commonly-assigned and co-pending U.S. application Ser. No. ______ [IBM Docket TUC920070102US1], entitled ECC INTERLEAVING FOR MULTI-TRACK RECORDING ON MAGNETIC TAPE and Ser. No. ______ [IBM Docket TUC920070253US1], entitled REWRITE-EFFICIENT ECC/INTERLEAVING FOR MULTI-TRACK RECORDING ON MAGNETIC TAPE, both filed on the same date as the present application, which related applications are hereby incorporated herein by reference in their entireties.