MANAGING READ AND WRITE ERRORS UNDER EXTERNAL VIBRATION

Systems and techniques for writing data to a Shingled Magnetic Recording (SMR) magnetic data storage device. At least one processor may determine whether the distance between a first data track and a second data track is less than a threshold distance. If the distance is less than a threshold distance, the at least one processor may cause a write head to refrain from writing to the sector of the second data track. The at least one processor may cause data from the first data track to be copied to another storage location and write data to the sector of the second data track.

TECHNICAL FIELD

This disclosure relates to storage devices, such as shingled magnetic data storage devices.

BACKGROUND

Hard disk drives (HDD) store data in annular tracks in magnetic storage media. One way to increase HDD capacity is to increase the tracks-per inch-(TPI) by reducing the track width, or reducing the spacing between tracks. Shingled Magnetic Recording (SMR) further increases TPI by using partially overlapping tracks, like roof shingles. As the HDD writes new data in track N+1, track N+1 partially overlaps the previously written, adjacent track N. Because the reader element is smaller than the writer element, HDD systems can read the data from the shingled track without losing data integrity or reliability.

SUMMARY

In one example, the disclosure is directed to a method including, during writing of data to a second data track of a hard drive, determining, by at least one processor and based on a position error signal (PES) for a sector of the second data track, whether the distance between the sector of the second data track and a corresponding sector of a first data track is less than a threshold distance. In one example, the second data track is adjacent to the first data track and the first data track stores previously written data. The method may also include, in response to determining that the distance between the sector of the first data track and the corresponding sector of the second data track is less than the threshold distance: causing, by the at least one processor, a write head to refrain from writing data to the corresponding sector of the second data track; and setting, by the at least one processor, an indicator associated with the second data track indicating the data was not written to the corresponding sector of the second data track. The method may further include, during writing of data to a fourth data track of the hard drive, determining, by the at least one processor and based on a PES for a sector of a third data track of the hard drive and a PES for a corresponding sector of the fourth data track, whether the distance between the sector of the third data track and the corresponding sector of the fourth data track is less than the threshold distance. In one example, the fourth data track is adjacent to the third track and the third data track stores previously written data. The method may include in response to determining that the distance between the sector of the third data track and the corresponding sector of the fourth data track is less than the threshold distance: setting, by the at least one processor, an indicator associated with the third data track indicating the sector of the third data track may be squeezed; and causing, by the at least one processor, a write head to write data to the corresponding sector of the fourth data track.

In one example, the disclosure is directed to a method including causing, by at least one processor, data from a first data track of the hard drive to be copied to a secondary write buffer. The method may also include, during writing of data to a second data track of the hard drive, determining, by the at least one processor and based on a position error signal (PES) for a sector of the first data track and a PES for a corresponding sector of the second data track, whether the distance between the sector of the first data track and the corresponding sector of the second data track is less than a threshold distance. In one example, the second data track is adjacent to the first data track and the first data track stores previously written data. The method may further include, in response to determining that the distance between the sector of the first data track and the corresponding sector of the second data track is less than the threshold distance: setting, by the at least one processor, an indicator associated with the first data track indicating the sector of the first data track may be squeezed; causing, by the at least one processor, a write head to write to the second data track data to the corresponding sector of the second data track; and causing, by the at least one processor, data corresponding to the sector of the first data track that may be squeezed to be copied from the secondary write buffer and to another buffer.

In another example, the disclosure is directed to a storage device including a magnetic data storage device and at least one processor. The magnetic data storage device includes a write head and a plurality of data tracks. Each of the plurality of data tracks includes a respective plurality of data sectors. The at least one processor may be configured to, during writing of data to a second data track of a hard drive, determine, based on a position error signal (PES) for a sector of the second data track, whether the distance between the sector of the second data track and a corresponding sector of a first data track is less than a threshold distance. In one example, the second data track is adjacent to the first data track and the first data track stores previously written data. The at least one processor may also be configured to, in response to determining that the distance between the sector of the first data track and the corresponding sector of the second data track is less than the threshold distance, cause the write head to refrain from writing data to the corresponding sector of the second data track and set an indicator associated with the second data track indicating the data was not written to the corresponding sector of the second data track. The at least one processor may be further configured to, during writing of data to a fourth data track of the hard drive, determine, based on a PES for a sector of a third data track of the hard drive and a PES for a corresponding sector of the fourth data track, whether the distance between the sector of the third data track and the corresponding sector of the fourth data track is less than the threshold distance. In one example, the fourth data track is adjacent to the third track and the third data track stores previously written data. The at least one processor may be further configured to, in response to determining that the distance between the sector of the third data track and the corresponding sector of the fourth data track is less than the threshold distance, set an indicator associated with the third data track indicating the sector of the third data track may be squeezed and cause the write head to write data to the corresponding sector of the fourth data track.

In another example, the disclosure is directed to a storage device including a magnetic data storage device and at least one processor. The magnetic data storage device includes a write head and a plurality of data tracks. Each of the plurality of data tracks comprises a respective plurality of data sectors. The at least one processor may be configured to cause data from a first data track of the hard drive to be copied to a secondary write buffer. The at least one processor may also be configured to, during writing of data to a second data track of the hard drive, determine, based on a position error signal (PES) for a sector of the first data track and a PES for a corresponding sector of the second data track, whether the distance between the sector of the first data track and the corresponding sector of the second data track is less than a threshold distance. In one example, the second data track is adjacent to the first data track and the first data track stores previously written data. The at least one processor may be further configured to, in response to determining that the distance between the sector of the first data track and the corresponding sector of the second data track is less than the threshold distance, set an indicator associated with the first data track indicating the sector of the first data track that may be squeezed; cause a write head to write to the second data track data to the corresponding sector of the second data track; and cause data corresponding to the sector of the first data track that may be squeezed to be copied from the secondary write buffer and to another buffer.

DETAILED DESCRIPTION

This disclosure describes systems and techniques for improving data integrity while writing to a Shingled Magnetic Recording (SMR) magnetic data storage device under external vibrations. In an SMR magnetic device, adjacent data tracks may partially overlap, which may increase a data track density, but also increase a likelihood that writing data to a later-written data track (a “second data track”) affects data stored on an adjacent, previously written data track (a “first data track”). The disclosure describes techniques for protecting data stored by the first data track during writing of data to the second data track, e.g., by not writing data to the second data track if the distance between the write head and the first data track is below a threshold distance value, or by indicating data in the first data track as potentially being affected by the writing of data to the second data track and maintaining or creating a copy of the indicated data in the first data track at a different location (e.g., a buffer or the like).

The described techniques may allow an SMR magnetic data storage device to increase the data track density (also referred to as “tracks-per-inch” or “TPI”) and maintain the integrity of data stored when the SMR magnetic data storage device experiences external vibrations. The described techniques may enable the SMR magnetic data storage device to determine whether writing data to a second data track is likely to corrupt or “squeeze” data written to a first data track. To determine whether writing data to the second data track is likely to “squeeze” data written to the first data tack, at least one processor may determine a respective position error signal (PES) value associated with the write head at a servo location associated with the sector of the first data track and at a servo location associated with the sector of the second, adjacent data track. The at least one processor may utilize these respective PES values to determine a PES distance, which is representative of a spacing between the position of the write head during the writing of data to the sector of the first data track and the position of the write head during the writing of data to the sector of the second, adjacent track.

The PES distance may indicate a likelihood that writing data to the second data track will affect data stored at the first data track. For example, under normal operating conditions (e.g., the storage device does not experience external vibrations), the PES distance may be relatively large for a servo location. The relatively large PES distance may indicate that the spacing between the position of the write head during the writing of data to the first data track and the position of the write head during the writing of data to the second track was relatively large, which may indicate a low likelihood that writing data to the second data track will affect data stored at the first data track.

Conversely, under certain conditions (e.g., the storage device experiences external vibrations), the PES distance may be relatively small for a servo location. The relatively small PES distance may indicate that the spacing between the position of the write head during the writing of data to the second data track and the position of the write head during the writing of data to the first data track was relatively small, which may indicate a higher likelihood that writing data to the second data track will affect data stored at the first data track.

In some examples, the at least one processor may compare the PES distance to a threshold PES distance. A PES distance below a predetermined threshold PES difference may indicate an increased likelihood that writing data to the second data track may affect data stored at the first data track. The at least one processor may determine the data on this first data track has an increased likelihood of the being affected based on the PES distance. The at least one processor may designate the first data track as a “squeezed” data track if the PES difference is less than the threshold PES distance.

In some examples, the at least one processor may be configured to determine respective PES values for at least one sector of the first and second data tracks and a corresponding PES distance for each servo location of the plurality of servo locations in the data track. The at least one processor may compare each respective PES distance to the threshold PES distance and determine whether each respective PES distance indicates that writing data to the second data track will “squeeze” the first data track at the respective servo location. In some examples, if the PES distance indicates that writing data to the second data track will squeeze the first data track, the at least one processor may cause a write head to refrain from writing data to the second data track (in other words, the sector is skipped) and may write the data corresponding to the skipped sector to a different location. In other examples, the at least one processor may cause data at the first data track to be copied to a buffer prior to causing the write head to write data to the second data track. By refraining from writing at least one sector of the second data track, or by copying data from the sector of the first data track that may be squeezed prior to writing the second data track, the hard drive may retain a valid copy of the data in the sector of the first data track.

In this way, the techniques described in this disclosure may maintain integrity of the data stored by the SMR magnetic data storage device. By detecting potentially squeezed sectors prior to writing data and refraining from writing or writing data to another location, the SMR magnetic data storage device may reduce the throughput degradation that may occur by attempting to rewrite data to the same sector repeatedly. In some examples, the described techniques may reduce write throughput under external vibration by about 40% to about 60% compared to full throughput with no rewrites. By reducing the write throughput loss, the techniques described herein may reduce the decrease in performance caused by re-locating data, while still allowing use of SMR magnetic media and the accompanying increase in tracks-per-inch and storage capacity SMR magnetic media provides.

