Recording defects on a hard drive

A method for recording defects on a hard drive is provided. The method includes mapping a plurality of primary windows. Each primary window contains a respective plurality of data sectors on a disk of a hard drive. Each of the respective plurality of data sectors contains at least one defect. The method includes recording a location of each primary window in a defect log of the disk, and mapping a plurality of secondary windows if recording the location of each primary window fails. Each secondary window contains a respective plurality of data sectors containing at least one defect. The number of data sectors contained in each of the plurality of primary windows is different from the number of data sectors contained in each of the plurality of secondary windows. The method includes recording a location of each secondary window in the defect log of the disk.

FIELD

The present invention generally relates to hard drive manufacturing, and in particular, relates to the recording of defects on hard drives.

BACKGROUND

In the manufacture of a hard drive, data sectors on a disk of the hard drive may be scanned for defects. These defects may be recorded as entries in a defect log stored on the disk. The entries in the defect log may provide an indication of which data sectors are defects and therefore may not be used for storage. If the defect log becomes full from recording the defects, then the entire disk is considered a failure and not suitable for use. However, the disk may have remaining data sectors that have not been scanned for defects but are otherwise suitable for use. It would therefore be advantageous to salvage these remaining data sectors for use.

SUMMARY

A method for recording defects on a hard drive is provided. The method includes mapping a plurality of primary windows. Each primary window contains a respective plurality of data sectors on a disk of a hard drive. Each of the respective plurality of data sectors contains at least one defect. The method includes recording a location of each primary window in a defect log of the disk, and mapping a plurality of secondary windows if recording the location of each primary window fails. Each secondary window contains a respective plurality of data sectors containing at least one defect. The number of data sectors contained in each of the plurality of primary windows is different from the number of data sectors contained in each of the plurality of secondary windows. The method includes recording a location of each secondary window in the defect log of the disk.

DETAILED DESCRIPTION

In the following detailed description, numerous specific details are set forth to provide a full understanding of the subject technology. It will be apparent, however, to one ordinarily skilled in the art that the subject technology may be practiced without some of these specific details. In certain instances, well-known structures and techniques have not been shown in detail so as not to obscure the subject technology.

When data sectors on a disk of a hard drive are scanned for defects, windows are used to map the defects and their surrounding data sectors. The locations of these windows may then be recorded as entries in a defect log stored on the disk to ensure that the defects are not accidentally written to and/or read from. Thus, data sectors that are covered by the windows are not used for storage. These windows may be defined based on parameters that specify a size for each window. For example, the size of a window may be identified by a number of tracks and a number of wedges of the disk covered by the window.

When the location of a window is recorded in the defect log, each track covered by the window is treated as a separate entry. Thus, the size of each window (e.g., specifically the number of tracks covered by the window) dictates how many entries may be stored in the defect log, which can only store a finite number of entries. If the defect log becomes full from recording the locations of the windows, then the disk on which the defect log is stored is considered a failure and not suitable for use. In such a situation, the head corresponding to the disk is typically depopulated, thereby rendering the entire disk unusable despite the fact that the disk may contain remaining data sectors that have not been mapped by the windows but are nevertheless suitable for use. According to various aspects of the subject technology, a method is provided for recording defects on a hard drive such that more entries may be recorded in the defect log to allow a greater portion of the remaining data sectors to be salvaged for use. Method100, as illustrated inFIG. 1, is an example of such a method.

According to step S102of method100, a plurality of primary windows is mapped to cover defects on a disk of a hard drive and their surrounding data sectors. Each primary window contains a respective plurality of data sectors on the disk and at least one defect. In some aspects, the plurality of primary windows is defined based on a first set of parameters. The first set of parameters may specify a size for each primary window, wherein the size of each primary window is identified by a number of tracks and a number of wedges of the disk covered by each primary window. In some aspects, all of the primary windows have the same size as one another. According to step S104, the locations of these primary windows are recorded in a defect log stored on the disk.

