METHOD FOR DETECTING TRANSIENT WRITE ERRORS IN A DISK DRIVE AND FOR DIFFERENTIATING TRANSIENT WRITE ERRORS FROM PERMANENT MEDIA DAMAGE

Abstract: Methods are provided for detecting transient write errors based on difficulty in reading pre-recorded information on a disk such as servo marks, ID marks, etc. In the event of such a difficulty, the disk drive will automatically read the data it just wrote. If errors were encountered during this write process, the disk drive will either rewrite the data or report errors to the host system which will in most cases issue a rewrite operation. The methods also distinguish between transient errors and permanent media damage and reallocate permanent disk damages to prevent further loss.

Description: METHOD FOR DETECTING TRANSIENT WRITE ERRORS IN A DISK DRIVE AND FOR DIFFERENTIATING TRANSIENT WRITE ERRORS FROM PERMANENT MEDIA DAMAGE FIELD OF THE INVENTION This invention relates generally to storage subsystems for computer systems. In particular, this invention relates to methods for detecting errors during write operations in disk drives, and differentiating between these errors and permanent media damage. BACKGROUND OF THE INVENTION Maximizing the reliability of the data in disk drives is a key objective of disk drive designers. Unfortunately, that obj ective often conflicts with the similarly important need for performance. That is, by increasing the reliability, performance measures such as the data transfer rate could suffer. For example, when data is written to the disk drive, the success of the write operation, i.e., whether the media accepted the data, is unknown. One sure way to guarantee the success of a write operation is by re-reading the recorded data after each write operation. However, a technique that requires all data written to be read as well would severely degrade the performance of the drive. On the other hand, such verification would ensure high reliability of the data. As explained above, these conflicting demands are particularly relevant during write operations. By contrast, if an error occurs during a read operation, the offending section of data can be re-read. However, errors occurring during write operations are more likely to result in permanent data loss. Write errors are often transient. That is, if the error was detected and the write re-attempted the write would be successful. For example, write errors caused by dust particles might be corrected if re-attempted. Such contaminants could temporarily displace the recording mechanism, which results in an error during the write operation. Significantly, these transient write errors are particularly prevalent in removable media disk drives. Applicants have recognized that during the use of such removable media drives, the media is repeatedly removed and reinserted, increasing the likelihood of contaminants entering the cartridge. U.S. Patent Number 5,588,007, "Method For Detecting Transient Write Errors In A Disk Drive", issued to Ma, describes a method for reducing transient write errors due to the flying height of a read/write head above a disk surface being too great. Recently written data is verified after detection of flying height induced errors. However, it is realized that permanent disk damages could occur occasionally and the data will still be bad even after further rewrite processes. It then becomes desirable to flag the physical area on the disk as bad and use the available spare sectors (a process called reallocation). Thus, there is a need for a method to detect transient write errors and to ensure a more reliable write operation while minimizing any performance penalty, and to differentiate a transient error from the permanent media damage and allow the reallocation to take place for the latter case. SUMMARY OF THE INVENTION The present invention is directed to a method of verifying the integrity of data written to a disk in a disk drive system, comprising: writing a first data section to a portion of the disk; periodically reading a pre-recorded signal from the disk; if the pre-recorded signal is substantially different from a predetermined value, reading the first data section written to the disk; and if the first data section read from the disk is substantially different from the first data section written to the disk, determining whether the portion of the disk is damaged. According to aspects of the invention, determining whether the portion of the disk is damaged comprises writing data on the portion of the disk, reading the data from the portion of the disk, and determining whether the read back data is valid. According to other aspects of the invention, it is determined whether the first data section is recoverable, and the data written on the portion of the disk comprises the first data section if the first data section is recoverable, and random data if the first data section is not recoverable. Preferably, an error condition is generated if the read back data is valid and the first data section is not recoverable, and the data is reallocated to a second portion of the disk if the read back data is not valid. Furthermore, an error condition may be generated after reallocating the data if the first data section is not recoverable. According to further aspects of the invention, it is determined whether the first data section comprises fewer than a predetermined number (e.g., 64) of blocks of data and whether the writing has completed, and, prior to periodically reading the pre-recorded signal from the disk, continuing the writing of the first data section if the first data section does not comprise fewer than 64 blocks of data and if the writing has not completed. Another exemplary method of verifying the integrity of data written to a disk in a disk drive system in accordance with the present invention comprises: receiving a write request to write a first data section to a portion of the disk; determining whether the first data section comprises fewer than 64 blocks of data; disabling a write cache if the first data section comprises fewer than 64 blocks of data; writing the first data section to a portion of the disk; periodically reading a pre-recorded signal from the disk; if the pre-recorded signal is substantially different from a predetermined value, reading the first data section written to the disk; and if the first data section read from the disk is substantially different from the first data section written to the disk, determining whether the portion of the disk is damaged. BRIEF DESCRIPTION OF THE DRAWINGS The foregoing summary, as well as the following detailed description of the preferred embodiments, is better understood when read in conjunction with the appended drawings. For the purpose of illustrating the invention, there is shown in the drawings embodiments that are presently preferred, it being understood, however, that the invention is not limited to the specific methods and instrumentalities disclosed. In the drawings: FIG. 1 is a diagram depicting an exemplary disk and arm assembly wherein the method of the present invention may be employed; FIG. 2 is a chart illustrating the relationship between head flying height and signal strength; FIG. 3 is a graphical representation of an exemplary signal of a portion of data from the disk; FIG. 4 is a graphical representation of the exemplary signal showing signal degradation in a track section caused by increased flying height; FIG. 5 is a graphical representation of the effect of flying height on reading and writing data; FIGS. 6 A and 6B are flow charts representing an exemplary method in accordance with the present invention; FIG. 7 is a flow chart representing another exemplary method in accordance with the present invention; and FIGS. 8A, 8B, and 8C are flow charts representing another exemplary method in accordance with the present invention. DETAILED DESCRIPTION OF THE INVENTION FIG. 1 is a representation of a disk drive mechanism wherein the operation of the present invention may be illustrated. As shown, a disk 12 rotates about a spindle motor axis 14. The surface of the disk 12 is receptive to electromagnetic signals for storing data. Read/write electronics, embedded within slider bearing 16 generates an electromagnetic signal to write data and read an electromagnetic signal from the disk surface to read data. The slider bearing 16 with embedded read/write electronics is also referred to herein as a read/write head 16. The read/write head 16 is attached to arm 18. The head 16 and arm 18 assembly are attached to suspension 20. To access selected data sections, the arm 18 with attached read/write head 16 moves over the surface of disk 12 both reading and writing data as required. Spring tension (not shown) urges the arm 18 and read/write head 16 against the surface of the disk 12. When the spindle motor (shown as spindle axis line 14) spins the disk 12 at full speed, air pressure develops between the read/write head 16 and the surface of disk 12 and lifts the read/write head 16 off of the surface of the disk 12. The gap that thereby develops between the surface of disk 12 and the read/write head 16 is referred to as the "flying height." FIG. 2 is a graph of the normalized strength of the electromagnetic signal on the disk surface versus the flying height of the read/write head 16. Line 22 plots the relationship between these two variables. Significantly, there is an inverse relationship between the two variables. Thus, increases in flying height correspond to decreases in normalized signal strength. The flying height between the read/write head 16 and the surface of disk 12 reaches approximately between 0.04 and 0.1 μm, depending on the disk drive system, for a properly functioning full spinning disk 12. As illustrated in FIG. 2 by line 22, such a flying height corresponds to approximately 80 percent of the normalized signal strength. During a read operation, if the flying height increases, the signal read will weaken, possibly resulting in read errors. If the flying height increase is transient, the data section can be re-read and the data recovered. In other words, the signal on the surface of the disk 12 was written properly, but a transient increase in flying height caused the read/write head 16 to deviate too far from the surface to properly read the data. As illustrated in FIG. 2, as the flying height exceeds 0.4 μm the signal strength rapidly diminishes to zero. Before data can be read or written to disk 12, that disk must be formatted. The format divides the surface of the disk 12 into tracks and subdivides those tracks into sectors. The surface of disk 12 is divided into tracks by pre-recording servo marks along each track. For example, there may sixty or more servo marks per track, i.e., a servo mark every six degrees. The read/write head 16 uses these servo marks during operation of the disk drive to locate tracks. Thereafter, the read/write head 16 can lock onto tracks by following the servo marks. During an additional format process, which may be separate from track formatting, the track is subdivided into sectors. As shown in FIG. 3 , each sector 33 is demarcated along the track with a header 36 and a trailer 38 that is recorded onto the disk surface. The header contains overhead information, such as constant density recording ("cdr") field (indicating how many bytes to the next servo field), track id field (identifying all sectors on the same logical track), sector id field (identifying a particular sector) and id error correction code field (containing an error correction code for cdr, track id and sector id fields). The number of sectors per track may vary, e.g., the innermost track may have 90 sectors per track, while the outermost track has 150 sectors per track. However, the number of servo fields remains the same for each track. For example, servo marks may appear every 3 degrees around each track. Servo marks contain a grey code (containing the physical track number), and norm and quad fields (indicating the head distance from the track center). After the disk 12 has been properly formatted, it is ready for use, such that data may be read from and written to its surface in data sections within each sector. While the read/write head 16 is reading and writing data to the disk 12, the arm 18 must follow the tracks that were written to the surface of the disk 12 during formatting. The arm 18 via the head 16 thus reads the servo marks to ensure that the tracks are closely followed during operation. Significantly, during a write operation, the head 16 continues to read the servo marks to ensure proper track following and to read the sector identifiers to find the proper location for data. Additionally, during the write operation, the head continues to read every grey code, servo mark, id mark, cdr field and track id. The signal read back will translate to a specific predetermined value. If any of the values do not match the predetermined value, an error condition results. Also, certain values are checked against the error correction code field. If a mismatch occurs, then an attempt is made to correct the data using the error correction code field. The norm and quad fields of the servo marks are checked against a predetermined amplitude. If a mismatch occurs, a position error will be reported indicating how far the heads are from the center of the track. As should be appreciated from FIG. 2, transient changes in head flying height during writes to disk 12 could result in a permanent signal loss. That is, as the flying height increases, the signal recorded on the media decreases. Thus, if the flying height crosses a threshold point, which may vary based on such factors as recording media and head type, the signal would not be recoverable on subsequent read operations. Unfortunately in such a case, the error may not be discovered until much later and permanent data loss could result. A feature of the present invention detects and corrects write errors caused by transient increases in flying height with a minimal impact on drive performance. This feature exploits the need for the drive to continue to read information, such as servo marks, from the disk 12 even during write operations. Therefore, flying height increases that persist while the read/write head is flying above portions of the disk 12 having pre-recorded signals, such as a servo mark, are detected and corrected. In particular, because some information, such as servo marks, was written and verified prior to the use of the disk 12, read signal degradation detected during track following and sector seeking likely resulted from flying height increases. In accordance with one aspect of the present invention, the data previously written is re-read and verified. As a result, a high quality write operation can be performed while only verifying a minimal amount of data. To further illustrate the effect of transient increases in flying height during write operations, FIGS. 3 and 4 graphically present linear representations of track sections 30 from the disk 12. It should be noted that signal strength has been graphed along the y axis and time has been graphed along the x axis. Referring to FIG. 3, data sections 32a, 32b were written normally, i.e., while no changes in flying height were experienced. Significantly, the pre-recorded signals such as the servo mark 34, the sector headers 36a, 36b and the sector trailer 38 have substantially the same signal strength as the data sections recorded during subsequent write operations. By contrast, FIG. 4 presents a similar track section 30 written while experiencing a change in flying height. By comparison to the signal strength depicted in FIG. 3, the signal strength degrades in the data sections 32a, 32b of FIG. 4. That signal weakness corresponds to an increase in head flying height during the write operation. Importantly, even though the signal strength of the data 32a has diminished, the pre-recorded information, such as servo marks 34 and sector headers 36a, 36b remain at pre-recorded signal levels. As a result of the poor signal strength in the data sections 32a, 32b, the data recorded therein will likely be unreadable and unrecoverable if it remains uncorrected. According to aspects of the present invention, by testing the strength of the prerecorded signal, e.g., servo marks 34 and sector identifiers (embedded within sector headers 36) while writing to the data sections 32, transient changes in flying height can be detected. Although the pre-recorded signals 34, 36, and 38 remain at pre-recorded signal strength, a read of those signals during the increase in flying height would likely result in diminished signal strength and read errors. As best illustrated in FIG. 5, while data is written to the disk 12, the read/write head 16 must constantly determine its current location. As noted above, this determination is conventionally performed by reading servo marks 34 and sector identifiers. Significantly, if such a read is made while experiencing an increase in flying height, those signals, e.g., 34, 36, will appear weak. Correspondingly, the write operation to data sections 32 will likely have resulted in a weak signal. Thus, an error detected on a read of the servo mark 34 and the sector identifier within the sector header 36a indicates that the nearby data 32a should be verified. The present invention detects transient write errors based on difficulty in reading pre-recorded information on the disk such as servo marks, ID marks, etc. In the event of such difficulty, the drive will automatically read the data it just wrote. If errors were encountered during this write process, the drive will either rewrite the data or report errors to the host system which will in most cases issue a rewrite operation. The present invention also distinguishes between transient errors and permanent media damage and reallocates permanent disk damages to prevent further loss. Referring now to FIGS. 6 A and 6B, an exemplary method in accordance with the present invention will be described in detail. The process begins with a request to write a block of data to the disk 12, starting at a particular track and sector location (step 100). Before beginning the write, an error flag is initialized to zero (step 102). This flag is used, as will be further described below, to indicate whether a potential write error has occurred. After the initialization, the arm 18 moves the head 16 to the proper track by seeking to and following the servo marks. Thus, a servo mark is read (step 104). According to an aspect of the present invention, if the flying height of the head 16 is too high an error will occur during the read of the servo mark. Accordingly, the servo mark read is tested (step 106). If an error occurred during that read of the servo mark (step 104), the error flag is set. If, on the other hand, no error occurred, the process continues. Next, the head scans the track for the proper sector to receive the data. Accordingly, the sector identifier is read (step 110). Any errors occurring during the read of the sector identifier result in the setting of the error flag. As with the servo mark read, excessive flying height during the read of the sector identifier will also result in a read error. Thus, the read of the sector identifier is tested for errors (step 112). If the read of the sector identifier resulted in an error, the error flag is set (step 114). Regardless of whether or not an error occurred during one of the reads indicated above, the data is written to the data section of the sector (step 116) (i.e., assuming the error is recoverable via an error correction code). If the write is not complete, i.e., more data remains to be written to different sectors, the process continues (steps 118, 120). Otherwise, the write is complete and the error flag is checked (steps 1 18, 122). If no read error occurred, the operation is complete. However, if the error flag is set indicating a read error, all the data previously written during this write request is read back for verification (step 124). At step 126, it is determined whether the data that was read back is valid or if there is an error. If the data is valid, processing ends at step 190. However, if a data error is indicated at step 126, an attempt is made to recover and rewrite the data and processing continues at step 140. At step 140, it is determined if the data in the faulty sector is available for recovery. If the data is available, another error flag (referred to as flag 1 ) is set to 0 at step 142, and the data is rewritten on the same location on the disk at step 144. The data is read back at step 150, and it is determined at step 152 if the data is valid. If the data is valid, it is determined that the error was transient, the media is not damaged at this location, and processing ends at step 190. If the data is not valid at step 152, then it is determined that the media is damaged at this sector location, and another sector is chosen to write the data to at step 154, and the data is rewritten at the newly chosen sector. Processing then ends at step 190. At step 140, if the data is not available for recovery, the additional error flag, flagl, is set to 1 at step 146, random data is written to the sector at step 148, and the data is read back at step 150. It is determined at step 152 if the data that was written to the sector is valid (i.e., error-free). If the data is valid, then, because flagl=l at step 153, an error is reported at step 156 that indicates that the media is good, but the write was in error (i.e., a transient write error has occurred), and processing ends. If the data is not valid at step 152, then it is determined that the sector on the media is damaged, and another sector is chosen at step 154 in which to write the (random) data. Because flagl=l at step 153, an error is reported at step 156 that indicates there is a media defect, and processing ends. Thus, when invalid data was read during the initial read verify after write, if the data is no longer in drive memory, the drive will write random data to the sectors with invalid data. Otherwise, the drive will rewrite the data. The drive then performs a read operation to verify the data written. If the data is invalid, then the new sectors are determined to be bad and get reallocated. An attempt will be made to write data at the new locations. If the data is valid, the sectors will be deemed to be good, and the errors are deemed to be transient. The process will either end or the drive will report an error to the host if random data was used during the write. The host will then try to fix the problem (e.g., using retry). In accordance with the present invention, a write-behind cache can be used as a form of temporary storage in which data is held or cached for a short time in memory before being written on the disk. This caching is implemented to improve system performance by reducing the number of times the system goes through the process of reading from and writing to the disk. One embodiment of the present invention avoids the increased risk of having to report a deferred write error to the host when a write-behind cache is being used. In this embodiment, the write-behind cache functions as usual unless a verify pass (steps 140- 156 in FIG. 6B) occurs. If this happens, in accordance with the present invention, the write-behind cache is shut down until the next command. The method described with respect to FIGS. 6 A and 6B functions as described above except it is disabled during the time between when the write-behind cache reports good completion status to the host and the time in which the rest of the data blocks belonging to the write command that are still in the buffer are transferred to the media. Preferably, the disabling of the methods of FIGS. 6 A and 6B is not activated if the write command is transferring fewer than a predetermined number of blocks of data, for example, 64 blocks of data. In this manner, the maximum exposure of the media is then limited to the drive's data buffer size divided by the predetermined number. A flow chart of one exemplary method of the above embodiment in which data is written from a buffer to the disk is shown in FIG. 7. The method is similar to that shown in FIG. 6 A, except steps 119 and 121 have been added. At step 119, after the write is completed, it is determined if there are fewer than the predetermined number (e.g., 64) of blocks of data being transferred. If so, then processing continues at step 122. If more than 64 blocks of data are being transferred, then it is determined at step 121 if the status has been reported to the host. If not, then processing continues at step 122; otherwise, the next write request is obtained at step 100. Moreover, if the error flag in step 122 is not set, then the next write request is obtained at step 100. Referring now to FIGS. 8A, 8B, and 8C, another exemplary method in accordance with the present invention will be described in detail. At step 200, a write request is received to write a block of data to the disk, starting at a particular track and sector location. At step 205, it is determined if the write request is sequential (i.e., whether the write request is at the next location on the disk relative to the previous write). If the write request is sequential, processing continues at step 220, as described below. If the write request is not sequential, the write -behind cache is shut down at step 210. This stops the disk transfer routine (see FIG. 8B). At step 215, verification (steps 140-156 in FIG. 6B) is enabled. At step 220, it is determined if fewer than a predetermined number of blocks of data (e.g., 64) have been moved. This optional step is used to limit exposure to transient write errors. If fewer than blocks have been moved, the write-behind cache is shut down at step 225, and the write-behind cache is disabled for the current write request, at step 230. Processing continues at step 102 in FIG. 6A. If at least 64 blocks have been moved, then processing continues at step 102 in FIG. 7. At step 240, it is determined whether the host transfer to the buffer is complete (similar to step 121 in FIG. 7). If not, then the system waits until the host transfer has completed (steps 240, 245). After the host transfer is complete, it is determined at step 250 if the error flag is set (similar to step 122 in FIG. 7). If the error flag is set, then the system waits for the disk transfer routine (FIG. 8B) to complete (similar to step 124 in FIG. 7). Processing continues with steps 118- 190 of FIGS.6A and 6B being executed. If the error flag is not set as determined at step 250, then a counter is set at step 255 to count the number of blocks of the buffer that are left to be moved to the disk (from the disk transfer routine in FIG. 8B). The verification process is disabled at step 260, and processing continues with steps 118- 190 of FIGS. 6 A and 6B being executed. FIG. 8B is a flow chart of an exemplary disk transfer method in accordance with the present invention. The disk transfer method is called at step 270. It is determined at step 272 if a soft write error has occurred. If not, then processing continues. If a soft write error has occurred, then an error flag is set at step 274, and the write-behind cache is shut down at step 276. Disk transfer continues until all of the data in the buffer has been moved to the disk. After each sector gets transferred from the buffer to the disk, the sector interrupt 280 of FIG. 8C is called. At step 282, it is determined if the block of data has been successfully transferred to the disk, and at step 284 it is determined if the verification process has been disabled. If either of these events has not occurred, processing continues at step 200 in FIG. 8 A. If both of the events have occurred, then the counter of step 255 in FIG. 8 A is decremented at step 286, and compared to zero at step 288. If the counter equals zero, the verification process of FIG. 6B is enabled. In either event, processing continues at step 200. Those of ordinary skill in the art should appreciate that the description given herein with respect to those figures is for exemplary purposes only and is not intended in any way to limit the scope of the invention. Those skilled in the art will readily appreciate that many modifications are possible within the scope of the present invention. For example, the techniques described herein are not limited to completing the entire write operation before testing for errors, after detecting the read error verification could take place immediately. Moreover, other types of prerecorded data rather than the servo mark and the sector identifier may be used to test for flying height errors, those used herein are merely those that are presently preferred. Furthermore, the number of sectors and servo marks used are merely to illustrate and are not intended to limit the invention. Accordingly, the scope of the invention is not intended to be limited by the preferred embodiment described above but only by the appended claims.