FIG. 1is a conceptual and schematic block diagram illustrating an example storage environment2in which storage device6may interact with a host device4, in accordance with one or more techniques of this disclosure. For instance, host device4may store data on or retrieve data from storage device6. In some examples, storage environment2may include a plurality of storage devices, such as storage device6, which may operate as a storage array. For instance, storage environment2may include a plurality of storage devices6configured as a redundant array of inexpensive/independent disks (RAID) that collectively function as a mass storage device for host device4. While techniques of this disclosure generally refer to storage environment2and storage device6, techniques described herein may be performed in any storage environment that utilizes tracks of data.

As illustrated inFIG. 1, host device4may communicate with storage device6via interface14. Host device4may include any of a wide range of devices, including computer servers, network attached storage (NAS) units, desktop computers, notebook (i.e., laptop) computers, tablet computers, set-top boxes, telephone handsets such as so-called “smart” phones, so-called “smart” pads, televisions, cameras, display devices, digital media players, video gaming consoles, video streaming device, and the like. Host device4may include any device having a processing unit, which may refer to any form of hardware capable of processing data and may include a general purpose processing unit (such as a central processing unit (CPU), dedicated hardware (such as an application specific integrated circuit (ASIC)), configurable hardware such as a field programmable gate array (FPGA) or any other form of processing unit configured by way of software instructions, microcode, firmware, or the like.

As illustrated inFIG. 1, storage device6may include an interface14, a controller7, a hardware engine10, at least one cache9, and at least one magnetic data storage device12. Some examples of storage device6may include additional components not shown inFIG. 1for ease of illustration. For example, storage device6may include power delivery components such as a capacitor, super capacitor, battery, or the like; a printed board (PB) to which at least some components of storage device6are mechanically attached and which includes electrically conductive traces that electrically interconnect components of storage device6; or the like. In some examples, the physical dimensions and connector configurations of storage device6may conform to one or more standard form factors. Some example standard form factors may include 3.5″ hard disk drive (HDD), 2.5″ HDD, or 1.8″ HDD.

Storage device6may include interface14for interfacing with host device4. Interface14may include one or both of a data bus for exchanging data with host device4and a control bus for exchanging commands with host device4. Interface14may operate in accordance with any suitable protocol. For example, interface14may operate in accordance with one or more of the following protocols: advanced technology attachment (ATA) (e.g., serial-ATA (SATA), and parallel-ATA (PATA)), Fibre Channel, small computer system interface (SCSI), serially attached SCSI (SAS), peripheral component interconnect (PCI), and PCI-express (PCIe). The electrical connection of interface14(e.g., the data bus, the control bus, or both) is electrically connected to controller7, providing electrical connection between host device4and controller7, allowing data to be exchanged between host device4and controller7. In some examples, the electrical connection of interface14may also permit storage device6to receive power from host device4.

Storage device6may include controller7to manage one or more operations of storage device6. Controller7may interface with host device4via interface14and manage the storage of data to and the retrieval of data from magnetic data storage device12accessible via hardware engine10. Controller7may, as one example, manage writes to and reads from the magnetic data storage device12. In some examples, controller7may be a hardware controller. In other examples, controller7may be implemented into storage device6as a software controller. Controller7may further include one or more modules that perform techniques of this disclosure, such as error management module16.

In the example ofFIG. 1, storage device6includes hardware engine10, which may represent the hardware responsible for interfacing with magnetic data storage device12. Hardware engine10may, in the context of a platter-based hard disk drive, include the servo control, the magnetic read head or the magnetic read/write head. The read and write heads may be on the same head carrier (also called the read/write head8). The head carrier may travel over the surface of the magnetic storage media in magnetic storage device12during operation. Although described in the following examples as being performed in the context of a hard disk drive, the techniques described in this disclosure may be extended to any type of hardware engine.

Storage device6may include at least one cache9that may be used as temporary data storage as a performance enhancement. Cache9may be used for read and write caching. In some examples, a write cache (also referred to as a write buffer) allows the drive to write data out to the disk media, such as magnetic data storage device12, at some time after reporting to the host6that the write operation had been completed. Storage device6may report completion of the write command to the host6in response to the data to be written being transferred to the write buffer. This data may be protected provided power is not removed from the drive. In read caching, controller7may cause data to transfer from magnetic data storage device12to a read cache (also referred to as a read buffer), in anticipation that the data is data that host6may request next. In some examples, a single cache may be used as a write cache and a read cache. In some examples, cache9may be used to store information about the drive, such as PES values for one or more tracks of data.

In the example ofFIG. 1, magnetic data storage device12may store information for processing during operation of storage device6. For instance, storage device6may store data that controller7may access. In some examples, magnetic data storage device12represents a magnetic data storage disk.

The data in magnetic data storage device12may be stored in a plurality of annular tracks. The tracks may be divided into a plurality of data sectors. In some examples, each track includes hundreds or thousands of data sectors. The number of data tracks in magnetic data storage device12may be increased by decreasing the width of the tracks, decreasing the spacing between adjacent tracks, or both. The width of the tracks and spacing between adjacent tracks may be limited by the size (e.g., in the direction of the width of the track) of the read/write head of hardware engine10.

In some examples of the techniques described herein, the tracks in magnetic data storage media12may use Shingled Magnetic Recording (SMR), also called Shingled Writing, to increase the tracks-per-inch. In SMR, the write head writes data to data tracks that partially overlap. The non-overlapped portions of adjacent data tracks form the shingled data tracks (SDT), which are narrower than the width of the write head. As the read head is narrower than the write head in the direction of the track width, the narrower read head data may read the data from the SDT.

Each data sector of an SDT may be preceded by a synchronization (sync) field, detectable by the read head, for enabling synchronization of reading and writing data to the data sectors. Also, each SDT may include a plurality of circumferentially or angularly-spaced servo locations that contain positioning information detectable by the read head for coordinating moving of the read/write head of hardware engine10to selected positions of the SDTs and maintaining the read/write head over the SDTs during the read and write operations. This pre-written servo pattern may be written during manufacturing process and data sectors may be allocated among these servo patterns during a write operation.

Because adjacent SDTs overlap, writing data to a second, later written track may, in some examples, affect data stored by a first, adjacent track to which data was previously written. In particular, if magnetic data storage device12experiences external vibrations while attempting to write data, external vibrations may cause write head8to shift position compared to a nominal position over the data track to which write head8is writing data. The position shift may include a shift closer to the first track at least some of the time, increasing a likelihood that data stored by the first track may be affected by writing of data to the second track. The reduced distance between the position of the write head8and the first data track may be referred to as a “squeeze.”

Error management module (EMM)16may be configured to detect external vibrations affecting of storage device6and determine whether writing data to a sector of the second data track is likely to squeeze a corresponding sector of the first data track. In some examples, storage device6may include sensors to detect external vibrations (e.g., one or more accelerometers, one or more gyroscopes, or the like). For example, EMM16may receive a signal from a sensor and determine that storage device6is experiencing external vibrations based on the signal received from the sensor. In some examples, EMM16may be configured to enable the technique of determining whether writing data to a sector of the second data track is likely to squeeze a corresponding sector of the first data track in response to detecting external vibrations. In other examples, EMM16may be configured to determine whether writing data to a sector of the second data track is likely to squeeze a corresponding sector of the first data track regardless of whether storage device6is experiencing external vibrations.

In some instances, EMM16may determine whether writing to the sector of the second data track is likely to squeeze a corresponding (adjacent) sector of the first data track based on a PES value associated with the sector of the second data track and, optionally, a PES value associated with the corresponding sector of the first data track. The PES values may indicate a position of write head8of hardware engine10over magnetic data storage device12as write head8passes over the servo location, and, in some examples, may refer to a relative offset of the position from the radial center of the respective track.

In some examples, EMM16may determine the respective PES values for the respective sectors of the first data track, which may include previously written data. For example, EMM16may determine the respective PES values as write head8writes data to the first data track. In some examples, EMM16may cause the PES values for the sectors of the first data track to be stored in a PES buffer. In this way, EMM16may determine the PES values by reading the PES values from the PES buffer without causing read/write head8to re-pass over the first track. In some examples, EMM16may cause the PES values for the first data track to be stored in non-volatile memory. As a result, the PES values for the first data track may be retained in the event that power is lost and the PES values may be copied from the non-volatile memory to the PES buffer once power is restored.

In some examples, controller7may initiate a first write operation to write at least a portion of data stored at a write buffer to a second data track of magnetic data storage device12. During the first write operation, EMM16may determine a PES value associated with a particular sector of the second data track. EMM16may cause the PES value associated with the particular sector of the second data track to be stored in the PES buffer.

During the first write operation, EMM16may, in some examples, determine whether to cause write head8to write data to the particular sector based on the PES value associated with the sector of the second data track and, optionally, the PES value associated with the corresponding sector of the first data track. For example, EMM16may determine a PES distance based on the PES value associated with the sector of the second data track and the PES value associated with the corresponding sector of the first data track. The PES distance may be representative of spacing between the position of the write head during the writing of data to the first track and the position of the write head during the writing of data to the second, adjacent track.

EMM16may determine whether to cause write head8to write data to a particular sector of the second data track by comparing the PES distance to a threshold PES distance. The threshold PES distance may depend on the structure, track spacing, material or other characteristics of magnetic data storage device12. The threshold PES distance may be selected to be a value below which a PES distance indicates a relatively high likelihood that writing data to the sector of the second track will affect the data in a corresponding sector of the first data track. For example, if the PES distance is less than a threshold PES distance, this indicates the write head may come sufficiently close to the first track while writing data to the second track that writing data to the second track is likely to affect data stored by the first data track. Thus, if EMM16determines that the PES distance is less than the threshold PES distance, EMM16may determine that writing data to the sector of the second data track will likely “squeeze” the corresponding sector of the first data track (which may be due to storage device6experiencing external vibrations).

As another example, EMM16may determine whether to cause write head8to write data to the particular sector based on the PES value associated with the sector of the second data track and a threshold PES value. The threshold PES value may be set to be a value below which it is likely that the writing of data to the sector of the second data track will likely “squeeze” the sector of the first data track.

As a result of the comparison, in some examples, EMM16may cause write head8to refrain from writing data to the sector of the second data track and may set an indicator indicating data was not written to the sector of the second data track. For example, the indicator may indicate data was not written to the second data tack by identifying the data from the write buffer that was not written to the sector of the second data track. In some examples, the indicator may indicate the unwritten sector is invalid. EMM16may cause the data that was not written to the sector of the second data track to be written to a subsequent data track or to another storage device. In this way, EMM16may avoid squeezing existing data on the first data track, while still writing the data for the sector of the second data track to a later track.

In some examples, instead of causing write head8to refrain from writing data to the sector of the second data track, if EMM16determines that writing data to the sector of the second data track will likely squeeze data in a corresponding sector of the first data track, EMM16may cause write head8to write data to the sector of the second data track and may set an indicator indicating the data stored at the corresponding sector of the first data track may be squeezed. For example, the indicator may indicate the sector of the first data track is invalid. In some examples, the indicator may identify a copy of the data corresponding to the potentially squeezed sector of the first data track. For example, prior to writing data to the sector of the second data track, EMM16may cause data from the first data track to be copied to a secondary write buffer. If EMM16determines that writing the data to a sector of the second data track will likely squeeze the corresponding sector of the first data track, the indicator may identify a copy of the potentially squeezed data in the secondary write buffer. In some examples, EMM16may cause the copy corresponding to the squeezed data to be copied from the secondary write buffer to the write buffer. Once the copy corresponding to the potentially squeezed data is copied to the write buffer, EMM16may cause the data from the write buffer to be written to a non-volatile memory device such as magnetic data storage device12. For example EMM16may cause write head8to write the data from the write buffer to the end of the second data track, or to a third, different data track. In this way, EMM16may help ensure that magnetic data storage device12maintains a valid copy of all of the data that previously existed on magnetic data storage device12and the data received from host device4during writing of data to magnetic data storage device12.

Upon completion of writing data to the second data track, controller7may cause write head8to write data to a third data track that is adjacent to the second data track as part of the first write operation, or may initiate a second write operation to cause write head8to write data to the third data, adjacent data track after writing data to the second data track. During the writing of data to the third, adjacent data track, EMM16may, in some examples, determine whether writing data to the third, adjacent data track is likely to squeeze an adjacent sector of the second data track. For example, during writing of data to the third data track, EMM16may determine the PES values for the third data track and store the PES values for the third data track to the PES buffer. EMM16may determine whether the PES distance between the sector of the third data track and a corresponding (adjacent) sector of the second data track is less than a threshold distance. If the PES distance between the sector of the third data track and the corresponding sector of the second data track is less than a threshold distance, EMM16may determine that writing data to the sector of the third data track will likely squeeze the corresponding sector of the second data track (e.g., due to storage device6experiencing external vibrations). As a result, in some examples, EMM16may cause write head8to refrain from writing data to the sector in the third data track and may set an indicator indicating that the data was not written. In other examples, EMM16may cause write head8to write the data to the particular sector of the third data track and may set an indicator indicating that the data stored at the corresponding (adjacent) sector of the second data track may be corrupt or squeezed.

Controller7may initiate additional write operations or continue writing data to additional data tracks. During each additional write operation or write to additional data tracks, controller7may cause write head8to write data to subsequent tracks until all of the data in the write buffer has been written to magnetic data storage device12and/or has been skipped over. Once all of the data has been written or skipped, EMM16may cause data corresponding to the skipped sectors and the squeezed sectors to be written to a non-volatile memory device. For example, EMM16may cause write head8to attempt to write data corresponding to the skipped or squeezed sectors to another portion of magnetic data storage device12(e.g., a fourth data track in an SMR portion of device12or a non-shingled portion of device12). In some examples, EMM16may cause data corresponding to the skipped or squeezed sectors to be written to a secondary non-volatile storage area (e.g., flash memory) until EMM16determines that the drive is no longer experiencing external vibrations. Upon determining that the drive is no longer experiencing external vibrations, EMM16may cause the data to be copied from the non-volatile storage area to a fourth data track of magnetic data storage device12.

The techniques described in this disclosure may enable storage device6to maintain data integrity by determining whether writing new data will likely squeeze existing data and writing the new or existing data to another portion of storage device6. Additionally or alternatively, the techniques may reduce the number of write attempts that may otherwise occur if storage device6repeatedly attempts to re-write data to a particular sector, which may decrease throughput loss while still increasing the number of tracks-per-inch of storage device6.

FIG. 2is a conceptual and schematic block diagram illustrating a more detailed view of an example controller7, in accordance with one or more techniques of this disclosure. In some examples, controller7may include error management module (EMM)16, a servo control module22, an address translation module24, a read module26, and a write module28. In other examples, controller7may include more or fewer modules. Controller7may include a microprocessor, digital signal processor (DSP), application specific integrated circuit (ASIC), field programmable gate array (FPGA), or other digital logic circuitry. In some examples, controller7may be a system on a chip (SoC).

Controller7may interface with the host device4via interface14and manage the storage of data to and the retrieval of data from a magnetic data storage device12. For example, write module28of controller7may receive a message from host device4via interface14instructing storage device6to store data associated with a logical address and the data and may manage writes to the magnetic data storage device12and the temporary storage in cache9.

In some examples, write module28may communicate with address translation module24. Address translation module24may manage translation between logical addresses, sometimes called logical block addresses (LBA) and physical addresses, sometimes called physical block addresses (PBA). Host device4may use LBAs to manage storage locations of data while write module28may use physical block addresses to direct writing of data to magnetic data storage device12. Address translation module24of controller7may utilize a translation layer or table that translates logical addresses of data stored by magnetic data storage device12to physical addresses of data stored by magnetic data storage device12. For example, host device4may utilize the logical addresses of the data stored by magnetic data storage device12in instructions or messages to storage device6, while write module28utilizes physical addresses of the data to control writing of data to magnetic data storage device12. The physical addresses may correspond to actual, physical location of the data on magnetic data storage device12.

Read module26may control reading of data from magnetic data storage device12and temporary storage in cache9. For example, read module26may receive a message from host device4requesting data with an associated logical block address. Address translation module24may convert the LBA to a physical address using the translation layer or table. Read module26then may control a read channel12to retrieve the data from a physical block addresses via hardware engine10.

In the example ofFIG. 2, servo control module22may control the physical position of the read/write head, which in some examples is part of hardware engine10. Servo control module22may control hardware engine10to move the read/write head to the physical address required to retrieve data requested by read channel12. Similarly, servo control module22may control hardware engine10to move the read/write head to a location requested by write module28to write data to magnetic data storage device12. Servo control module22may track the physical position of the read/write head relative to magnetic data storage device12in order to determine the PES, or may communicate a signal indicative of the physical position of the read/write head to EMM16for use in determining the PES. While shown as included in controller7, in some examples servo control module22may be included in a read channel, such that servo control module22may determine the PES values and the read channel may send a signal indicative of the PES values to controller7.

EMM16may include error detection module18and error correction module20. In some examples, error detection module18may detect external vibrations affecting storage device6, and also may determine whether writing data to a second data track is likely to affect or “squeeze” pre-existing data at an adjacent, first data track. In response to detecting that writing data to the second data track is likely to affect data at the first data track, error detection module18may take action to preserve the pre-existing data written to the first data track. For example, error detection module18may cause write head8to refrain from writing data to a sector of the second data track if writing data to that sector is likely to squeeze a corresponding adjacent sector of the first track. Error detection module18may set an indicator indicating the data was not written at the sector of the second data track. Error correction module20may write or cause write head8to write the data that was not written at the sector of the second data track to another location. In some examples, error correction module20may take action to preserve the pre-existing data written to the first data track by causing a copy of the data at the first data track to be written to another location prior to writing data to a portion of the second data track. Further details regarding operation of controller7, including EMM16, error detection module18, and error correction module20will be described below with reference toFIGS. 3-8.

FIG. 3is a flow diagram illustrating an example technique that at least one processor may implement for maintaining the integrity of data stored by a magnetic data storage device, in accordance with one or more techniques of this disclosure. Various components and modules (e.g., error management module16) of storage device6may perform the techniques described in this disclosure. The technique ofFIG. 3will be described with respect to storage environment2ofFIG. 1and controller7ofFIGS. 1 and 2for purposes of illustration. However, it will be understood that the technique ofFIG. 3may be performed by a different processor or in a different storage environment, and that controller7and storage environment2may perform other techniques.

Controller7may receive a write command from host device4via interface14(40). The write command may include data and at least one LBA indicating the logical address with which the data is associated. In some examples, controller7may receive the write command and cause the data to be stored in a cache9, such as a write buffer.

In response to receiving data from host device4, controller7may determine whether write head8has written any of the data in the write buffer to magnetic data storage device12(42) and may cause write head8of hardware engine10to perform write operations to magnetic data storage device12. For example, after receiving a write command from host8, controller7may determine that none of the data received as part of the write command has been written from the write buffer to magnetic data storage device12. As a result, controller7may begin a first write operation. In some examples, magnetic data storage device12includes pre-existing data at a first data track from a previous write operation. Thus, during a first write operation for the newly received write command, write module28may determine a subset of data in the write buffer to write to a second data track of magnetic data storage device12.

During the first write operation, error detection module (EDM)18may determine whether writing data to a sector of the second data track is likely to squeeze data stored at a corresponding sector of the first data track. In some examples, EDM18may base this determination at least in part on whether storage device6is experiencing external vibrations at the time of the first write operation. Additionally or alternatively, EDM18may base the determination at least in part on a PES value associated with the sector of the second data track and/or a PES value associated with the corresponding (adjacent) sector of the first, adjacent data track. Controller7may determine a PES value associated with a sector of the second data track (44). In some examples, controller7may also determine a PES value associated with a corresponding sector of the first, adjacent data track. In some examples, servo control module22may track the physical position of the read/write head relative to magnetic data storage device12in order to determine the PES value associate with the sector of the second data track and/or the PES value of the corresponding adjacent sector of the first data track. However, in some examples, servo control module22may communicate a signal indicative of the physical position of the read/write head to EDM18for use in determining the PES values for the respective sectors.

In some examples, EDM18may determine whether the distance between a sector of the second data track and a corresponding sector of the first data track is less than a threshold distance (46). For example, EDM18may determine whether the PES value associated with the sector of the second data track is less than a threshold value. In another example, EDM18may determine a PES distance and determine whether the PES distance is less than a threshold PES distance. For instance, EDM18may determine a PES distance based on the PES value associated with the sector of the second data track and the PES value associated with the corresponding sector of the first data track. A distance less than the threshold distance may indicate that writing data to the second data track is likely to squeeze data in the first data track, and may be caused by storage device6experiencing external vibrations. If the distance is greater than or equal to the threshold distance, this may indicate that writing data to the second data track is unlikely (or less likely) to affect data in the first data track. As a result, EMM16may cause write head8to write data to the second data track (56).

In some examples, if the PES distance is less than a threshold PES distance, EDM18may cause write head8to refrain from writing data to the sector of the second data track (48). Further, EDM18may set an indicator indicating data was not written to the second data track (50). In some examples, the indicator may indicate data was not written to the second data track by identifying a portion of data in the write buffer was not written to the second data track. For example, the indicator may include a write buffer address to identify the data from the write buffer that was not written to the sector of the second data track. In some examples, EDM18may set the indicator indicating the data was not written by setting the unwritten sector to an invalid state (e.g., by updating an “invalid” flag). Error correction module (ECM)20may cause the data that was not written to the sector of the second data track to be written to a subsequent data track or to another storage device. As a result, EMM16may cause the received data to be written to magnetic data storage device12and may avoid squeezing existing data on the first data track.

In some examples, after writing data to the second data track, storage device6may release the portion of the write buffer corresponding to the written data such that the portion of the write buffer may be used to store additional data as it is received from the host. However, in some examples, storage device6may store the data in the write buffer until write head8has finished writing all of the data associated with the write command.

Controller7may cause write head8to write data to subsequent data tracks, such as a third data track, a fourth data track, etc. Controller7may cause write head8to write to a fourth data track as part of the first write operation, or may initiate a second write operation to cause write head8to write data to the fourth data track. Write module28may determine a second subset of data from the write buffer to cause write head8to write to a fourth data track.

During writing to the fourth data track, EDM18may determine whether writing data to a sector of the fourth data track is likely to squeeze data stored at a corresponding sector of the third, adjacent data track (which may indicate external vibrations) based on a PES value associated with the sector of the fourth data track and a PES value associated with the corresponding sector of the third data track. Servo control module22or EDM18may receive the PES value associated with the sector of the fourth data track and the PES value associated with the corresponding adjacent sector of the third data track (52). Controller7may determine a PES distance based on the PES value associated with the sector of the fourth data track and the PES value associated with the corresponding sector of the third data track (54). In response to determining that the PES distance is greater than a threshold PES distance, EDM18may cause write head8to write a portion of the data to the sector of the fourth data track (56).

In some examples, in response to determining that the PES distance is less than the threshold PES distance, EDM18may cause write head8to refrain from writing to the sector of the fourth data track. However, in some examples, EDM18may cause write head8to write to the sector of the fourth data track and may set an indicator indicating the sector of the third data track may be squeezed. In some examples, the indicator may indicate a portion of data in the write buffer that corresponds to the potentially squeezed sector of the third data track (58). For example, the indicator may include a write buffer address that specifies data in the write buffer that was written to the potentially squeezed sector of the third track. ECM20may cause data corresponding to the potentially squeezed sector to be written to a subsequent data track or to another storage device.

Write module28may determine additional subsets of data to write at subsequent data tracks using the techniques described above. EDM18may determine whether writing data to the subsequent data tracks is likely to squeeze the previously written data tracks. In response to determining that writing to the subsequent data tracks is likely to squeeze a previously written data track, EDM18may cause write head8to refrain from writing to a sector of the subsequent track, or may set an indicator that indicates data in the write buffer to be re-written to another location. In this way, EMM16may cause all of the data in the write buffer to be written to the storage device6without losing data that may be corrupted or squeezed by writing subsequent data.

FIGS. 4A-4Jare conceptual diagrams illustrating an example technique that at least one processor may implement for maintaining the integrity of data stored by a magnetic data storage device, in accordance with one or more techniques of this disclosure. For purposes of illustration, the technique will be described with reference to the flow diagram ofFIG. 3and with respect to storage environment2ofFIG. 1and controller7ofFIGS. 1 and 2. However, it will be understood that the technique ofFIGS. 4A-4Jmay include additional or fewer steps.

With reference toFIG. 4A, in some examples, storage device6may include one or more magnetic data storage devices12. Magnetic data storage device12may include a non-shingled track region and a shingled track region404. Shingled track region404includes a plurality of data tracks, and each track includes a plurality of sectors. Shingled track region404may include pre-existing data at a first data track. As used throughout this disclosure, the term “data track” may refer to a plurality of sectors that are not necessarily the same radial distance from the center of a disk platter. Rather, one or more sectors of the data track may be a first radial distance from the center of the disk platter and one or more sectors of the data track may be a second radial distance from the center of the disk platter. For example and for purposes of illustration only, inFIG. 4A, the first data track420is defined by sectors420A-420G, as shown by shaded region421. For ease of illustration, only sectors420A and420G are explicitly labeled. However, it is to be understood that labels for other sectors may be inferred and that first data track420includes sectors420A,420B,420C,420D,420E,420F, and420G. For ease of illustration only, shingled track region404is shown with seven sectors per data track. However, it is to be understood that each track of shingled track region404may include any number of sectors.

Storage device6may include one or more cache devices9, such as write buffer402and PES buffer406. In some examples, write buffer402and PES buffer406may be part of the same physical cache9, or may be independent cache devices. Write buffer402may temporarily store data received from host device4. PES buffer406may store PES values associated with data tracks of shingled track region404. In some examples, PES buffer406may include two or more buffer regions, such as PES buffer region P1and PES buffer region P2. PES buffer region P1may store PES values associated with a first data track of shingled track region404and a PES buffer region P2may store PES values associated with a second data track of shingled track region404. In some examples, PES buffer region P1may store PES values associated with one or more sectors of data previously written at first data track420.

With further reference toFIG. 4A, storage device6may receive a write command and data from host device4. In some examples, controller7may receive the write command and cause the data to be stored in write buffer402.

In response to receiving the write command and data from host device4, controller7may initiate a first write operation associated with the received write command, as illustrated inFIG. 4B. During the first write operation, write module28may determine a first subset of data, defined by sections422A-422G, as shown by shaded region423, to write to a second data track of shingled track region404. For purposes of illustration only, second data track424is defined by sectors424A-424G.

During the first write operation, controller7may determine a PES value associated with a first sector of second data track424(e.g., sector424A) and a corresponding sector of adjacent, first data track420(e.g., sector420A). As described above, servo control module22may track the physical position of the read/write head and determine the PES value associated with sector424A, or servo control module22may communicate a signal indicative of the physical position of the read/write head to EDM18for use in determining the PES value associated with sector424A. EDM18may cause the PES value associated with sector424A to be stored to PES buffer region P2. In some examples, EDM18may determine the PES value associated with sector420A by retrieving the value from PES buffer region P1.

EDM18may determine whether writing data to sector424A of second data track424is likely to squeeze data stored at a corresponding sector420A of the first data track420(which may occur if storage device6experiences external vibrations) based on the PES values associated with the respective sectors. For example, EDM18may determine a PES distance based on the PES values and determine whether the PES distance is less than a threshold PES distance. A PES distance greater than a threshold PES distance may indicate that writing data to sector424A is not likely to squeeze data stored at sector420A. In response to determining that the PES distance associated with sectors424A and420A is greater than the threshold PES distance, as illustrated inFIG. 4B, controller7may cause write head8to write data to sector424A of second track424and to move to the next sector of second data track424(e.g., sector424B).

In response to the write head moving to sector424B, controller7may determine the PES value associated with sector424B and may store the PES value in PES buffer region P2. EDM18may retrieve the PES value associated with sector420B of the first data track from PES buffer region P1. EDM18may determine whether writing data to sector424B of second data track424is likely to squeeze sector420B of adjacent, first data track420by determining a PES distance associated with the PES values associated with sectors424B and420B, respectively. A PES distance less than the threshold PES distance may indicate that writing data to sector424B is likely to affect, or “squeeze”, data stored at sector420B. In some examples, if EDM18determines that the PES distance associated with sectors424B and420B is less than the threshold PES distance, as illustrated inFIG. 4B, controller7may cause write head8to refrain from writing data to sector424B of second data track424. As a result, controller7may cause write head8to move to the next sector of second data track424(e.g., sector424C).

In some examples, EDM18may set an indicator indicating that data that was not written to sector424B. For example, the indicator may specify a write buffer address or range of write buffer addresses corresponding to the data that was not written sector424B. In some examples, EDM18may set an indicator indicating that sector420B is invalid.

For each of the subsequent sectors of second data track424(e.g., sectors424C-424G), controller7may determine the PES value associated with the respective sector of second data track424and the PES value associated with a corresponding sector of first, adjacent data track420. For each sector of second data track424, EDM18may determine whether writing data to the respective sector is likely to squeeze data in the corresponding sector of first data track420based on a PES distance associated with the sector of second data track424and the corresponding sector of first data track420. In some examples, if EDM18determines that the PES distance is less than a threshold PES distance, EDM18may cause write head8to refrain from writing to the sector of second data track424, set an indicator indicating the data corresponding to the sector that was not written (also referred to as a skipped sector) and move to the next sector of second data track424. After EDM18has determined whether to write data to each of sectors424A-424G of second data track424, controller7may prepare to write data to a third data track that is adjacent to the second data track.

During preparing to write data to the third data track, controller7may cause the PES values associated with second data track424to be copied from PES buffer region P2to PES buffer region P1so that PES values associated with a third data track may be stored in PES buffer region P2. Write module28may determine a second subset of data, defined by regions426A-426G, as shown by shaded region427, to write to a third data track of shingled track region404. For purposes of illustration only, third data track428is defined by sectors428A-428G, as illustrated inFIG. 4C.

During writing to the third data track, EDM18may determine whether to write data to a sector of the third track based on a PES value associate with the particular sector of the third data track and a corresponding sector of the adjacent, second data track. However, in some examples, controller7may cause write head8to write data to the third data track regardless of the respective PES values. In either case, EDM18may determine the PES values for the respective sectors and determine whether writing data to third data track428is likely to squeeze data previously written at second data track424. For example, controller7may determine a PES value associated with a first sector of third data track428(e.g., sector428A) and a corresponding sector of adjacent, second data track424(e.g., sector424A). EDM18may cause the PES value associated with sector428to be stored to PES buffer region P2. In some examples, EDM18may determine the PES value associated with sector424A by retrieving the value from PES buffer region P1.

EDM18may determine a PES distance associated with sector428A and sector424A and determine whether the PES distance is less than a threshold distance. If the PES distance is greater than the threshold PES distance, EDM18may determine that writing data to a sector of the third data track is not likely to squeeze the corresponding sector of adjacent second data track424. However, if the PES distance is less than the threshold PES distance, EDM18may determine whether writing data to a sector of third data track428will likely squeeze a sector of the second, adjacent data track. For example, EDM18may determine a PES distance associated with sectors428E and424E and determine that the PES distance is less than the threshold PES distance. Further, EDM18may set an indicator indicating the sector may be squeezed. For example, the indicator may identify data in write buffer402corresponding to the data stored at sector424E. Because the data written to sector424E still exists in write buffer402, the indicator may specify a write buffer address, or a range of write buffer addresses, corresponding to the data at sector424E. In some examples, EDM18may set the indicator by setting an invalid flag for sector424E to be invalid and write module28may cause write head8to write data to sector428E and move to sector428F.

For the remaining sectors of third data track428, EDM18may determine whether writing data to a particular sector is likely to squeeze a corresponding adjacent sector of second data track424. If EDM18determines that writing data to a sector of third data track428is likely to squeeze a corresponding, adjacent sector of second data track424, EDM18may set an indicator indicating the corresponding sector of the second data track is likely to be squeezed. In response to completing writing data to third data track, controller7may cause the PES values associated with sectors428A-428G to be copied from PES buffer region P2to PES buffer region P1so that PES values associated with a subsequent data track may be stored in PES buffer region P2.

Controller7may determine additional subsets of data to write at subsequent data tracks of shingled track region404. For instance, as shown inFIG. 4E, controller7may determine a third subset of data, as shown by shaded region431, to write to a fourth data track432(defined by sectors432A-432G); a fourth subset of data, as shown by shaded region435, to write to a fifth data track436(defined by sectors436A-436G); a fifth subset of data, as shown by shaded region439, to write to at least a portion of a sixth data track440(defined by sectors440A-440E). During writing the respective data tracks, EDM18may cause the PES values associated with each sector of the respective data track to be stored in PES buffer region P2. EDM18may continue to determine whether writing data to a sector of a subsequent track (e.g., sixth data track440) is likely to squeeze data at a previously written track (e.g., fifth data track436). If EDM18determines that writing the data to a subsequent track will squeeze previously written data, EDM18may set an indicator indicating the data stored at the sector of the previous track is likely to be squeezed (e.g., by specifying an address corresponding a copy of the data and/or by setting an invalid flag). After completing writing a particular data track, controller7may cause the PES values to be copied from PES buffer region P2to PES buffer region P1so that the PES values associated with the next data track may be stored in PES buffer region P1.

In summary, as illustrated by the example ofFIG. 4E, EDM18may determine that writing data to sector424B of second data track424will likely squeeze a corresponding adjacent sector of first data track420, refrain from writing data to sector424B, and set an indicator indicating that data at section422B of write buffer was not written. Likewise, EDM118may determine that sectors424E,428D,432F, and436C are likely to be squeezed when subsequently writing the adjacent tracks. Further, EDM18may set an indicator indicating that data sections422E,426D,430F, and434C of write buffer402correspond to each of the respective potentially squeezed sectors.

ECM20may perform a data relocation operation after controller7has caused write head8to write to one or more data tracks. ECM20may determine a subset of data from write buffer402that includes the sections of data corresponding to the sectors of shingled track region404that were either skipped (i.e., not written) or likely to be squeezed, the subset of data being referred to as relocation data. As illustrated inFIG. 4F, the relocation data may include data from sections422B,422E,426D,430F, and434C of write buffer402. ECM20may cause the relocation data to be written to the next data track. In some examples, the relocation data may be written to a portion of the previous data track and at least a portion of the next data track. For example, ECM20may cause a portion of the relocation data to be written to the remaining sectors (e.g., sectors440F and440G) of the sixth data track and one or more sectors (e.g., sectors444A-444C) of a seventh data track.

During the data relocation operation, EDM18may determine whether writing the relocation data is likely to squeeze any of the previously written data by determining whether a PES distance associated with a pair of sectors is less than a threshold PES distance. As described above, EDM18may determine a PES distance associated with a sector of the relocation data (e.g., one of sectors440F-444C) and the corresponding sector of the previously written adjacent data track (e.g., sectors436F-440C, respectively). If EDM18determines that the PES distance is greater than the threshold PES distance, EDM18may cause write head8to write the relocation data to the respective sectors. In some examples, EDM18may determine that the PES difference is less than a threshold PES distance. For example, as illustrated inFIG. 4G, the PES distance associated with sector440B and sector444B may be less than a threshold PES distance. As a result, EDM18may determine that the data stored at sector440B is likely to be squeezed. In some examples, EDM18may determine that data at section438B of write buffer402corresponds to section440B and may cause data from section438B to be re-written to a subsequent sector of shingled track region404. In such an example, EDM18may determine whether writing data to a subsequent sector of shingled track region404is likely to squeeze a corresponding, adjacent sector. In some examples, controller7would continue this process until EDM18determines that writing data to a subsequent sector is not likely to squeeze previously written data at a corresponding, adjacent sector.

In some examples, rather than relocating data to shingled track region404for a second time, ECM20may cause data corresponding to the sector squeezed by the first relocation operation (e.g., sector440B) to be relocated to a secondary relocation area408, also referred to as a “write twice cache”. In some examples, secondary relocation area408may be a non-shingled storage area. For example, secondary relocation area408may be a non-shingled portion of magnetic data storage device12or a non-volatile memory device (e.g., flash memory).

Upon writing data to secondary relocation area408, controller7may release the portion of write buffer402used to store data received as part of the write command so that said portion of write buffer402may be used to temporarily store data as storage device6receives additional write commands from host device4. As storage device6receives additional write commands from host device4, controller7may perform additional write operations and relocation operations. Controller7may cause additional data to be written to secondary relocation area408.

As illustrated inFIG. 41, ECM20may determine whether to write data from the secondary relocation area408to a shingled track region (e.g.,410) of magnetic data storage device12. In some examples, ECM20may determine whether to write the data to a shingled track region based the occupied portion of secondary relocation area408. For example, ECM20may compare an occupied portion of secondary relocation area408(e.g., the number of sections containing data) to a threshold portion. In some examples, in response to determining that the occupied portion of secondary relocation area408is greater than the threshold portion, ECM20may cause write head8to copy the data from secondary relocation area408to a shingled portion of magnetic data storage device12. For example, ECM20may cause write head8to write the data to another shingled track region410. In some examples, during writing data from secondary relocation area408to a shingled track region, EDM18may determine whether writing data to a track is likely to squeeze a previously written adjacent data track, as described above.

As illustrated inFIG. 4J, in some examples, ECM20may cause write head8to perform a defragmentation operation. ECM20may determine an original write order for the data stored at shingled track region404and secondary relocation area408. ECM20may cause write head8to write the data to another shingled track region410in the original write order. During the defragmentation operation, EDM18may determine whether writing data to a track of shingled track region410is likely to squeeze a previously written adjacent data track, as described above.

In some examples, storage device6may receive a read command from host device4. The command may include a request for data at a particular LBA or set of LBAs. In response to receiving the read command, read module26may copy data from shingled track region404and/or secondary relocation area408. For example, read module26may read relocation data from secondary relocation area408and may cause a copy of the relocation data to be stored in a read buffer. Similarly, read module26may cause a read head to read relocation data from shingled track region404and may cause a copy of the relocation data to be stored in the read buffer. Read module26may determine whether the relocation data copied to the read buffer is included in the LBA(s) requested by host device4.

In some examples, read module26may cause the read head to read data from a particular data track of shingled track region404and may copy the data from the particular track of shingled track region404to the read buffer. Read module26may determine the original address information for the data copied to the read buffer in order to return the proper data to host device4. In this way, read module26may determine the original address information and send the data back to host device4in the same order the data was originally received from host device4. Read module26may cause the read head to read data from additional data tracks of shingled track region404, copy the data to the read buffer, and determine the original address information as described above.

FIGS. 5A-5Dare conceptual diagrams illustrating an example technique that at least one processor may implement for maintaining the integrity of data stored by a magnetic data storage device, in accordance with one or more techniques of this disclosure. For purposes of illustration, the technique will be described with reference to the flow diagram ofFIG. 3and with respect to storage environment2ofFIG. 1and controller7ofFIGS. 1 and 2. However, it will be understood that the technique ofFIGS. 5A-5Cmay include additional or fewer steps.

With reference toFIG. 5A, in some examples, storage device6may include one or more magnetic data storage devices12. Magnetic data storage device12may include a shingled track region504. Shingled track region504includes a plurality of data tracks, and each track includes a plurality of sectors. Shingled track region504may include pre-existing data at a first data track. For purposes of illustration only, inFIG. 5A, the first data track520is defined by sectors520A-520G. For ease of illustration only, shingled track region504is shown with seven sectors per data track. However, it is to be understood that each track of shingled track region504may include any number of sectors.

Storage device6may include one or more cache devices9, such as primary write buffer502, PES buffer506, and secondary write buffer508. In some examples, primary write buffer502, PES buffer506, and/or secondary write buffer508may be part of the same physical cache9, or may be independent cache devices. Primary write buffer502may temporarily store data received from host device4. PES buffer506may store PES values associated with data tracks of shingled track region504. In some examples, PES buffer506may include two or more buffer regions, such as PES buffer region P1and PES buffer region P2. PES buffer region P1may store PES values associated with a first data track of shingled track region504and PES buffer region P2may store PES values associated with a second data track of shingled track region504. PES buffer region P1may store PES values associated with one or more sectors of the data previously written at first data track520. In some examples, secondary write buffer508may include two or more buffer regions, such as secondary write buffer regions M1and M2. For example, secondary write buffer region M1may store a copy of data previously written to a first data track of shingled track region504and secondary write buffer region M2may store a copy of data to be written to a second data track of shingled track region504.

Storage device6may receive a write command and data from host device4. In some examples, controller7may receive the write command and cause the data to be stored in primary write buffer502.

In response to receiving the write command and data from host device4, controller7may initiate a first write operation associated with the received write command, as illustrated inFIG. 5A. During the first write operation, write module28may determine a first subset of data, defined by regions522A-522G, to write to a second data track of shingled track region504. For purposes of illustration only, second data track524is defined by sectors524A-524G. Controller7may cause the first subset of data to be copied from primary write buffer502to a portion of secondary write buffer508, such as secondary write buffer region M1. In this way, controller7may retain a copy of the first subset of data.

In some examples, during writing to the second track, EDM18may determine whether to write to a sector of second data track524based on a PES value associated with the particular sector of second data track524. Controller7may determine a PES value associated with the sector of second data track524and store the PES value at PES buffer region P1. For example, servo control module22may track the physical position of the read/write head and EDM18(or servo control module22) may determine the PES value associated with sector524A. EDM18may determine whether to write to a given sector of second data track524by comparing the PES value associated with sector524A to a threshold PES value. For example, EDM18may determine whether the distance between sector524A and a corresponding sector of first data track520A is less than a threshold distance by determining whether the PES value associated with sector524A is less than the threshold PES value. The threshold PES value may be set to be a value below which it is likely that the writing of data to the sector of the second data track will likely “squeeze” the sector of the first data track. If the PES value associated with sector524A is less than the threshold PES value, EDM18may cause write head8to refrain from writing to sector524A. As illustrated inFIG. 5A, if the PES value associated with sector524A is greater than the threshold PES value, EDM18may cause write head8to write to sector524A and move to the next sector of second data track524(e.g., sector524B).

In response to the write head moving to sector524B, controller7may determine the PES value associated with sector524B and may store the PES value in PES buffer506. EDM18may determine whether writing data to sector524B of second data track524is likely to squeeze sector520B of adjacent, first data track520based on the PES value associated with sector524B, or in some examples, based on the PES values associated with sectors524B and520B, respectively. As illustrated inFIG. 5A, if EDM18determines that writing to sector524B of second data track524is likely to squeeze corresponding sector520B of first data track520, controller7may cause write head8to refrain from writing data to sector524B of second data track524. Upon refraining from writing data to sector524B, controller7may cause write head8to move to the next sector of second data track524(e.g., sector524C).

In some examples, EDM18may set an indicator indicating that data was not written to sector524B. The indicator may specify a buffer address or range of buffer addresses (e.g., an address associated with primary write buffer502or secondary write buffer508) corresponding to the data that was not written sector524B. In some examples, the indicator may include an invalid flag indicating that sector424B is invalid.

For each of the subsequent sectors of second data track524(e.g., sectors524C-524G), controller7may determine whether writing data to the respective sector is likely to squeeze data in the corresponding sector of first data track520based on a PES value associated with the sector of second data track524.

Upon completing writing data to the second data track, ECM20may perform a relocation operation. During the relocation operation, ECM20may reassign a section of the write buffer that was written to the second data track, such that the reassigned section may store a copy of the data that was not written to the second data track. ECM20may relocate the data that was not written to the second data track by causing data corresponding to the data that was not written to sector524B to be copied from secondary write buffer region M1to a reassigned section of primary write buffer502. For example, ECM20may cause data to be copied from section M1Bto the section of primary write buffer502that corresponds to the last sector of the first subset of data (e.g., section522G).

Controller7may prepare to write data to a third data track. For example, write module28may determine a second subset of data to write to a third data track528, defined by sectors528A-528G. In some examples, the second subset of data may include the relocated data at the reassigned section(s) of primary write buffer502. For example, as illustrated inFIG. 5C, write module28may determine that the second subset of data includes sections522G and526A-526F from primary write buffer502. Controller7may cause write head8to write the second subset of data to third data track528. For example, as illustrated inFIG. 5C, write head8may write data corresponding to section522G to sector528A of third data track528, data corresponding to section526A to sector528B, and so on.

During writing to third data track528, EDM18may determine whether writing the second subset of data to a third data track528is likely to squeeze a data stored at second data track524. Controller7may determine a PES value associated with a sector of third data track528(e.g., sector528E) and a corresponding sector of adjacent, second data track524(e.g., sector524E). EDM18may cause the PES value associated with sector528to be stored to PES buffer region P2. In some examples, EDM18may determine the PES value associated with sector524E by retrieving the value from PES buffer region P1. EDM18may determine a PES distance associated with sector528E and sector524E and determine whether the PES distance is less than a threshold distance. In response to determining that the PES distance is less than the threshold PES distance, EDM18may set an indicator indicating that the data stored at sector524E of the second track is likely squeezed. The indicator may specify a buffer address or range of buffer addresses (e.g., an address associated with primary write buffer502or secondary write buffer508) corresponding to a copy of the data written to squeezed sector524E. EDM18may set an indicator indicating that the potentially squeezed sectors are invalid.FIG. 5Dshows an example where EDM18has determined that several sectors of second data track524(sectors524E and524F) were squeezed by writing third data track528.

In some examples, after completing writing to third data track528, ECM20may perform a relocation operation, copying data from secondary write buffer region M1to the reassigned sectors. After relocating data corresponding to squeezed sectors524E and524F from secondary write buffer region M1to write buffer sections526E and526F, controller7may cause the PES values stored at PES buffer region P2to be copied to PES buffer region P1. Controller7may determine a third subset of data to write to fourth data track532(defined by sectors532A-G). The third subset of data may include relocated data stored at write buffer sections526E and526F.

Controller7may continue writing data to shingled track region504from primary write buffer502and storing PES values for the respective sectors to PES buffer region P2. EDM18may determine whether writing data to the subsequent data tracks is likely to squeeze data previously written to an adjacent. If EDM18determines that data stored at a sector of a previous data track are squeezed, EDM18may set an indicator indicating the previously written data is likely squeezed. ECM20may perform a relocation operation to copy data corresponding to the squeezed data back to primary write buffer502so that the data may be re-written to a later data track. Controller7may continue this process until all of the data stored at primary write buffer502is written to shingled track region504without squeezing any of the previously written data.

In some examples, ECM20may cause write head8to perform a defragmentation operation. ECM20may determine an original write order for the data stored at shingled track region504. ECM20may cause write head8to write the data to another shingled track region410in the original write order. During the defragmentation operation, EDM18may determine whether writing data to a track of shingled track region510is likely to squeeze a previously written adjacent data track, as described above.

FIG. 6is a flow diagram illustrating an example technique that at least one processor may implement for maintaining the integrity of data stored by a magnetic data storage device, in accordance with one or more techniques of this disclosure. Various components and modules (e.g., error management module16) of storage device6may perform the techniques described in this disclosure. The technique ofFIG. 6will be described with respect to storage environment2ofFIG. 1and controller7ofFIGS. 1 and 2for purposes of illustration. However, it will be understood that the technique ofFIG. 6may be performed by a different processor or in a different storage environment, and that controller7and storage environment2may perform other techniques.

Controller7may receive a write command from host device4via interface14(60). The write command may include data and at least one LBA indicating the logical address with the data is associated. In some examples, controller7may cause the data to be stored in a cache9, such as a primary write buffer (61).

In some examples, magnetic data storage device12may include previously written data at a first data track. Controller7may cause data at the first data track to be copied to a cache9, such as a secondary write buffer (62).

Controller7may begin a first write operation. In some examples, write module28may determine a subset of data in the primary write buffer to write to a second data track of magnetic data storage device12. Controller7may cause a copy of the subset of data to be copied from the primary write buffer to the secondary write buffer.

During the first write operation, EDM18may determine whether writing data to a sector of the second data track is likely to squeeze data stored at a corresponding sector of the first data track. EDM18may base the determination at least in part on a PES value associated with the sector of the second data track and a PES value associated with the corresponding sector of the first, adjacent data track. Controller7may determine a PES value associated with a sector of the second data track and a PES value associated with a corresponding sector of the first, adjacent data track (64). In some examples, servo control module22may track the physical position of the read/write head relative to magnetic data storage device12in order to determine the PES value associate with the sector of the second data track and the PES value of the corresponding adjacent sector of the first data track. However, in some examples, servo control module22may communicate a signal indicative of the physical position of the read/write head to EDM18for use in determining the PES values for the respective sectors.

In some instances, EDM18may determine a PES distance based on the PES value associated with the sector of the second data track and the PES value associated with the corresponding sector of the first data track, and may determine whether the PES distance is less than a threshold PES distance (66). A PES distance greater than or equal to the PES threshold distance may indicate that writing data to the second data track is unlikely (or less likely) to affect data in the first data track. In some examples, if EDM18determines the PES distances is greater than or equal to the threshold PES distance, EDM18may cause write head8to write data to the second data track (74). A PES distance less than the threshold PES distance may indicate that writing data to the second data track is likely to squeeze data in the first data track. In some examples, if the PES distance is less than a threshold PES distance, EDM18may set an indicator indicating data stored at the sector of the first data track is likely to be squeezed. (68). For example, the indicator may include a secondary write buffer address to identify the data from the secondary write buffer that corresponds to the data stored at the squeezed sector of the first data track. In some examples, EDM18may set the indicator indicating the data was not written by setting the squeezed sector to invalid (e.g., by updating an “invalid” flag). In some examples, ECM20may cause the data that corresponds to the squeezed sector of the first data track to be copied from the secondary write buffer to another buffer (72). For example, ECM20may cause the data to be copied from the secondary write buffer back to the write buffer. As another example, ECM20may cause the data to be copied from the secondary write buffer to a tertiary write buffer.

In some examples, after writing data to the second data track, storage device6may release the portion of the write buffer corresponding to the written data such that the portion of the write buffer may be used to store additional data as it is received from the host. However, in some examples, storage device6may store the data in the write buffer until write head8has finished writing all of the data associated with the write command.

Controller7may prepare to write data to a third data track after writing the first subset of data to the second data track. Write module28may determine a subset of data from the write buffer to a subsequent data track. Controller7may cause the subset of data to be copied to the secondary write buffer. EDM18may determine whether writing data to the subsequent data track is likely to squeeze data that was previously written to an existing data track. If EDM18determines that writing data to the subsequent data track is likely to squeeze data at a previously written data track, ECM20may copy data corresponding to the squeezed sector from the secondary write buffer to another location. In this way, EMM16may cause all of the data in the write buffer to be written to the storage device6without losing data that may be corrupted or squeezed by writing subsequent data.

FIGS. 7A-7Fare conceptual diagrams illustrating an example technique that at least one processor may implement for maintaining the integrity of data stored by a magnetic data storage device, in accordance with one or more techniques of this disclosure. For purposes of illustration, the technique will be described with reference to the flow diagram ofFIG. 6and with respect to storage environment2ofFIG. 1and controller7ofFIGS. 1 and 2. However, it will be understood that the technique ofFIGS. 7A-7Fmay include additional or fewer steps.

With reference toFIG. 7A, in some examples, storage device6may include one or more magnetic data storage devices12. Magnetic data storage device12may include a non-shingled track region and a shingled track region704. Shingled track region704includes a plurality of data tracks, and each track includes a plurality of sectors. Shingled track region704may include pre-existing data at a first data track. For purposes of illustration only, inFIG. 7A, the first data track720is defined by sectors720A-720G, as shown by shaded region721. For ease of illustration only, shingled track region704is shown with seven sectors per data track. However, it is to be understood that each track of shingled track region704may include any number of sectors.

Storage device6may include one or more cache devices9, such as primary write buffer702, PES buffer706, and secondary write buffer708. In some examples, primary write buffer702, PES buffer706, and secondary write buffer708may be part of the same physical cache9, or may be independent cache devices. Primary write buffer702may temporarily store data received from host device4. PES buffer706may store PES values associated with data tracks of shingled track region704. In some examples, PES buffer706may include two or more buffer regions, such as PES buffer region P1and PES buffer region P2, which may store PES values for a first data track of shingled track region704and a second data track of shingled track region704, respectively. PES buffer region P1may store PES values associated with one or more sectors of the data that was previously written to first data track720. Secondary write buffer708may temporarily store a copy of data previously written to shingled track region704and/or a copy of at least a portion of the data stored at primary write buffer704. In some examples, secondary write buffer708may include two or more buffer regions, such as secondary write buffer regions M1and M2. For example, secondary write buffer region M1may store a copy of data written to a first data track of shingled track region704and secondary write buffer region M2may store a copy of the data to be written to a second data track of shingled track region704.

With further reference toFIG. 7A, storage device6may receive a write command and data from host device4. In some examples, controller7may receive the write command and cause the data to be stored in primary write buffer702. Controller7may read the data stored at the first data track720of shingled track region704and store a copy of the data to write buffer region M1(708) as shown inFIG. 7A.

In response to receiving the write command and data from host device4, controller7may initiate a first write operation associated with the received write command, as illustrated inFIG. 7B. During the first write operation, write module28may determine a first subset of data, defined by sections722A-722G, as shown by shaded region723, to write to a second data track of shingled track region704. For purposes of illustration only, second data track724is defined by sectors724A-724G.

During the first write operation, controller7may determine a PES value associated with a first sector of second data track724(e.g., sector724A) and a corresponding sector of adjacent, first data track720(e.g., sector720A). Servo control module22may track the physical position of the read/write head and determine the PES value associated with sector724A, or servo control module22may communicate a signal indicative of the physical position of the read/write head to EDM18for use in determining the PES value associated with sector724A. EDM18may cause the PES value associated with sector724A to be stored to PES buffer region P2. In some examples, EDM18may determine the PES value associated with sector720A by retrieving the value from PES buffer region P1.

In some examples, controller7may cause write head8to write the first subset of data to second data track724and then determine whether writing the data likely squeezed data at any of the sectors of first data track720. However, in some examples, controller7may determine whether writing data to a sector (e.g., sector724A) of second data track724is likely to squeeze data stored at a corresponding sector of first data track720prior to (or during) writing the sector of second data track724.

EDM18may determine whether writing data to sector724A of second data track724is likely to squeeze data stored at a corresponding sector720A of the first data track720based on the PES values associated with the respective sectors. For example, EDM18may determine a PES distance based on the PES values and determine whether the PES distance is less than a threshold PES distance. A PES distance greater than a threshold PES distance may indicate that writing data to sector724A is not likely to squeeze data stored at sector720A. If EDM18determines that the PES distance associated with sectors724A and720A is greater than the threshold PES distance, controller7may cause write head8to write data to sector724A of second track724and to move to the next sector of second data track724(e.g., sector724B).

In response to the write head moving to sector724B, controller7may determine the PES value associated with sector724B and may store the PES value in PES buffer region P2. EDM18may retrieve the PES value associated with sector720B of the first data track from PES buffer region P1. EDM18may determine whether writing data to sector724B of second data track724is likely to squeeze sector720B of adjacent, first data track720by determining a PES distance associated with the PES values associated with sectors724B and720B, respectively. A PES distance less than the threshold PES distance may indicate that writing data to sector724B is likely to affect, or “squeeze”, data stored at sector720B (e.g, due to external vibrations of storage device6). As illustrated inFIG. 7C, in some examples, EDM18may determine that the PES distance associated with sectors724B and720B is less than the threshold PES distance. As a result, EDM18may set an indicator indicating the data stored at sector720B is likely to be squeezed. Because a copy of the data written to sector720B still exists in secondary write buffer708, in some examples, the indicator may specify a secondary write buffer address, or a range of secondary write buffer addresses, corresponding to the data at sector720B. In some examples, EDM18may set the indicator by setting an invalid flag associated with sector720B to invalid. Write module28may cause write head8to write data to sector724B and move to sector724C. Controller7may continue writing data to the remaining sectors of second data track724in a similar manner as described above.

As shown inFIG. 7C, in some examples, ECM20may perform a data relocation operation after write head8has finished writing data to second data track724. ECM20may reassign a section of primary write buffer702so that reassigned may be used to store data corresponding to a squeezed sector of a previously written data track. For example, data stored at section M1Bof secondary write buffer region M1may correspond to section720B of the first data track and ECM20may cause controller7to relocate, or copy, data from secondary write buffer region M1to section722G of primary write buffer702.

With reference toFIG. 7D, after performing the data relocation operation, controller7may initiate a second write operation to write data to a third data track or resume the first write operation to write data to the third data track. Controller7may cause the PES values stored at PES buffer region P2to be copied to PES buffer region P1. Likewise, controller7may cause the data stored at secondary write buffer region M2to be copied to secondary write buffer region M1. In this way, PES buffer region P2and secondary write buffer region M2may be used to store information associated with a second subset of data while retaining the information associated with the first subset of data.

Write module28may determine a second subset of data to write to a third data track728, defined by sectors728A-728G. In some examples, the second subset of data may include the relocated data at the reassigned section(s) of primary write buffer702. For example, as illustrated inFIG. 7D, write module28may determine that the second subset of data includes sections722G and726A-726F from primary write buffer702. Controller7may cause write head8to write the second subset of data to third data track728. For example, as illustrated inFIG. 7C, write head8may write data corresponding to section722G to sector728A of third data track728, data corresponding to section726A to sector728B, and so on. Controller7may cause the second subset of data to be copied to secondary write buffer region M2.

During writing to the third data track, controller7may determine PES values for the sectors of third data track728and cause the PES values to be stored at PES buffer region P2. EDM18may determine whether writing the second subset of data to a third data track728is likely to squeeze data stored at second data track724by determining whether a PES distance associated with a sector of the third data track and a corresponding sector of the second, adjacent data track is less than a threshold distance. If the PES distance is less than the threshold PES distance, EDM18may set an indicator indicating that the data stored at the sector of second data track724is likely squeezed. The indicator may specify a buffer address or range of buffer addresses (e.g., an address associated with primary write buffer702or secondary write buffer708) corresponding to a copy of the data written to the squeezed sector and/or may include an invalid flag indicating the sector is invalid.

In some examples, after writing data to the third data track, ECM20may perform a relocation operation, as described above.

After performing a relocation operation, controller7may continue writing data to shingled track region704from primary write buffer702and storing PES values for the respective sectors to PES buffer region P2. EDM18may determine whether writing data to the subsequent data tracks is likely to squeeze data previously written to an adjacent. If EDM18determines that data stored at a sector of a previous data track, EDM18may set an indicator indicating the previously written data is likely squeezed. ECM20may perform a relocation operation to copy data corresponding to the squeezed data back to primary write buffer702so that the data may be re-written to a later data track. Controller7may continue this process until all of the data stored at primary write buffer702is written to shingled track region704without squeezing any of the previously written data.

FIG. 7Eillustrates an example shingled track region704after writing data to a plurality of data tracks. For example, during a previous write operation, write head8may have written data to sectors720A-720G of first data track720. As shown inFIG. 7E, the white sectors (e.g.,720B,724E,724F,732F,736D, and740B) represent sectors that EDM18determined were likely squeezed by a subsequent write operation while the black sectors (e.g.,728A,732A,732B,740A,744A, and744D) represent copies of the potentially squeezed sectors that were relocated by ECM20.

As illustrated inFIG. 7F, in some examples, ECM20may cause write head8to perform a defragmentation operation. ECM20may determine an original write order for the data stored at shingled track region704. ECM20may cause write head8to write the data to another shingled track region710in the original write order. During the defragmentation operation, EDM18may determine whether writing data to a track of shingled track region710is likely to squeeze a previously written adjacent data track, as described above and ECM20may perform data relocation operations as described above.

FIGS. 8A-8Fare conceptual diagrams illustrating an example technique that at least one processor may implement for maintaining the integrity of data stored by a magnetic data storage device, in accordance with one or more techniques of this disclosure. For purposes of illustration, the technique will be described with reference to the flow diagram ofFIG. 6and with respect to storage environment2ofFIG. 1and controller7ofFIGS. 1 and 2. However, it will be understood that the technique ofFIGS. 8A-8Emay include additional or fewer steps.

As shown inFIG. 8A, storage device6may include one or more magnetic data storage device12, which may include a non-shingled track region and shingled track region804. Shingled track region804may correspond to shingled track region704, as described inFIGS. 7A-7F. Storage device6may include one or more caches9, such as primary write buffer802, PES buffer806, secondary write buffer808, and tertiary write buffer809. Primary write buffer802, PES buffer806, and secondary write buffer808may correspond to primary write buffer702, PES buffer706, and secondary write buffer708, as described inFIGS. 7A-7F. In some example tertiary write buffer809may store relocated copies of data.

With further reference toFIG. 8A, storage device6may receive a write command and data from host device4. In some examples, controller7may receive the write command and cause the data to be stored in primary write buffer802. Controller7may read the data stored at the first data track820of shingled track region804and store a copy of the data to write buffer region M1(808) as shown inFIG. 8A.

In response to receiving the write command and data from host device4, controller7may initiate a first write operation associated with the received write command, as illustrated inFIG. 8B. During the first write operation, write module28may determine a first subset of data, defined by sections822A-822G, as shown by shaded region823, to write to a second data track of shingled track region804. For purposes of illustration only, second data track824is defined by sectors824A-824G.

In some examples, controller7may cause a copy of the first subset of data to be stored at region M2of secondary write buffer808in a similar manner as described with reference toFIGS. 7A-7F. Likewise, controller7may cause PES values associated with the second data track to be stored in PES buffer region P2in a similar manner as described with reference toFIGS. 7A-7F.

As shown inFIG. 8C, in some examples, EDM18may determine whether writing data to the second data track will likely squeeze data written to the first data track by comparing a PES distance to a threshold PES distance, in a similar manner as described with reference toFIGS. 7A-7F. For example, EDM18may determine that writing data to sector824B of second track824is likely to squeeze sector820B of first data track820and may set an indicator indicating that writing data to sector824B is likely to squeeze data stored at sector820B. The indicator may identify data corresponding to the data stored at sector820B and/or designate the sector820B as invalid.

As shown inFIG. 8C, in some examples, ECM20may perform a data relocation operation after write head8has finished writing data to second data track824. For example, ECM20may relocate data associated with the data stored at sector820B by copying data from secondary write buffer M1(e.g., section M1B) to tertiary write buffer809(e.g., section M3A). In some examples, controller7may cause data stored at tertiary write buffer809to be copied to non-volatile memory, such as a non-shingled portion of magnetic data storage device12or a flash memory device.

In some examples, after relocating data from secondary write buffer region M1to tertiary write buffer809, controller7may cause the PES values stored at PES buffer region P2to be copied to PES buffer region P1. Likewise, controller7may cause the data stored at secondary write buffer region M2to be copied to secondary write buffer region M1. In this way, PES buffer region P2and secondary write buffer region M2may be used to store information associated with a second subset of data while retaining the information associated with the first subset of data.

Controller7may prepare to write data to additional data tracks. For example, write module28may determine a subset of data to write to a subsequent data track. Controller7may cause a copy of the subset of data to be written to secondary write buffer region M2and may cause PES values associated with the subsequent data track to be stored at PES buffer region P2. During writing to the additional data tracks, EDM18may determine whether writing data to the subsequent data track is likely to squeeze data stored at a previously written adjacent data track. If EDM18determines that writing to the subsequent data track is likely to squeeze data stored at the previously written adjacent data track, ECM20may cause a copy of data associated with the squeezed sector to be copied from secondary write buffer region M1to tertiary write buffer809. As a result, controller7may retain a valid copy of the previously written data and the data received from host device4.

FIG. 8Dillustrates the results of writing data to a plurality of data tracks. The white sectors (e.g.,820B,824E,824F, and832F) represent sectors that EDM18determined were likely squeezed by writing data to a subsequent data tracks. ECM20relocated data corresponding to each of the squeezed sectors from secondary write buffer region M1to tertiary write buffer809.

In some examples, ECM20may relocate the data stored in tertiary write buffer809to another storage location. ECM20may determine an occupied portion of tertiary write buffer809and cause the data at tertiary write buffer809to be copied to another location if the occupied portion of tertiary write buffer809is greater than a threshold portion. For example, ECM20may relocate data from tertiary write buffer809when tertiary write buffer809is full (e.g., each section of tertiary write buffer809includes data). As another example, ECM20may relocate data from tertiary write buffer809when at least a threshold number of tertiary write buffer sections include data.

As illustrated inFIG. 8E, in some examples, ECM20may cause data to be copied from tertiary write buffer809to a portion of magnetic data storage device12. For example, ECM20may cause data in tertiary write buffer809to be copied to shingled track region804. In some examples, ECM20may cause data in tertiary write buffer809to be copied to a reassignment area810within magnetic data storage device12. Reassignment area810may include a shingled track region or a non-shingled track region.

In some examples, ECM20may determine an occupied portion of reassignment area810and cause the data at from reassignment area810to be copied from reassignment area810to shingled track region804if the occupied portion of reassignment area810is greater than a threshold portion. For example, as illustrated inFIG. 8F, ECM20may cause data to be copied from reassignment area810to shingled track region804.

In some examples, write head8to perform a defragmentation operation. ECM20may determine an original write order for the data stored at shingled track region804. ECM20may cause write head8to write the data to another shingled track region in the original write order. During the defragmentation operation, EDM18may determine whether writing data to a track of shingled track region810is likely to squeeze a previously written adjacent data track, as described above and ECM20may perform data relocation operations as described above.

FIGS. 9A-9Dare graphs illustrating example measurement results of a technique for maintaining the integrity of data stored by a magnetic data storage device, in accordance with one or more techniques of this disclosure.

FIG. 9Aillustrates an example write operation, using techniques described in this disclosure, to write data at sectors1-380of an example data track. The Y-axis shows the bathtub width for each sector for a variety of track pitch levels when it is written under external vibration. Curve902shows the actual experimental bathtub width for a nominal track pitch. Curve904shows the estimated bathtub width for each sector if the track pitch were to be set to 95% of the nominal track pitch when the same external vibration is applied as above. Likewise, curves906,908, and910show the estimated bathtub width for each sector if the track pitch were set to 90%, 85%, and 80% of the nominal track pitch. As shown inFIG. 9A, decreasing the track width decreases the bathtub width. As shown by shaded section901, controller7may relocate data when the bathtub width associated with the respective sector falls below a threshold width.

FIG. 9Bshows the sector failure rate (SFR) for the same example write operation shown inFIG. 9A. The SFR may be strongly correlated to the bathtub width. Thus, as the track pitch is decreased, the bathtub width also decreases and the SFR increases. For example, looking at the curve902with a nominal track pitch of 1, at approximately sector210, the bathtub width is nearly 0.5 and the SFR is approximately 1E-10. However, looking at curve910, for the same sector (approximately 210), the estimated bathtub width is approximately 0.2 and the estimated SFR is approximately 1E-3.

FIG. 9Cillustrates the estimated number of relocated sectors per track as the TPI is increased while writing under external vibration. The Y-axis shows the number of relocated sectors per track for a sample hard drive having 356 sectors per track. The X-axis shows the increase in TPI over conventional settings. Each curve indicates the estimated error in the bathtub width using PES information to determine the bathtub width. For example, curve912indicates no error in the estimated bathtub width, curve914indicates a 2% error (in standard deviation) in the estimated bathtub width, and so on. Looking at curve914, increasing the TPI by 2% over conventional TPI causes about 8 sectors per track to be re-assigned. As a result, increasing TPI by 2% causes about 2% increase in writes (8/356). However, in some examples, increasing TPI may cause the number of sectors to increase more than the increased storage created by increasing TPI. As a result, there may be a net loss of storage while writing under external vibration. However, since the drive may not experience external vibrations all of the time, the techniques described in this disclosure may allow an increase in TPI for all write commands while increasing the number of relocated sectors only when the drive experiences external vibrations.

FIG. 9Dillustrates experimental results showing write throughput loss using techniques described in this disclosure to write data while experiencing external vibrations. The graph illustrates the write throughput loss (y-axis) as a function of the written data block (x-axis). The X-axis is normalized by the size of the data track, such that a “1” on the x-axis indicates the written data block is a full data track, “0.1” indicates that the written data block is 10% of a data track, and a “10” indicates that the written data block is 10 data tracks. Curves920,622,924,926, and928illustrate how the write throughput loss changes as a function of the size of the written data block for the various re-assignment ratios. For example, at a 5% re-assignment ratio (928), if the amount of data written to magnetic data storage device12includes one full data track, the write throughput loss was approximately 55%. However, at a 1% re-assignment ratio (920), if the amount of data written to magnetic data storage device12includes one full data track, the write throughput loss was approximately 40%. In conventional techniques, the write throughput loss may be much higher (as high as 100%) when writing data under external vibrations. Thus, as shown inFIG. 9B, the described techniques may reduce write throughput loss while retaining the integrity of the data written to magnetic data storage device12.

The techniques described in this disclosure may also be embodied or encoded in an article of manufacture including a computer-readable storage device encoded with instructions. Instructions embedded or encoded in an article of manufacture including a computer-readable storage device, may cause one or more programmable processing units, or other processing units, to implement one or more of the techniques described herein, such as when instructions included or encoded in the computer-readable storage device are executed by the one or more processing units. Computer readable storage media may include random access memory (RAM), read only memory (ROM), programmable read only memory (PROM), erasable programmable read only memory (EPROM), electronically erasable programmable read only memory (EEPROM), flash memory, a hard disk, a compact disc ROM (CD-ROM), a floppy disk, a cassette, magnetic media, optical media, or other computer readable media. In some examples, an article of manufacture may include one or more computer-readable storage media.

In some examples, a computer-readable storage device may include a non-transitory medium. The term “non-transitory” may indicate that the storage device is not embodied in a carrier wave or a propagated signal. In certain examples, a non-transitory storage device may store data that can, over time, change (e.g., in RAM or cache).