Method and apparatus for encoding magnetic disk sector addresses

Abstract: A method for locating data sectors on a magnetic disk during sector seeking operations comprising the steps of: encoding the addresses of the sectors to produce sector address code words; encoding said sector address code words to produce sector header code words; recording said sector header code words in the sectors during the formatting of the disk; reading said sector header code word from the sector rotating under the head and decoding said sector header code word to form said sector address code word; encoding the specified address of the sector to be located in the same manner of step A to produce a specified address code words; comparing said sector address code word read from a disk sector with said specified address code word; if the comparison results in a number of symbols which differ between said address code word and said specified address code word which is less than a predetermined number, identifying the sector as the correct sector; or if the comparison results in a number of symbols which differ which is greater than said predetermined number, not identifying the sector as the correct sector.

Description: Field of Invention This invention relates to computer systems in general and more particularly to methods for locating stored data on a magnetic disk. Description of the Prior Art Computer systems often use peripheral storage devices, such as magnetic disks, to store data. The data is stored on the disks in circular tracks. Each track is divided into a number of sectors usually consisting of either 512 or 576 bytes, that is, eight-bit symbols. Each sector, in turn, consists of two sections, an address section and a data section. The sector is uniquely identified by address symbols which are stored in the address section of the sector when the disk is formatted. The disk drive has a read/write head which must be over a sector to perform a storage of retrieval ("write" or "read") operation in the sector. Thus the address of the sector rotating under the head is read and a determination is made whether or not the sector is the correct sector. This must be done in the time it takes the address portion of the sector to rotate under the read/write head. That is, if the drive is to perform a read or write operation in the sector, it must be ready to do so when the data portion of the sector, which closely follows the address portion, rotates under the head. In order to determine if a sector is the correct sector, the drive reads the sector address and then compares it with the specified address of the sector in which data is to be read or written. If the addresses match, the data will be read from or written to the sector. If an address read from a sector has errors in it, the sector may be mistakenly identified as another sector. Thus the disk drive may determine that the head is located over sector 100 when it is actually located over sector 101, and the read or write operation that is to occur at sector 100 will be performed on the wrong sector. If a sector address contains several errors or the address is corrupted due to a medium defect or soft error in the disk, the sector address may be unreadable. Thus the sector cannot be identified and it is unusable. In order to avoid misinterpreting the address of a sector, the sector addresses must be written on the disk in such a way that even with a number of errors in the address, it will neither be read as the address of a different sector nor be rendered unidentifiable. In a prior method for coping with errors in a sector address, the address is recorded several times in succession. The specified sector address is compared with each copy of the address stored in the sector, and if some minimum number of stored addresses match the specified address the sector is determined to be the correct sector. Thus, if one of the copies of the address contains an error, the sector will still be identifiable. The arrangement is feasible only if the system error rate is fairly low. Otherwise, the number of copies of the address that will be required in each sector to ensure some minimum number of error-free copies with a reasonable degree of certainty will be prohibitive due to the amount of storage space the addresses will occupy. Another problem that can occur in reading a sector address is that the system can momentarily lose synchronization between sectors and thereby fail to sense correctly the beginning of an address section of a sector. It may therefore sense the wrong bits in reading the sector address. If this occurs, data may be read from or written to the wrong sector. The use of multiple copies of the sector address does not prevent the drive from identifying the wrong sector due to mis-synchronization. If the disk drive interprets a data symbol of one or two bits "off" as a correct sector address, the next few copies of the address will also be incorrectly interpreted and the wrong sector can be identified. If the data is then written to the wrong sector, any data previously recorded in the sector is written over and thus lost. The data that is newly written to the wrong sector is also lost because it cannot later be retrieved at the appropriate address. Thus mistakes in interpreting the sector addresses, due either to errors in the recorded sector addresses or mis-synchronization of the read/write head, can be costly in terms of lost data and/or lost time. In EP-A-0248536 there is described a method of seeking a target address on a recording medium. This method uses a single encoding operation to generate and append redundancy symbols to sector addresses to form code words to be recorded on the medium. On retrieval, the method determines that a read sector is the target sector if the retrieved code word and the target code word differ by not more than the number of symbols which the system can correct. There is no protection provided for incorrect identification of a sector caused by mis-synchronisation. Patent Abstracts of Japan, Vol. 12, No. 173 & JP-A-62283475 descibes a similar technique with the same drawbacks as indicated above. Summary of the Invention Claims 1 and 6, respectively, define a method and an apparatus in accordance with the invention. The sector addresses, which are typically represented by six data symbols, are encoded over a Galois Field GF(2 p ) using a large distance, "d", Reed-Solomon code, that is, a code that will encode the sector addresses to produce code words which vary by at least d symbols for any two different encoded addresses. Specifically, the result of the encoding is a set of redundancy symbols, which are usually associated with error correction. The redundancy symbols are appended to the address symbols to produce address code words. Just as each sector address is unique, that is, identifies only one sector, each address code word is unique. The advantage of encoding the sector address is that each address code word differs from any other address code word by at least d symbols. Thus an address code word read from the disk can contain up to (d-1)/2 errors and still be identified as the correct sector address because it most closely resembles only one address code word. If a head is not synchronized correctly with the address section of the sector, the address code word can be misinterpreted. That is, the portion of the address code word read from the address portion of the section will be concatenated with the appropriate number of bits preceding the address code word or following the address code word, depending on how the head is mis-synchronized, and the resulting string of bits will be interpreted as an address code word. The result may be that the sector is incorrectly identified. In order to prevent this, the address code words are further encoded by adding them to a coset leader to produce header code words. The coset leader is a code word of a super-code of the Reed-Solomon code, that is, the generator polynomial for the code containing the coset leader is a factor of the generator polynomial for the Reed-Solomon code, but the coset leader is not a code word of the Reed-Solomon code itself. The header code words are then recorded in the address portions of the sectors. When a header code word is read from a sector, the coset leader is subtracted from the header code word to produce an address code word. If the head is synchronized incorrectly with the address portion of a sector, the comparison of the resulting address code word with the address code word for the specified address will always result in more than (d-1)/2 symbols which differ between the two code words and the sector will not be treated as the specified address. Brief Description of the Drawings This invention is pointed out with particularity in the appended claims. The above and further advantages of this invention may be better understood by referring to the following description taken in conjunction with the accompanying drawings, in which: Figure 1 is a flow chart of the steps involved in the operation of the preferred embodiment; Figures 2A and 2B are a flow chart of the steps involved in the start-up operation of the preferred embodiment; and Figure 3 is an illustration of the address section of a sector. Detailed Description It should be understood that all addition, subtraction and multiplication operations performed during the encoding and comparison processes are Galois Field operations and the Galois Fields are of the form GF(2 p ). With reference to Figure 1, a sector address in an exemplary system is encoded over a Galois Field GF(2⁵) to produce redundancy symbols (step 10), using the generator polynomial g(x)=(x+α⁻¹²)*(x+α⁻¹¹)*(x+α⁻¹⁰)*...*(x+α¹⁰)*(x+α¹¹)*(x+α¹²) where α is the primitive element of the field and the field is based on the primitive polynomial p(x) = x⁵ + x² + 1. Thus the generator polynomial is x²⁵ + α²²x²⁴+ α²¹x²³+ α²⁵x²²+ α¹³x²¹+ α²⁸x²⁰+ α²x¹⁹+ α¹⁶x¹⁸+ α²³x¹⁷+ α²x¹⁶ + α⁴x¹⁵+ α⁷x¹⁴+ α²⁷x¹³+ α²⁷x¹² + α⁷x¹¹+ α⁴x¹⁰+ α²x⁹+ α²³x⁸+ α¹⁶x⁷+α²x⁶+ α²⁸x⁵+ α¹³x⁴+ α²⁵x³+ α²¹x²+ α²²x+ α⁰ The redundancy symbols are then appended to the sector address to form address code words (step 12). This generator polynomial is a distance twenty-six Reed-Solomon code generator polynomial that can correct up to twelve errors. The distance of a Reed-Solomon code is the minimum number of symbols that are dissimilar between any two code words. If two code words generated by a distance twenty-six Reed-Solomon code are compared, at least twenty-six of the symbols in the code words will not be the same. A code word in a distance twenty-six code and containing twelve or fewer errors can therefore be identified as the correct code word. The code word can be so identified because, with twelve or fewer errors, it is "closest" to, that is, has the largest number of symbols the same as, the correct code word. In the present system, this principle is applied to the sector-seeking operation by comparing, symbol by symbol, the address code word read from the disk with the address code word for a specified address (steps 18-22). If the two code words differ in twelve [(d-1)/2] or fewer symbols, the sector is the specified sector; otherwise, it is determined not to be the specified sector (steps 24-28). Comparing the sector address code word with a specified address code word to determine the number of symbols that differ is much faster than conventional decoding and error correction techniques. Thus, using the comparison method, sector identification can be completed in time to perform a read or write operation in the data section of the sector if the sector is identified as the correct sector. Encoding the sector addresses into address code words does not necessarily prevent an address from being misinterpreted if the head is mis-synchronized with the address portion of a sector. If the head is mis-synchronized with a sector address code by some number, m, bits, the portion of the address code read from the sector is concatenated with m bits immediately preceding or following the address code, depending on how the head is mis-synchronized. This may result in an address code for one of the other sectors. Thus the sector could be incorrectly identified as the sector specified for a read or write operation. To avoid the mis-identification because of mis-synchronization, the redundancy symbols are further encoded by adding them to a coset leader to produce another set of redundancy symbols (step 14). The coset leader chosen is a code word of a super-code of the Reed-Solomon code. The coset leader chosen depends on the primitive polynomial used to generate the Galois Field. In the example described herein, the coset leader, β, is x²⁴ + α³⁰x²³+ α¹x²²+ α¹²x²¹+ α²¹x²⁰ + α⁴x¹⁹+ α¹⁰x¹⁸+ α³x¹⁷+ α³x¹⁶+ α¹⁰x¹⁵ + α⁴x¹⁴+ α²¹x¹³+ α¹²x¹²+ α¹x¹¹+ α³⁰x¹⁰+ x⁹ The coset leader is added to the redundancy symbols in the sector address code word. Thus the sector address symbols are not effected. Considering all possible address code words as a group, adding the coset leader to the redundancy symbols in the code word, in effect, shifts the entire group by an amount β. When the coset leader is later subtracted from the redundancy symbols, the code words are are shifted back by the same amount β to the original address code words. If, however, a code word is misread due to a mis-synchronization of the head, the result of subtracting the coset leader from the redundancy symbols will in no case result in the address code word for the specified sector. The new set of redundancy symbols resulting from coset leader addition are appended to the sector address to form header code words (step 14). These header code words are written in the address portion of the sectors during the formatting of the disk (step 16). When a disk drive is to perform a read or write operation in a particular sector, the specified address of the sector is encoded to form an address code word as described above. The header code word of the sector rotating under the read/write head is read and the coset leader is subtracted, that is, it is again exclusive OR'd with the header code word (step 20). The resulting sector address code word is then compared with the address code for the specified sector address as set forth above to ascertain whether or not the sector is the specified sector (steps 22-28). If the head is over the wrong sector, or if the head is over the right sector but is mis-synchronized with the address portion of the sector, the comparison will result in at least thirteen symbols which differ and the sector will not be identified as the specified sector. It will be appreciated by those skilled in the art that the same result may be achieved by adding the coset leader to the address code word for the specified address to form a specified header code word and then comparing this header code word with the header code word read from the disk. When the disk drive is powered-up, that is, when the drive is made available to perform read or write operations, the drive must accurately locate the position of the head relative to the disk before any read or write operations can be performed. Therefore the system must read the header code of the sector rotating under the head and correctly interpret the code. If there are errors in the header code word, the sector might be identified incorrectly. Thus the system must first determine if there are errors in the address portion of the header code word, and if there are errors it corrects them, if possible, by means of error correction techniques. Preferably a technique known as permutation decoding is used to "decode" the sector address code word, that is, the header code word with the coset leader subtracted from it, to determine if there are any errors in the sector address and to correct them. Permutation decoding is an uncomplicated, fast error correction technique which is suitable for codes with high redundancy, i.e., codes which have a large number of redundancy symbols to correct a small number of errors. That is, permutation decoding corrects fewer errors for a given number of redundancy symbols than do other, more complicated error correction techniques. However, permutation decoding is preferred here because the address code words in fact contain a large number (e.g. twenty-five) redundancy symbols for the sector-seeking operation, as described above. There are thirty-one symbols in an address code word, six address symbols and twenty-five redundancy symbols; up to five erroneous symbols, which is a relatively large fraction of the code word symbols, can be corrected using permutation decoding. The method of permutation used in this exemplary system is a variation of standard permutation decoding. Although this method corrects fewer errors than standard permutation decoding, it is faster than the standard method. Referring to Figure 3, a sector header code word is first read from the disk and the coset leader is subtracted from it, resulting in the corresponding address code word (steps 30-32). Next, the six sector address symbols A (Figure 2), are encoded with the generator polynomial to form the redundancy symbols (step 34). These redundancy symbols are then compared, that is, exclusive OR'd, with the redundancy symbols in the sector address code word (step 36). If the redundancy symbols differ by "t" or fewer symbols, where 1 ≦ t ≦ 12 and t represents the number of errors the code is designed to correct, there are no errors in the sector address contained in the address code word as retrieved from the disk and the position of the head relative to the disk is thus known (steps 38-40). The number "t" can have any value between one and twelve. However, the code can unconditionally correct only four or fewer errors using this error correction technique. If there are more than four errors, the code can correct them only if the errors are clustered such that at least six consecutive code word symbols are error-free. If the redundancy symbols differ by more than t symbols, the next six symbols B in the sector address code word are encoded to form a set of redundancy symbols (steps 38, 42). These symbols are then compared with the corresponding symbols in the sector address code word (step 44). That is, the generated redundancy symbols are compared with symbols C, D, E and A (Figure 3), where the redundancy symbols corresponding to A are at the low order end of the set of generated redundancy symbols. If the symbols differ by t or fewer symbols, the symbols in the set of generated redundancy symbols corresponding to the sector address symbols A are error-free (steps 46, 50). Thus these symbols are used as the correct sector address. If this second comparison results in the symbols differing by more than t symbols, the process is repeated for each of the remaining sets of six symbols C, D, E in the sector address code word until a set of redundancy symbols with t or fewer errors is found (steps 48, 48a). If such a set is not found in the sector address code word, the process is repeated with header code words of successive sectors until an error-free sector address can be determined (steps 48b, 52).