FIG. 2Aillustrates a plurality of data sectors20on a disk of a hard drive, wherein each data sector20is identified by a corresponding track number and a corresponding wedge number.FIG. 2Aalso illustrates an example of primary window26mapping defect22, in accordance with various aspects of the subject technology. Although primary window26is illustrated as a rectangle, primary window26may be in the form of other suitable shapes such as an L-shape, a T-shape, a U-shape, or combinations thereof. Although the plurality of data sectors20are illustrated from tracks1through10and from wedges1through10, it is understood that other suitable ranges for the tracks and/or wedges may be used. As an example, the location of primary window26may be recorded in a defect log in the following manner:

TrackWedge StartWedge Stop357457557657757
Thus, the location of primary window26is recorded in the defect log using five entries, with each entry corresponding to a different track.

Referring to steps S106and S108ofFIG. 1, if all of the locations of the primary windows are recorded in the defect log (e.g., all the defects detected on the disk have been scanned and recorded), then a pass indicator is generated, which indicates that the disk is suitable for use. If at least one location of a primary window is not yet recorded and the capacity of the defect log is not full, then the location of another primary window is recorded in the defect log, according to steps S104, S106, and S110. In some aspects, the capacity of the defect log is considered not full if the defect log can support the recording of the location of another window. In some aspects, the capacity of the defect log is considered full if the defect log cannot support the recording of the location of another window.

If recording the locations of the primary windows has failed (e.g., at least one location of a primary window is not yet recorded and the capacity of the defect log is full), the disk of the hard drive is not automatically designated as a failure. This is because the disk may contain remaining data sectors that have not been mapped by the primary windows but are nevertheless suitable for use. Thus, a plurality of secondary windows is used instead of the primary windows to map the defects on the disk and their surrounding data sectors, according to steps S106, S110, and S112. According to certain aspects, by mapping the plurality of secondary windows, more entries may be recorded in the defect log compared to the primary windows to allow a greater portion of the remaining data sectors to be salvaged for use.

According to various aspects of the subject technology, each secondary window contains a respective plurality of data sectors containing at least one defect, and the plurality of secondary windows is defined based on a second set of parameters that specify a size of each secondary window. In some aspects, all of the secondary windows have the same size as one another. In some aspects, the number of data sectors contained in each of the plurality of primary windows is different from the number of data sectors contained in each of the plurality of secondary windows. In some aspects, the plurality of secondary windows may cover less tracks than the plurality of primary windows and/or the plurality of secondary windows may cover more wedges per secondary window than the plurality of primary windows covers per primary window. Thus, less entries may be recorded in the defect log when mapping the defects with the secondary windows as compared to mapping the defects with the primary windows. According to step S114, the locations of the secondary windows are recorded in the defect log stored on the disk. In some aspects, recording the location of each secondary window comprises overwriting at least one recorded location of a primary window in the defect log of the disk.

For purposes of illustration, assume that the recording of the location of primary window26ofFIG. 2Ahas failed because the location of primary window26is not yet recorded but the defect log only has three remaining entries (while recording the location of primary window26would use five entries). According to various aspects of the subject technology, a secondary window may be used to map defect22such that the location of the secondary window may be recorded in the defect log.FIG. 2Billustrates an example of secondary window28used to map defect22, in accordance with various aspects of the subject technology. Secondary window28is sized such that it covers less tracks than primary window26. Although secondary window28is illustrated as a rectangle, secondary window28may be in the form of other suitable shapes such as an L-shape, a T-shape, a U-shape, or combinations thereof. The location of secondary window28may be recorded in the defect log in the following manner:

TrackWedge StartWedge Stop457557657
Because secondary window28only covers three entries, the location of secondary window28may be recorded in the defect log while the location of primary window26cannot. Although only a single primary window and a single secondary window is shown inFIGS. 2A and 2B, a plurality of secondary windows may be used instead of a plurality of primary windows to map defects on the disk of a hard drive. According to certain aspects, if the plurality of secondary windows covers less tracks than the plurality of primary windows, then more entries may be recorded in the defect log using the secondary windows than with using the primary windows.

