Magnetic disk device and parity management method
The magnetic disk device manages parity generation in background processing to avoid command interference, ensuring data integrity by generating parity in invalid areas when no commands are pending, thus enhancing data reliability.
Patent Information
- Application Number
- JP2023048599
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-24
- Publication Date
- 2024-10-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Conventional magnetic disk devices face challenges in generating parity without interfering with the processing of received commands, particularly in managing parity areas effectively.
The magnetic disk device includes a first parity management unit that searches for and generates parity in invalid parity areas only when no unexecuted commands are present, ensuring parity generation does not disrupt command processing, and updates parity area status in a non-volatile memory.
This approach allows parity to be generated and written without affecting the performance of the magnetic disk device, enhancing data integrity by preventing read errors through efficient parity management.
Smart Images

Figure 2024137183000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a magnetic disk device and a parity management method. [Background technology]
[0002] Known magnetic disk devices include conventional magnetic recording (CMR) type (or conventional recording type) magnetic disk devices that write multiple tracks at intervals in the radial direction of the disk, shingled write magnetic recording (SMR, or shingled write recording (SWR) type magnetic disk devices that overwrite multiple tracks in the radial direction of the disk, and hybrid recording type magnetic disk devices that select between the conventional recording type and the shingled recording type. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] U.S. Patent No. 7,627,725 [Patent Document 2] US Patent Application Publication No. 2022 / 0301590 [Patent Document 3] U.S. Patent No. 5,872,800 Summary of the Invention [Problem to be solved by the invention]
[0004] The present embodiment provides a magnetic disk device and a parity management method capable of generating parity without interfering with the processing of received commands. [Means for solving the problem]
[0005] A magnetic disk device according to an embodiment includes: A disk having a first track, the first track including a first data area in which first data is recorded, and a first parity area in which first parity for recovering the first data in the first data area is recorded; a storage unit that stores information indicating whether the first parity area is a valid parity area in which the first parity is recorded or an invalid parity area in which the first parity is not recorded; a first determination unit that determines whether or not there is an unexecuted command; and a first parity management unit that searches the first parity area from the memory unit after the first judgment unit determines that there are no unexecuted commands, and if the first parity area which is an invalid parity area is detected, generates the first parity based on the first data in the first data area, and writes the first parity to the first parity area.
[0006] Moreover, a parity management method according to an embodiment includes: A parity management method is applied to a magnetic disk device including: a disk having a first track, the first track including a first data area in which first data is recorded, and a first parity area in which a first parity for restoring the first data in the first data area is recorded; and a storage unit that stores information indicating whether the first parity area is a valid parity area in which the first parity is recorded, or an invalid parity area in which the first parity is not recorded, the method comprising: Determine whether there are any pending commands, After it is determined that there are no unexecuted commands, the first parity area is searched for in the memory unit, and if the first parity area which is an invalid parity area is detected, the first parity is generated based on the first data in the first data area, and the first parity is written to the first parity area. [Brief description of the drawings]
[0007] [Figure 1]FIG. 1 is a block diagram showing the configuration of a magnetic disk device according to an embodiment. [Diagram 2] FIG. 2 is a perspective view showing a part of the magnetic disk device, showing a plurality of disks and a plurality of heads. [Diagram 3] FIG. 3 is a schematic diagram showing some of the tracks on which normal recording processing is performed. [Figure 4] FIG. 4 is a diagram for explaining a plurality of tracks that are continuous in the radial direction in the magnetic disk device. [Diagram 5] FIG. 5 is a schematic diagram showing three sectors aligned in the radial direction in the magnetic disk device, and is a diagram for explaining the effect of ATI on adjacent sectors. [Figure 6] FIG. 6 is a diagram showing a part of the parity management table stored in the non-volatile memory of the magnetic disk device, and shows information related to parity, the number of writes, the reference number, and the like. [Figure 7] FIG. 7 is a flowchart for explaining the parity management method applied to the above-mentioned magnetic disk device. [Figure 8] FIG. 8 is a flowchart for explaining the parity management method following FIG. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0008] A magnetic disk device 1 and a parity management method according to an embodiment will be described in detail below with reference to the drawings. First, the configuration of the magnetic disk device 1 will be described. FIG. 1 is a block diagram showing the configuration of the magnetic disk device 1 according to this embodiment. In this embodiment, the magnetic disk device 1 is a normal recording type magnetic disk device.
[0009] 1, the magnetic disk device 1 includes a plurality of, for example, one to six disks (magnetic disks) DK as recording media, a spindle motor (SPM) 20 as a drive motor, a head stack assembly 22, a driver IC 120, a head amplifier integrated circuit (hereinafter, head amplifier IC or preamplifier) 130, a volatile memory 70, a buffer memory (buffer) 80, a non-volatile memory 90, and a system controller 110 which is a one-chip integrated circuit. The magnetic disk device 1 is also connected to a host system (hereinafter, simply referred to as a host) 100.
[0010] Each disk DK is formed to have a diameter of, for example, 95 mm (3.5 inches) and has a recording layer (magnetic recording layer) Y on both sides. In this embodiment, the magnetic disk device 1 includes one to six disks DK, but the number of disks DK is not limited to this. Also, the magnetic disk device 1 may include a single disk DK.
[0011] The head stack assembly 22 is driven by a voice coil motor (hereinafter referred to as VCM) 24 to control the movement of a head HD mounted on an arm 30 to a target position on the disk DK.
[0012] The disk DK is allocated with a user data area U available to the user and a system area S to which information required for system management is written as areas where data can be written. Here, any track among the multiple tracks of the disk DK is defined as a target track, and a track adjacent to the target track in the radial direction of the disk DK is defined as an adjacent track. Any sector among multiple sectors aligned in the circumferential direction of the disk DK in the target track is defined as a target sector. In the adjacent track, a sector adjacent to the target sector in the radial direction of the disk DK among multiple sectors aligned in the circumferential direction of the disk DK is defined as an adjacent sector.
[0013] The head HD records and reproduces information on the disk DK. The head HD has a slider as its main body, and is equipped with a write head WHD and a read head RHD mounted on the slider. The write head WHD writes data to the recording layer Y of the disk DK. The read head RHD reads data from the data tracks on the recording layer Y of the disk DK.
[0014] The driver IC 120, under the control of the system controller 110 (more specifically, the MPU 60 described below), controls the driving of the SPM 20 and the VCM 24. The SPM 20 supports and rotates a plurality of disks DK.
[0015] The head amplifier IC 130 includes a read amplifier and a write driver. The read amplifier amplifies a read signal read from the disk DK and outputs it to the system controller 110 (more specifically, a read / write (R / W) channel 140, which will be described later). The write driver outputs a write current corresponding to the signal output from the R / W channel 140 to the head HD.
[0016] The volatile memory 70 is a semiconductor memory in which stored data is lost when the power supply is cut off. The volatile memory 70 stores data and the like required for processing in each part of the magnetic disk device 1. The volatile memory 70 is, for example, a dynamic random access memory (DRAM) or a synchronous dynamic random access memory (SDRAM).
[0017] The buffer memory 80 is a semiconductor memory that temporarily records data and the like transmitted and received between the magnetic disk device 1 and the host 100. The buffer memory 80 may be configured integrally with the volatile memory 70. The buffer memory 80 is, for example, a DRAM, a static random access memory (SRAM), a SDRAM, a ferroelectric random access memory (FeRAM), or a magnetoresistive random access memory (MRAM).
[0018] The non-volatile memory 90 is a semiconductor memory that records stored data even if the power supply is cut off. The non-volatile memory 90 is, for example, a NOR type or NAND type flash ROM (Flash Read Only Memory: FROM).
[0019] In this embodiment, the non-volatile memory 90 functions as a storage unit that stores information related to parity, the number of writes, the reference number, etc. The storage unit is not limited to the non-volatile memory 90, and may be any recording unit in the magnetic disk device 1, for example, the system area S.
[0020] The non-volatile memory 90 (storage unit) can store information indicating whether the parity area of each track in the user data area U of the recording layer Y of the disk DK is a valid parity area or an invalid parity area. A valid parity area means a parity area in which parity that can be used to restore data in the data area of the same track is recorded. An invalid parity area means a parity area in which parity that can be used to restore data in the data area of the same track is not recorded.
[0021] The system controller (controller) 110 is realized, for example, by using a large scale integrated circuit (LSI) called a System-on-a-Chip (SoC) in which multiple elements are integrated on a single chip. The system controller 110 includes a read / write (R / W) channel 140, a hard disk controller (HDC) 150, and a microprocessor (MPU) 60. The system controller 110 is electrically connected to a driver IC 120, a head amplifier IC 130, a volatile memory 70, a buffer memory 80, a non-volatile memory 90, and a host 100.
[0022] The R / W channel 140 executes signal processing of read data transferred from the disk DK to the host 100 and write data transferred from the host 100 in response to instructions from the MPU 60 described later. The R / W channel 140 has a circuit or function for modulating write data. The R / W channel 140 also has a circuit or function for measuring the signal quality of the read data. The R / W channel 140 is electrically connected to, for example, the head amplifier IC 130, the HDC 150, the MPU 60, etc.
[0023] The HDC 150 controls data transfer between the host 100 and the R / W channel 140 in response to instructions from the MPU 60, which will be described later. The HDC 150 is electrically connected to, for example, the R / W channel 140, the MPU 60, the volatile memory 70, the buffer memory 80, the non-volatile memory 90, and the like.
[0024] The MPU 60 is a control unit that controls each part of the magnetic disk device 1, and is a main controller. The MPU 60 controls the VCM 24 via the driver IC 120, and executes servo control for positioning the head HD. The MPU 60 controls the write operation of data to the disk DK, and selects a storage destination for write data transferred from the host 100. The MPU 60 also controls the read operation of data from the disk DK, and controls the processing of read data transferred from the disk DK to the host 100. The MPU 60 is connected to each part of the magnetic disk device 1. The MPU 60 is electrically connected to, for example, the driver IC 120, the R / W channel 140, the HDC 150, and the like.
[0025] The MPU 60 includes a read / write processing unit 61, a first judgment unit 62a, a second judgment unit 62b, a first parity management unit 63a, a second parity management unit 63b, a counter 64, an error correction unit 65, a refresh processing unit 66, and a command processing unit 67. The MPU 60 executes the processing of each of these units, for example, the read / write processing unit 61, the first judgment unit 62a, the second judgment unit 62b, the first parity management unit 63a, the second parity management unit 63b, the counter 64, the error correction unit 65, the refresh processing unit 66, the command processing unit 67, etc., on firmware. The MPU 60 may include each of these units as a circuit.
[0026] The read / write processing unit 61 has a write processing unit 61a and a read processing unit 61b. In accordance with a command from the host 100, the write processing unit 61a controls the write processing of data to the recording layer Y of the disk DK, and the read processing unit 61b controls the read processing of data from the recording layer Y of the disk DK. The read / write processing unit 61 controls the VCM 24 via the driver IC 120, positions the head HD at a target position (predetermined radial position) on the disk DK, and executes the read processing or the write processing.
[0027] The first judgment unit 62a can judge whether or not there is a command received from the host 100, and can judge whether or not there is an unexecuted command. Various commands including write commands and read commands are known as commands received from the host 100. After the first parity management unit 63a starts searching the non-volatile memory 90 (storage unit) for a parity area, the first judgment unit 62a can periodically judge whether or not there is an unexecuted command.
[0028] After the first determination unit 62a determines that there is no unexecuted command, the first parity management unit 63a can search for a parity area from the nonvolatile memory 90 (storage unit). For example, after the first determination unit 62a continues to determine that there is no unexecuted command for a specific period of time, the first parity management unit 63a can start searching for a parity area from the nonvolatile memory 90.
[0029] 1 and 4, when the first parity management unit 63a detects a parity area (first parity area) Apm that is an invalid parity area, the first parity management unit 63a can generate a first parity based on the first data in a data area (first data area) Adm of a track (first track) Tam that includes the parity area Apm, and write the first parity to the parity area Apm. The first parity management unit 63a can generate the first parity for error correction by performing an exclusive OR (XOR) operation on the first data in the data area Adm.
[0030] For example, after the first parity management unit 63a starts searching the non-volatile memory 90 for the parity area Ap, when the first judgment unit 62a determines that there is an unexecuted command, the first parity management unit 63a can interrupt the search for the parity area Ap from the non-volatile memory 90.
[0031] In addition, if the first parity management unit 63a succeeds in generating the first parity and successfully writing the first parity to the parity area Apm, it can update the information in the non-volatile memory 90 to information indicating that the parity area Apm is a valid parity area. On the other hand, when the first parity management unit 63a fails to generate the first parity or fails to write the first parity to the parity area Apm, the first parity management unit 63a can update the information in the non-volatile memory 90 to information indicating that the parity area Apm is not a search target. In other words, the first parity management unit 63a can exclude the parity area Apm that was a search target from the search target.
[0032] The second parity management unit 63b can write parity to the parity area Ap. For example, after the first parity management unit 63a updates the information in the non-volatile memory 90 (storage unit) to information indicating that the parity area Apm is not a search target, the second parity management unit 63b can write parity to the parity area Apm. Then, when the second parity management unit 63b succeeds in writing the parity to the parity area Apm, the second parity management unit 63b can update the information in the non-volatile memory 90 to information indicating that the parity area Apm is a search target. In other words, the second parity management unit 63b can return the parity area Apm, which was not a search target, to the search target.
[0033] For example, after the first parity management unit 63a updates the information in the non-volatile memory 90 to information indicating that the parity area Apm is not the target of the search, if the write processing unit 61a writes second data to the data area Adm in accordance with the received write command, the second parity management unit 63b can generate second parity based on the second data and write the second parity to the parity area Apm.
[0034] For example, when the write processing unit 61a sequentially writes the second data in a range of one track or more (data area Adm or more), the write processing unit 61a can sequentially write the second data in the entire data area Adm. If the second parity management unit 63b successfully writes the second parity to the parity area Apm, the second parity management unit 63b can update the information in the non-volatile memory 90 to information indicating that the parity area Apm is the target of the search.
[0035] As described above, when the write processing unit 61a sequentially writes data in a range of one or more tracks including the data area Adm, the second parity management unit 63b can write parity in the parity area Apm.
[0036] 1 and 5, the counter 64 can count the number of writes to the disk DK. For example, when a write is performed to a specific sector SCam of the disk DK1, the counter 64 can count the number of writes to sectors SCa(m-1) and SCa(m+1) adjacent to the specific sector SCam in the radial direction dr1. The counter 64 can then update the total number of writes for each sector SCa in the non-volatile memory 90 (storage unit).
[0037] 1 and 6, a reference number (first reference number) is further recorded in the non-volatile memory 90 (storage unit). The second judgment unit 62b can judge whether a total number of write operations that exceeds the reference number is recorded in the non-volatile memory 90.
[0038] 1 and 5, the refresh processing unit 66 can detect sectors having a total number of writes exceeding a reference number based on information in the nonvolatile memory 90 (storage unit). For example, when the total number of writes in a sector SCam exceeds a reference number, the refresh processing unit 66 can perform a refresh process by reading data (target data) in the sector (target sector) SCam and rewriting the data (target data) to the sector SCam. At that time, the refresh processing unit 66 can further reset the total number of writes in the sector SCam recorded in the nonvolatile memory 90.
[0039] As shown in Figures 1, 4, and 6, when the first parity management unit 63a detects the parity area Ap from the non-volatile memory 90 (storage unit), it can preferentially search for the parity area Ap of the track Ta whose refresh process is approaching.
[0040] For example, when detecting a parity area Ap from the non-volatile memory 90, the first parity management unit 63a can determine whether the parity area Ap of the track Ta having the largest value obtained by dividing the total number of writes by the reference number is an invalid parity area. If the first parity management unit 63a determines that the parity area Ap is a valid parity area, it can further determine whether the parity area Ap of the track Ta having the next largest value obtained by dividing the total number of writes by the reference number is an invalid parity area. When the first parity management unit 63a determines that the parity area Ap is an invalid parity area, it can preferentially detect the parity area Ap that has been determined to be an invalid parity area.
[0041] If we limit it to the range shown in Figure 6, first, when the first parity management unit 63a detects the parity area Ap from the non-volatile memory 90, it determines whether the parity area Ap of the track Ta (the track located in the division area Divm of the zone area Zonex of the disk DK1) which has the largest value (0.95) obtained by dividing the total number of writes (950) by the reference number of writes (1000) is an invalid parity area. In the example of Fig. 6, the maximum value of the total number of writes divided by the reference number is 0.95, which is less than 1.0. However, this is not limited to the example of Fig. 6, and there may be cases where the maximum value of the total number of writes divided by the reference number exceeds 1.0. Since the first parity management unit 63a determines that the parity area Ap is a valid parity area, the first parity management unit 63a can then further determine whether the parity area Ap of the track Ta (the track located in the division area Divm of the zone area Zone0 of the disk DK1) having the next largest value (0.9) obtained by dividing the total number of writes (1350) by the reference number of writes (1500) is an invalid parity area. Since the first parity management unit 63a determines that the parity area Ap is an invalid parity area, the first parity management unit 63a can subsequently detect the parity area Ap that has been determined to be an invalid parity area with priority.
[0042] 1, the command processing unit 67 can process a command received from the host 100. For example, the command processing unit 67 can process an unexecuted command by prioritizing a search by the first parity management unit 63a.
[0043] 1 and 4, the error correction unit 65 can recover data in the data area Ad of the disk DK. For example, when the read processing unit 61b detects that a read error has occurred in the data area Adm of the first recording layer Ya1 of the disk DK1, the error correction unit 65 can recover the first data based on the first data in the data area Adm and the first parity in the parity area Apm, and write the recovered first data to the data area Adm.
[0044] FIG. 2 is a perspective view showing a part of the magnetic disk device 1, and shows a plurality of disks DK and a plurality of heads HD. As shown in FIG. 2, the direction in which the disk DK rotates in the circumferential direction is referred to as the rotation direction dr3. In the example shown in FIG. 2, the rotation direction is shown counterclockwise, but it may be the opposite direction (clockwise). The moving direction dr2 of the head HD relative to the disk DK is opposite to the rotation direction dr3. The moving direction dr2 is the direction in which the head HD sequentially writes and reads data to the disk DK in the circumferential direction, that is, the direction in which the head HD moves relative to the disk DK in the circumferential direction. In the radial direction dr1 of the disk DK, the direction toward the outer periphery of the disk DK is referred to as the outward direction (outside), and the opposite direction to the outward direction is referred to as the inward direction (inside).
[0045] The magnetic disk device 1 includes i disks, disks DK1 through DKi, and j heads, heads HD1 through HDj. In this embodiment, the number of heads HD is twice the number of disks DK (j=2·i). The disks DK1 to DKi are provided coaxially and stacked with a gap between them. The disks DK1 to DKi have the same diameter. Here, terms such as "same," "identical," "matched," and "equivalent" not only mean exactly the same, but also mean different enough to be considered substantially the same. The disks DK1 to DKi may have different diameters.
[0046] Each of the disks DK has a recording layer Y on both sides. For example, the disk DK1 has a first recording layer Ya1 and a second recording layer Yb1 on the opposite side of the first recording layer Ya1. The disk DK2 has a first recording layer Ya2 and a second recording layer Yb2 on the opposite side of the first recording layer Ya2. The disk DKi has a first recording layer Yai and a second recording layer Ybi on the opposite side of the first recording layer Yai. Each of the first recording layers Ya may be referred to as a front surface or a recording surface. Each of the second recording layers Yb may be referred to as a back surface or a recording surface.
[0047] As described above, the magnetic disk device 1 of the present embodiment is a normal recording type magnetic disk device. Therefore, the user data area U of each recording layer Y is a normal recording area. In the normal recording type magnetic disk device, it is permitted to randomly write data in the user data area U, that is, normal recording is permitted.
[0048] Each recording layer Y has a user data area U and a system area S. The first recording layer Ya1 has a user data area Ua1 and a system area Sa1. The second recording layer Yb1 has a user data area Ub1 and a system area Sb1. The first recording layer Ya2 has a user data area Ua2 and a system area Sa2. The second recording layer Yb2 has a user data area Ub2 and a system area Sb2. The first recording layer Yai has a user data area Uai and a system area Sai. The second recording layer Ybi has a user data area Ubi and a system area Sbi.
[0049] In the user data area Ua1 (first recording layer Ya1), the track between the double dashed lines in the figure is designated as track Ta1. In the user data area Ub1 (second recording layer Yb1), the track located on the opposite side of track Ta1 is designated as track Tb1. In the user data area Ua2 (first recording layer Ya2), the track between the double dashed lines in the figure is designated as track Tc1. In the user data area Ub2 (second recording layer Yb2), the track located on the opposite side of track Tc1 is designated as track Td1. In the user data area Uai (first recording layer Yai), the track between the double dashed lines in the figure is designated as track Te1. In the user data area Ubi (second recording layer Ybi), the track located on the opposite side of track Te1 is designated as track Tf1. In this embodiment, the tracks Ta1, Tb1, Tc1, Td1, Te1, and Tf1 are located on the same cylinder.
[0050] The head HD faces the disk DK. In this embodiment, one head HD faces each recording layer Y of the disk DK. For example, the head HD1 faces the first recording layer Ya1 of the disk DK1, writes data to the first recording layer Ya1, and reads data from the first recording layer Ya1. The head HD2 faces the second recording layer Yb1 of the disk DK1, writes data to the second recording layer Yb1, and reads data from the second recording layer Yb1. The head HD3 faces the first recording layer Ya2 of the disk DK2, writes data to the first recording layer Ya2, and reads data from the first recording layer Ya2. The head HD4 faces the second recording layer Yb2 of the disk DK2, writes data to the second recording layer Yb2, and reads data from the second recording layer Yb2. The head HDj-1 faces the first recording layer Yai of the disk DKi, writes data to the first recording layer Yai, and reads data from the first recording layer Yai. The head HDj faces the second recording layer Ybi of the disk DKi, writes data to the second recording layer Ybi, and reads data from the second recording layer Ybi.
[0051] FIG. 3 is a schematic diagram showing some of the tracks on which normal recording processing is performed. 3, the zone area Zone0 of the first recording layer Ya1 of the disc DK1 has tracks Ta1, Ta2, Ta3, ..., Ta(m-1), Tam, Ta(m+1), etc. aligned in the radial direction dr1. In the figure, track Ta1 is located on the outermost OD side of the disc DK1, and track Ta(m+1) is located on the innermost ID side of the disc DK1.
[0052] The track Ta1 has a track width W1 in the radial direction dr1, and a track center C1 at the center of the radial direction dr1. Like the track Ta1, the track Ta2 has a track width W2 and a track center C2, the track Ta3 has a track width W3 and a track center C3, the track Ta(m-1) has a track width W(m-1) and a track center C(m-1), the track Tam has a track width Wm and a track center Cm, and the track Ta(m+1) has a track width W(m+1) and a track center C(m+1). The track widths W1 to W(m+1) are the same. However, the track widths W1 to W(m+1) may be different from each other.
[0053] The tracks Ta1 to Ta(m+1) are arranged at a pitch (normal recording track pitch) Pt in the radial direction dr1. For example, the track center C1 and the track center C2 are separated by a pitch Pt in the radial direction dr1, and the track center C2 and the track center C3 are separated by a pitch Pt in the radial direction dr1. Also, the track center C(m-1) and the track center Cm are separated by a pitch Pt in the radial direction dr1, and the track center Cm and the track center C(m+1) are separated by a pitch Pt in the radial direction dr1. Note that the tracks Ta1 to Ta(m+1) may be arranged at different pitches in the radial direction dr1.
[0054] In a normal recording type magnetic disk device, high density can be achieved by designing the pitch Pt to be narrow in order to increase the storage capacity.
[0055] 3, tracks Ta1 to Ta(m+1) are arranged with gaps g in the radial direction dr1. For example, tracks Ta1 and Ta2 are separated by gap g in the radial direction dr1, and tracks Ta2 and Ta3 are separated by gap g in the radial direction dr1. Tracks Ta(m-1) and Tam are separated by gap g in the radial direction dr1, and tracks Tam and Ta(m+1) are separated by gap g in the radial direction dr1. Tracks Ta1 to Ta(m+1) may be arranged with different gaps between them.
[0056] 3 and 4, for convenience of explanation, each track Ta is shown as a rectangle, but in reality, each track Ta is curved along the circumferential direction. Also, each track may be wavy, extending in the circumferential direction while fluctuating in the radial direction dr1.
[0057] When performing normal write processing, the write processing unit 61a positions head HD1 at track center C1 and writes data to track Ta1, positions head HD1 at track center C2 and writes data to track Ta2, positions head HD1 at track center C3 and writes data to track Ta3, positions head HD1 at track center C(m-1) and writes data to track Ta(m-1), positions head HD1 at track center Cm and writes data to track Tam, and positions head HD1 at track center C(m+1) and writes data to track Ta(m+1).
[0058] In the example shown in Figure 3, the write processing unit 61a may perform write processing sequentially on tracks Ta1 to Ta(m+1), or may perform write processing randomly on specified sectors of each of tracks Ta1 to Ta(m+1).
[0059] 4 is a diagram for explaining a plurality of tracks Ta that are continuous in the radial direction dr1 in the magnetic disk device 1. Here, five tracks Ta in the zone area Zone 0 of the first recording layer Ya1 of the disk DK1 are shown. 4, the zone area Zone0 of the first recording layer Ya1 of the disc DK1 has a plurality of tracks Ta, such as tracks Ta(m-2), Ta(m-1), Tam, Ta(m+1), and Ta(m+2). For example, the track Tam is a track located in a divided area Divm of the zone area Zone0 of the first recording layer Ya1 of the disc DK1.
[0060] Each track Ta includes a data area Ad and a parity area Ap. The data area Ad is an area in which data is recorded. The parity area Ap is an area in which parity for restoring data in the data area Ad of the same track Ta is recorded. For example, the parity area Apm is an area in which parity for restoring data in the data area Adm is recorded.
[0061] FIG. 5 is a schematic diagram showing three sectors SCa(m-1), SCam, and SCa(m+1) aligned in the radial direction dr1 of the magnetic disk device 1, and is a diagram for explaining the effect of ATI (Adjacent Track Interference) on adjacent sectors. In Figure 5, the area where the write process of data for sector SCam was performed is shaded, and the area where the write process of data for sector SCa(m-1) was performed and the area where the write process of data for sector SCa(m+1) was performed are marked with dot patterns.
[0062] 5, track Tam has sector SCam. Track Ta(m-1) has sector SCa(m-1) adjacent to sector SCam in the radial direction dr1. Track Ta(m+1) has sector SCa(m+1) adjacent to sector SCam in the radial direction dr1.
[0063] Hereinafter, track Tam is referred to as target track Tam, track Ta(m-1) is referred to as adjacent track Ta(m-1), and track Ta(m+1) is referred to as adjacent track Ta(m+1). Adjacent track Ta(m+1) is an inner adjacent track located inside target track Tam. Adjacent track Ta(m-1) is an outer adjacent track located outside target track Tam.
[0064] Also, sector SCam is called target sector SCam, sector SCa(m-1) is called adjacent sector SCa(m-1), and sector SCa(m+1) is called adjacent sector SCa(m+1). Adjacent sector SCa(m+1) is an inner adjacent sector adjacent to target sector SCam in the radial direction dr1. Adjacent sector SCa(m-1) is an outer adjacent sector adjacent to target sector SCam in the radial direction dr1.
[0065] When data is written to adjacent sector SCa(m-1) or when data is written to adjacent sector SCa(m+1), the data in the target sector SCam is affected by the ATI.
[0066] Furthermore, when data is written to adjacent sectors SCa(m-1) and SCa(m+1) many times, data is also written (overwritten) to the target sector SCam near the boundary with adjacent sectors SCa(m-1) and SCa(m+1) each time. If the number of writes to adjacent sectors SCa(m-1) and SCa(m+1) becomes too many, it may become impossible to read the original target data in the target sector SCam.
[0067] As described above, in the magnetic disk device 1, taking into consideration the ATI effect, when the total number of writes to the adjacent sectors SCa(m-1) and SCa(m+1) exceeds a reference number, the refresh processing unit 66 performs a refresh process called an ATI refresh operation. The process of refreshing the target sector SCam is a process of reading the target data of the target sector SCam and rewriting the read target data to the target sector SCam. This makes it possible to prevent in advance a situation in which the original target data of the target sector SCam cannot be read due to the ATI effect. When data is written to the adjacent sector SCa(m-1), the counter 64 can count the number of writes to the target sector SCam as "h" times, where h=1. Alternatively, the counter 64 may count while adjusting h to "1" or a value other than "1" in consideration of the magnitude of the ATI effect. For example, the counter 64 can count a value greater than "1" when it is determined that a write process in which the ATI effect is greater than normal has been performed, and count a value less than "1" when it is determined that a write process in which the ATI effect is smaller than normal has been performed.
[0068] Next, an exemplary parity management table stored in the non-volatile memory 90 (storage unit) will be described. Fig. 6 is a diagram showing a part of the parity management table stored in the non-volatile memory 90 of the magnetic disk device 1, and shows information related to parity, the total number of writes, the reference number, etc.
[0069] As shown in FIG. 6, the parity management table can manage the search target, search history, parity, and total number of writes for each track. "Search target" indicates whether the parity area Ap of the track Ta is to be searched or not. For example, the first parity management unit 63a can exclude the parity area Ap of the track Ta located in the division area Div(m+2) of the zone area Zone0 of the disk DK1 (or the head HD1) from the search target. The "search history" indicates whether the first parity management section 63a has searched the parity area Ap of each track Ta (searched) or has not searched (not searched).
[0070] "Parity" indicates whether the parity area Ap of each track Ta is a valid parity area (Yes) or an invalid parity area (No). For example, when new data is written to the data area Ad of the track Ta located in the divided area Divm of the zone area Zonex of the disk DK1, the first parity management unit 63a can update "parity" in the divided area Divm of the zone area Zonex of the disk DK1 from Yes to No.
[0071] "Write count (total)" indicates the maximum value of the total number of writes in each track Ta. Each track Ta has a total number of writes for each sector SCa. The "reference number of times" is the number of times that a write count is allowable. In this embodiment, the "reference number of times" is set for each zone area Zone. However, the "reference number of times" does not have to be set for each zone area Zone. For example, the "reference number of times" may be the same for all tracks Ta of the disk DK1. Alternatively, when the recording layer Y is divided into a plurality of partition areas in the circumferential direction, the "reference number" may be set for each partition area. Alternatively, when the recording layer Y is divided into a plurality of partition areas in the radial direction dr1 and the circumferential direction, the "reference number" may be set for each partition area.
[0072] 6, the track Ta with the largest value obtained by dividing the total number of writes by the reference number is a track located in the divided area Divm of the zone area Zonex of the disk DK1. The track Ta with the value next closest to 1 is a track located in the divided area Divm of the zone area Zone0 of the disk DK1.
[0073] The non-volatile memory 90 can store a parity management table, and the parity management table is updated so that the MPU 60 can make decisions and perform processing based on the parity management table. The magnetic disk device 1 of this embodiment is configured as described above.
[0074] 7 and 8 are flowcharts for explaining the parity management method applied to the magnetic disk device 1. As shown in Figures 7, 1, and 6, when the parity management method is started, first, in step S1, the MPU 60 judges whether or not the start condition is satisfied. Here, the start condition is that the first judgment unit 62a judges that there is no unexecuted command for a specific period of time. Note that the start is repeatedly performed until the search by the first parity management unit 63a is completed. If the MPU 60 judges that the start condition is not satisfied (step S1), the parity management method is terminated.
[0075] On the other hand, if the MPU 60 determines that the start-up condition is satisfied (step S1), the process proceeds to step S2, where the first parity management unit 63a prioritizes the multiple parity areas Ap that are the subject of the search. For example, the first parity management unit 63a searches with priority given to the parity area Ap of the track Ta that is nearing the time for the refresh process. Parity can be written with priority to the parity area Ap of the track Ta that is most likely to have the next read error, and the quality of the magnetic disk device 1 can be improved efficiently.
[0076] Next, in step S3, the command processing unit 67 determines whether there is an unexecuted command. If the command processing unit 67 determines that there is an unexecuted command (step S3), the process proceeds to step S1. Therefore, the command processing unit 67 can process the unexecuted command in priority to the search by the first parity management unit 63a.
[0077] On the other hand, if the command processing unit 67 determines that there is no unexecuted command (step S3), the process proceeds to step S4. The first parity management unit 63a can search for invalid parity areas by background processing. Therefore, it is possible to generate and write parity without adversely affecting the performance of the magnetic disk device 1.
[0078] In step S4, the first parity management unit 63a judges whether the detected parity area Ap is an invalid parity area. If the parity area Ap is an invalid parity area (step S4), the process proceeds to step S6.
[0079] On the other hand, if the parity area Ap is not an invalid parity area (step S4), that is, if the parity area Ap is a valid parity area, the process proceeds to step S5, and in step S5, the first parity management unit 63a determines whether there are any parity areas Ap remaining that have not been searched.
[0080] If there remains any parity area Ap for which no search has been performed (step S5), the process proceeds to step S3. On the other hand, if there is no parity area Ap remaining that has not been searched (step S5), the parity management method ends.
[0081] 8, 1, and 6, next, in step S6, the first parity management unit 63a generates parity based on the data of the data area Ad of the same track Ta as the detected invalid parity area Ap. After that, in step S7, the first parity management unit 63a judges whether the generation of the parity has been successful.
[0082] If the generation of parity fails (step S7), the process proceeds to step S8, where the first parity management unit 63a records in the non-volatile memory 90 (storage unit) that the detected invalid parity area Ap is not a search target. That is, the first parity management unit 63a records the address of the first sector of the detected invalid parity area Ap in the non-volatile memory 90, and excludes the detected invalid parity area Ap from the search target. In this embodiment, the method for accessing data is the CHS method, but the LBA (Logical Block Addressing) method may also be used.
[0083] On the other hand, if the parity generation is successful (step S7), the process proceeds to step S9, where the first parity management unit 63a writes the parity to the detected invalid parity area Ap. Then, in step S10, the first parity management unit 63a determines whether the writing of the parity to the parity area Ap was successful. If the writing of the parity is unsuccessful (step S10), the process proceeds to step S8.
[0084] On the other hand, if the parity writing is successful (step S10), the process proceeds to step S11. In step S11, the first parity management unit 63a records in the non-volatile memory 90 that the parity area Ap is a valid parity area, and the process proceeds to step S1. If the parity area Ap is a valid parity area, the data in the data area Ad can be restored (recovered, corrected, rescued, or error corrected) when a read error occurs in the data area Ad, so that the occurrence of a read error in the data area Ad can be suppressed.
[0085] According to the magnetic disk device 1 and the parity management method according to the embodiment configured as described above, when the MPU 60 detects an invalid parity area Ap, it can generate parity based on the data in the data area Ad and write the parity to the parity area Ap. Since the parity can be used to restore the data in the data area Ad, it is possible to suppress the occurrence of read errors in the data area Ad. The MPU 60 can process commands received from the host 100 with priority over searches for invalid parity areas. The MPU 60 can search for invalid parity areas as background processing. The MPU 60 will not search for invalid parity areas or generate parity while unexecuted commands remain. Therefore, the MPU 60 can generate and write parity without adversely affecting the processing of commands received from the host 100. From the above, it is possible to obtain a magnetic disk device 1 and a parity management method that are capable of generating parity without interfering with the processing of received commands.
[0086] Although the above embodiment of the present invention has been described, the above embodiment is presented as an example and is not intended to limit the scope of the invention. The above novel embodiment can be implemented in various other forms, and various omissions, substitutions, and modifications can be made without departing from the gist of the invention. The above embodiment and its modifications are included in the scope and gist of the invention, and are included in the scope of the invention and its equivalents described in the claims.
[0087] For example, the first parity management unit 63a may consider the number of read retries instead of the number of writes when prioritizing the multiple parity areas Ap that are the targets of the search. For example, the counter 64 can count the number of read retries for the disk DK. The counter 64 can count the number of read retries for a specific sector SCa of the disk DK and update the total number of retries for each sector SCa in the non-volatile memory 90 (storage unit).
[0088] The non-volatile memory 90 can further store another reference number (a second reference number). When detecting an invalid parity area Ap from the non-volatile memory 90, the first parity management unit 63a can determine whether the parity area Ap of the track Ta having the largest value obtained by dividing the total number of read retries by the second reference number is an invalid parity area.
[0089] When the first parity management unit 63a determines that the parity area Ap is a valid parity area, it further determines whether the parity area Ap of the track Ta having the next largest value obtained by dividing the total number of read retries by the second reference number is an invalid parity area. On the other hand, when the first parity management unit 63a determines that the parity area Ap is an invalid parity area, it preferentially detects the parity area Ap that has been determined to be an invalid parity area.
[0090] Alternatively, the first parity management section 63a may take into consideration a third threshold value different from the number of writes and the number of read retries when prioritizing the multiple parity areas Ap that are the targets of the search.
[0091] The above-mentioned technology may be applied to a magnetic disk device of a shingled recording type and a magnetic disk device of a hybrid recording type that selectively executes a normal recording type and a shingled recording type. For example, in the hybrid recording type, the user data area U of the recording layer Y has a shingled recording area on the inner circumference side, and a normal recording area on the outer circumference side of the shingled recording area. This normal recording area may be called a conventional zone, and may be an area where data that is frequently rewritten, such as system files and metadata, is recorded. [Explanation of symbols]
[0092] 1...magnetic disk device, 60...MPU, 61...read / write processing unit, 61a...write processing unit, 61b...read processing unit, 62a...first judgment unit, 62b...second judgment unit, 63a...first parity management unit, 63b...second parity management unit, 64...counter, 65...error correction unit, 66...refresh processing unit, 67...command processing unit, 70...volatile memory, 80...buffer memory, 90...non-volatile memory, 100...host, 110...system controller, 120...driver IC, 140...R / W channel, 150...HDC, DK...disk, Y...recording layer, Zone...zone area, Ta...track, SCa...sector, Ad...data area, Ap...parity area, HD...head, dr1...radial direction, dr2...traveling direction, dr3...rotational direction.
Claims
1. A disk having a first track, the first track including a first data area in which first data is recorded, and a first parity area in which a first parity for recovering the first data in the first data area is recorded; a storage unit that stores information indicating whether the first parity area is a valid parity area in which the first parity is recorded or an invalid parity area in which the first parity is not recorded; a first determination unit that determines whether or not there is an unexecuted command; a first parity management unit that searches the first parity area from the storage unit after it is determined by the first determination unit that there is no unexecuted command, and when the first parity area that is an invalid parity area is detected, generates the first parity based on the first data in the first data area, and writes the first parity to the first parity area. Magnetic disk device.
2. after the first determination unit has determined that there is no unexecuted command for a specific period of time, the first parity management unit starts searching the storage unit for the first parity area; 2. The magnetic disk drive according to claim 1.
3. The first parity management unit if the generation of the first parity is successful and the writing of the first parity to the first parity area is successful, updating the information in the storage unit to information indicating that the first parity area is the valid parity area; if generation of the first parity fails, or writing of the first parity to the first parity area fails, updating the information in the storage unit to information indicating that the first parity area is not a search target; 2. The magnetic disk drive according to claim 1.
4. A second parity management unit is further provided, After the first parity management unit updates the information in the storage unit to information indicating that the first parity area is not a search target, the second parity management unit writes parity to the first parity area; when the second parity management unit has succeeded in writing the parity to the first parity area, the second parity management unit updates the information in the storage unit to information indicating that the first parity area is a search target; 4. The magnetic disk drive according to claim 3.
5. A light processing unit; A second parity management unit, After the first parity management unit updates the information of the storage unit to information indicating that the first parity area is not a search target, when the write processing unit writes second data to the first data area in accordance with the received write command, the second parity management unit: generating a second parity based on the second data; writing the second parity to the first parity area; when the writing of the second parity to the first parity area is successful, updating the information in the storage unit to information indicating that the first parity area is a search target; 4. The magnetic disk drive according to claim 3.
6. when the write processing unit receives the write command, the write processing unit sequentially writes the second data to the entire first data area; 6. The magnetic disk drive according to claim 5.
7. a counter for counting the number of writes to the disk, the counter counting the number of writes to sectors radially adjacent to a specific sector of the disk when the data is written to the specific sector, and updating the total number of writes for each sector in the storage unit; a second determination unit that determines whether the total exceeds a first reference number of times recorded in the storage unit; a refresh processing unit that, when detecting a target sector having the total exceeding the first reference number of times, reads target data of the target sector, rewrites the target data to the target sector, and resets the total of the target sector recorded in the storage unit; the disk has a plurality of tracks including the first track, Each of the tracks includes a data area and a parity area, when detecting the invalid parity area from the storage unit, the first parity management unit determines whether the parity area of the track having the largest value obtained by dividing the total by the first reference number is the invalid parity area; if it is determined that the parity area is the valid parity area, it is further determined whether the parity area of the track having the next largest value obtained by dividing the sum by the first reference number is the invalid parity area; when it is determined that the parity area is the invalid parity area, the parity area determined to be the invalid parity area is preferentially detected; 2. The magnetic disk drive according to claim 1.
8. a counter for counting the number of read retries for the disk, the counter counting the number of read retries for a predetermined sector of the disk and updating a total of the number of retries for each of the sectors in the storage unit; the disk has a plurality of tracks including the first track, Each of the tracks includes a data area and a parity area, The storage unit stores a second reference number of times, when detecting the invalid parity area from the storage unit, the first parity management unit determines whether the parity area of the track having the largest value obtained by dividing the total by the second reference number is the invalid parity area; if it is determined that the parity area is the valid parity area, it is further determined whether the parity area of the track having the next largest value obtained by dividing the sum by the second reference number is the invalid parity area; when it is determined that the parity area is the invalid parity area, the parity area determined to be the invalid parity area is preferentially detected; 2. The magnetic disk drive according to claim 1.
9. A command processing unit is further provided, the first determination unit periodically determines whether or not there is an unexecuted command after the first parity management unit starts searching the storage unit for the first parity area; When the first determination unit determines that there is an unexecuted command after the first parity management unit starts searching the storage unit for the first parity area, the first parity management unit interrupts the search for the first parity area from the storage unit; the command processing unit processes the unexecuted command in priority to the search by the first parity management unit.
2. The magnetic disk drive according to claim 1.
10. A lead processing section; An error correction unit, When the read processing unit detects that a read error has occurred in the first data area of the disk, the error correction unit recovers the first data based on the first data in the first data area and the first parity in the first parity area, and writes the recovered first data to the first data area.
2. The magnetic disk drive according to claim 1.
11. A parity management method is applied to a magnetic disk device including: a disk having a first track, the first track including a first data area in which first data is recorded, and a first parity area in which a first parity for restoring the first data in the first data area is recorded; and a storage unit that stores information indicating whether the first parity area is a valid parity area in which the first parity is recorded, or an invalid parity area in which the first parity is not recorded, the method comprising: Determine whether there are any pending commands, after it is determined that there is no unexecuted command, the first parity area is searched for in the storage unit, and if the first parity area which is the invalid parity area is detected, the first parity is generated based on the first data in the first data area, and the first parity is written to the first parity area. Parity management method.
Citation Information
Patent Citations
Magnetic disk device
US20220301590A1
Write verify method for correcting unrecoverable sectors in a disc storage system using track level redundancy
US5872800A
Stored data processing apparatus, storage apparatus, and stored data processing program
US7627725B2