Claims: A method for locating data sectors on a magnetic disk during sector seeking operations comprising the steps of: A. encoding the addresses of the sectors to produce sector address code words such that sector address code words containing a number of errors not exceeding a predetermined number can be identified as the correct sector address; B. encoding said sector address code words to produce sector header code words; C. recording said sector header code words in the sectors during the formatting of the disk; D. encoding, in the same manner as steps A and B, the specified address of the sector to be located to produce the corresponding address code word or the corresponding sector header code word read from said disk sector; E. comparing said corresponding address code word and an address code word corresponding to a sector header code word read from a disk sector rotating under the head, or comparing said corresponding header code word to a header code word read from said disk sector; F. (1) if the comparison results in a number of symbols that differ which is less than or equal to said predetermined number, identifying the sector as the correct sector; or (2) if the comparison results in a number of symbols that differ which is greater than said predetermined number, not identifying the sector as the correct sector and repeating steps E and F for a next sector; the encoding in step B being such that the comparison in step F will always be as is defined in step F(2) if a mis-synchronisation of the head has occurred while reading the sector header code word from the disk. The method of claim 1 wherein said encoding step A includes encoding said sector addresses using a large distance, "D", Reed-Solomon code over Galois Field GF(2 P ) to produce redundancy symbols and appending said redundancy symbols to said sector addresses to produce sector address code words. The method of claim 1 wherein said encoding step B includes encoding said address code words by adding to the code words, using Galois Field addition, an element, "β", of a super-code of said Reed-Solomon code to produce sector header code words. The method of claim 1 wherein said comparison step E further includes exclusive OR'ing said address code word and said corresponding address code word. The method of claim 1 wherein said method further includes a step of determining the position of a read/write head relative to the sectors of a magnetic disk by: i. decoding a sector header code word read from a sector rotating under the head to produce a sector address code word; ii. encoding the address portion of said sector address code word to form a set of generated redundancy symbols; iii. comparing said set of generated redundancy symbols with a set of redundancy symbols in said sector address code word; and iv. (a) if the result of the comparison is that the two sets of redundancy symbols differ by less than or equal to a predetermined number of symbols, determining that the address portion of the sector header code word is error free; or (b) if the result of the comparison is that the two sets of redundancy symbols differ by more than said predetermined number of symbols, encoding a next set of consecutive symbols in said sector address code word to generate a next set of redundancy symbols in the same manner and comparing the set of generated redundancy symbols with a set of corresponding symbols in said sector address code word, if the result of the comparison is that the two sets of symbols differ by fewer than a predetermined number of symbols, using as the error-free sector address the symbols in the set of generated redundancy symbols which correspond to the sector address symbols in the sector address codeword; (c) repeating step iv (b) for each set of consecutive symbols in the sector address code word until the error-free sector address is determined, or if an error-free sector address cannot be so determined, repeating steps iv (a)-(b) and. if necessary, step iv (c) using the sector header code words from successive sectors until an error-free sector address can be determined. An apparatus for locating data sectors on a magnetic disk during sector seeking operations, the apparatus including a read/write head and a sector address encoder (10,12) for encoding the addresses of the sectors to produce sector address code words, the apparatus including: A. a sector address code word encoder (14) for encoding said sector address code words to produce sector header code words such that sector address code words containing a number of errors not exceeding a predetermined number can be identified as the correct sector address; B. recording means (16) for recording said sector header code words in the sectors during the formatting of the disk; C. means (22) for encoding, in the same manner as the sector address encoder (10,12) and the sector address code word encoder (14), the specified address of the sector to be located to produce a corresponding address code word or a corresponding sector header code word; D. comparison means (22,24) for comparing said corresponding address code word with an address code word corresponding to a sector header code word read from a disk sector, or for comparing said corresponding sector header code word with a header code word read from a disk sector; and E. means (26,28) for identifying the sector as the correct sector if the comparison results in a number of symbols that differ which is less than or equal to said predetermined number, said comparison means refraining from identifying the sector as the correct sector if the comparison results in a number of symbols that differ which is greater than said predetermined number; the sector address code word encoder being adapted to produce sector header code words in such a manner that the comparison according to feature E will always result in a number of symbols that differ which is greater than said predetermined number if a mis-synchronisation of the head has occurred while reading the sector header code word from the disk. The apparatus of claim 6 wherein said sector address encoder (10,12) includes means for encoding said sector addresses using a large distance, "D", Reed-Solomon code over Galois Field GF(2 P ) to produce redundancy symbols and appending said redundancy symbols to said sector addresses to produce said address code words. The apparatus of claim 6 wherein said sector address code word encoder (14) includes means for encoding said sector address code words by adding, using Galois Field addition, an element, "β", of a sub-code of said Reed-Solomon code. The apparatus of claim 6 wherein said comparison means (22,24) includes means for exclusive OR'ing said code words. The apparatus of claim 6 further including means for determining the position of a read/write head relative to the sectors of a magnetic disk, said means comprising: a. means (32) for decoding a sector header code word read from the disk to produce a corresponding sector address code word; b. means (34) for encoding the address portion of the sector address code word to form generated redundancy symbols; c. means (36) for comparing the redundancy symbols in said sector address code word with said generated redundancy symbols; d. comparison and encoding means (36-52) for (1) determining the sector address is error free if the comparison results in a number of symbols which differ that is less than or equal to a predetermined number, or (2) if the comparison results in a number of symbols which differ that is greater than said predetermined number, encoding the next set of consecutive symbols in the sector address code word and comparing the generated redundancy symbols with the corresponding symbols in the sector address word, and if the result is that the two sets of redundancy symbols differ by fewer than a predetermined number of symbols, using the symbols in the set of generated redundancy symbols corresponding to the sector address symbols as the error-free sector address, and (3) repeating the encoding and comparison operations for each set of consecutive symbols in the sector address code word until the error-free sector address is determined, or if an error-free sector address cannot be so determined, repeating the encoding and comparison operations using the sector header code words for successive sectors until an error-free sector address can be determined.

Inventors: RUB BERNARD, WENG LIH-JYH, RUB, BERNARD, WENG, LIH-JYH
Applicants: QUANTUM CORP, QUANTUM CORPORATION
Application year: 1988
Main classification: G11B20
IPC codes: G11B20, G11B27, H03M13, G06F3