Referring to steps S116and S118, if all of the locations of the secondary windows are recorded in the defect log (e.g., all the defects detected on the disk have been scanned and recorded), then the pass indicator is generated, which indicates that the disk is suitable for use. If at least one location of a secondary window is not yet recorded and the capacity of the defect log is not full, then the location of another secondary window is recorded in the defect log, according to steps S114, S116, and S118.

If, on the other hand, recording the locations of the secondary windows has failed (e.g., at least one location of a secondary window is not yet recorded and the capacity of the defect log is full), then a failure indicator may be generated according to steps S116, S118, and S120. The failure indicator may indicate that the disk is not suitable for use. In this situation, the defect log is full despite the fact that secondary windows are used to record the locations of the defects on the disk of the hard drive. Such a situation may indicate that the disk contains too many defects for the disk to be considered suitable for use, and thus the failure indicator generated is appropriate.

FIGS. 3A and 3Billustrate an example of mapping defects30aand30busing primary windows32aand32bcompared to mapping defects30aand30busing secondary window34, in accordance with various aspects of the subject technology. As shown inFIG. 3A, primary window32ais used to map defect30a, while a separate primary window32bis used to map defect30b. The location of primary window32amay be recorded in a defect log in the following manner:

The location of primary window32bmay be recorded in the defect log in the following manner:

TrackWedge StartWedge Stop479579679
Thus, the locations of primary windows32aand32bare recorded in the defect log using a total of six entries, with each entry corresponding to a different track per window. In contrast, as shown inFIG. 3B, a single secondary window34is used to map both defects30aand30b. The location of secondary window34may be recorded in the defect log in the following manner:

Thus, the location of secondary window34is recorded in the defect log using only three entries compared to the six entries used by primary windows32aand32b. Although secondary window34covers more wedges than the primary windows32aand32bcover, less entries are used to record the location of secondary window34compared to recording the locations of primary windows32aand32b. Thus, according to certain aspects, while primary windows32aand32bcontain less data sectors than secondary window34, the savings of an additional three entries in the defect log may allow more data sectors to be salvaged when using secondary window34.

FIGS. 4A and 4Billustrate an example of mapping defects36aand36busing primary windows38aand38bcompared to mapping defects36aand36busing secondary window40, in accordance with various aspects of the subject technology. As shown inFIG. 4A, primary window38ais used to map defect36a, while a separate primary window38bis used to map defect36b. The location of primary window38amay be recorded in a defect log in the following manner:

The location of primary window38bmay be recorded in the defect log in the following manner:

TrackWedge StartWedge Stop36104610561066107610
Thus, the locations of primary windows38aand38bare recorded in the defect log using a total of ten entries, with each entry corresponding to a different track per window. In contrast, as shown inFIG. 4B, a single secondary window40is used to map both defects36aand36b. The location of secondary window40may be recorded in the defect log in the following manner:

Thus, the location of secondary window40is recorded in the defect log using only four entries compared to the ten entries used by primary windows38aand38b. Secondary window40covers less tracks than the primary windows38aand38b. Furthermore, although secondary window40covers more wedges than each of primary windows38aand38b, secondary window40covers less wedges than primary windows38aand38bcombined. Thus, secondary window40contains less data sectors than primary windows38aand38bcontain, and also use less entries when recorded in the defect log.

FIG. 5is a block diagram illustrating components of controller500, in accordance with various aspects of the subject technology. Controller500comprises processor module504, storage module510, input/output (I/O) module508, memory module506, and bus502. Bus502may be any suitable communication mechanism for communicating information. Processor module504, storage module510, I/O module508, and memory module506are coupled with bus502for communicating information between any of the modules of controller500and/or information between any module of controller500and a device external to controller500. For example, information communicated between any of the modules of controller500may include instructions and/or data. In some aspects, bus502may be a universal serial bus. In some aspects, bus502may provide Ethernet connectivity.

In some aspects, processor module504may comprise one or more processors, where each processor may perform different functions or execute different instructions and/or processes. For example, one or more processors may execute instructions for recording defects on a hard drive as described herein (e.g., method100), and one or more processors may execute instructions for input/output functions.