Claims: What is claimed is: 1. A method of verifying the integrity of data written to a disk in a disk drive system, comprising: writing a first data section to a portion of the disk; periodically reading a pre-recorded signal from the disk; if the pre-recorded signal is substantially different from a predetermined value, reading the first data section written to the disk; and if the first data section read from the disk is substantially different from the first data section written to the disk, determining whether the portion of the disk is damaged. 2. The method according to claim 1, wherein determining whether the portion of the disk is damaged comprises writing data on the portion of the disk, reading the data from the portion of the disk, and determining whether the read back data is valid. 3. The method according to claim 2, further comprising determining whether the first data section is recoverable, and the data written on the portion of the disk comprises the first data section if the first data section is recoverable, and random data if the first data section is not recoverable. 4. The method according to claim 3, further comprising generating an error condition if the read back data is valid and the first data section is not recoverable, and reallocating the data to a second portion of the disk if the read back data is not valid. 5. The method according to claim 4, further comprising generating an error condition after reallocating the data if the first data section is not recoverable. 6. The method according to claim 5, wherein generating the error condition comprises reporting an error condition. 7. The method according to claim 1, further comprising preparing the disk with the prerecorded signal having a predetermined value. 8. The method according to claim 1 , wherein the pre-recorded signal is at least one of a servo mark and a sector identification. 9. The method according to claim 1, further comprising determining whether the first data section comprises fewer than a predetermined number of blocks of data and whether the writing has completed, and, prior to periodically reading the pre-recorded signal from the disk, continuing the writing of the first data section if the first data section does not comprise fewer than the predetermined number of blocks of data and if the writing has not completed. 10. The method according to claim 9, wherein the predetermined number is 64. 11. A method of verifying the integrity of data written to a disk in a disk drive system, comprising: receiving a write request to write a first data section to a portion of the disk; determining whether the first data section comprises fewer than a predetermined number of blocks of data; disabling a write cache if the first data section comprises fewer than the predetermined number of blocks of data; writing the first data section to a portion of the disk; periodically reading a pre-recorded signal from the disk; if the pre-recorded signal is substantially different from a predetermined value, reading the first data section written to the disk; and if the first data section read from the disk is substantially different from the first data section written to the disk, determining whether the portion of the disk is damaged 12. The method according to claim 11 , wherein the predetermined number is 64. 13. The method according to claim 11, wherein determining whether the portion of the disk is damaged comprises writing data on the portion of the disk, reading the data from the portion of the disk, and determining whether the read back data is valid. 14. The method according to claim 11 , further comprising determining whether the first data section is recoverable, and the data written on the portion of the disk comprises the first data section if the first data section is recoverable, and random data if the first data section is not recoverable. 15. The method according to claim 14, further comprising generating an error condition if the read back data is valid and the first data section is not recoverable, and reallocating the data to a second portion of the disk if the read back data is not valid. 16. The method according to claim 15, further comprising generating an error condition after reallocating the data if the first data section is not recoverable. 17. The method according to claim 16, wherein generating the error condition comprises reporting an error condition. 18. The method according to claim 11 , further comprising preparing the disk with the prerecorded signal having a predetermined value. 19. The method according to claim 11, wherein the pre-recorded signal is at least one of a servo mark and a sector identification.

Inventors: MA YIPING, PAN WEIMIN, ROCHAT DANIEL D, MA, YIPING, PAN, WEIMIN, ROCHAT, DANIEL, D.
Applicants: IOMEGA CORP, IOMEGA CORPORATION
Application year: 2000
Main classification: G11B20
IPC codes: G11B20