Memory module506may be random access memory (“RAM”) or other dynamic storage devices for storing information and instructions to be executed by processor module504. Memory module506may also be used for storing temporary variables or other intermediate information during execution of instructions by processor504. In some aspects, memory module506may comprise battery-powered static RAM, which stores information without requiring power to maintain the stored information. Storage module510may be a magnetic disk or optical disk and may also store information and instructions. In some aspects, storage module510may comprise hard disk storage or electronic memory storage (e.g., flash memory). In some aspects, memory module506and storage module510are both a machine-readable medium.

Controller500is coupled via I/O module508to a user interface for providing information to and receiving information from an operator implementing method100(e.g., to test a hard drive during its manufacture). For example, the user interface may be a cathode ray tube (“CRT”) or LCD monitor for displaying information to an operator. The user interface may also include, for example, a keyboard or a mouse coupled to controller500via I/O module508for communicating information and command selections to processor module504.

According to various aspects of the subject disclosure, methods described herein are executed by controller500. Specifically, processor module504executes one or more sequences of instructions contained in memory module506and/or storage module510. In one example, instructions may be read into memory module506from another machine-readable medium, such as storage module510. In another example, instructions may be read directly into memory module506from I/O module508, for example from an operator implementing method100via the user interface. Execution of the sequences of instructions contained in memory module506and/or storage module510causes processor module504to perform methods to record defects on hard drives (e.g., method100). For example, a computational algorithm for recording defects on a hard drive may be stored in memory module506and/or storage module510as one or more sequences of instructions. Information such as the location of each primary window and/or secondary window, the first set of parameters, the size of each primary window, the second set of parameters, the size of each secondary window, the capacity of the defect log, the pass indicator, and/or the fail indicator may be communicated from processor module504to memory module506and/or storage module510via bus502for storage. In some aspects, the information may be communicated from processor module504, memory module506, and/or storage module510to I/O module508via bus502. The information may then be communicated from I/O module508to an operator implementing method100via the user interface.

One or more processors in a multi-processing arrangement may also be employed to execute the sequences of instructions contained in memory module506and/or storage module510. In some aspects, hard-wired circuitry may be used in place of or in combination with software instructions to implement various aspects of the subject disclosure. Thus, aspects of the subject disclosure are not limited to any specific combination of hardware circuitry and software.

The term “machine-readable medium,” or “computer-readable medium,” as used herein, refers to any medium that participates in providing instructions to processor module504for execution. Such a medium may take many forms, including, but not limited to, non-volatile media, volatile media, and transmission media. Non-volatile media include, for example, optical or magnetic disks, such as storage module510. Volatile media include dynamic memory, such as memory module506. Common forms of machine-readable media or computer-readable media include, for example, floppy disk, a flexible disk, hard disk, magnetic tape, any other magnetic medium, a CD-ROM, DVD, any other optical medium, punch cards, paper tape, any other physical mediums with patterns of holes, a RAM, a PROM, an EPROM, a FLASH EPROM, any other memory chip or cartridge, or any other medium from which a processor can read.

A phrase such as an “aspect” does not imply that such aspect is essential to the subject technology or that such aspect applies to all configurations of the subject technology. A disclosure relating to an aspect may apply to all configurations, or one or more configurations. A phrase such as an aspect may refer to one or more aspects and vice versa. A phrase such as an “embodiment” does not imply that such embodiment is essential to the subject technology or that such embodiment applies to all configurations of the subject technology. A disclosure relating to an embodiment may apply to all embodiments, or one or more embodiments. A phrase such an embodiment may refer to one or more embodiments and vice versa.

A reference to an element in the singular is not intended to mean “one and only one” unless specifically stated, but rather “one or more.” The term “some” refers to one or more. All structural and functional equivalents to the elements of the various configurations described throughout this disclosure that are known or later come to be known to those of ordinary skill in the art are expressly incorporated herein by reference and intended to be encompassed by the subject technology. Moreover, nothing disclosed herein is intended to be dedicated to the public regardless of whether such disclosure is explicitly recited in the above description.