Magnetic disk device
By introducing a monitoring sector management unit and a parity sector management unit into the disk device, the error correction problem when sectors cannot be read is solved, thereby improving processing performance and the reliability of data reading.
Patent Information
- Application Number
- CN202110968094.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-03-18
- Filing Date
- 2021-08-23
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2041-08-23
AI Technical Summary
When a disk device is unable to read a predetermined sector, existing technologies struggle to effectively correct errors using correction codes, leading to a decrease in processing performance.
A monitoring sector management unit is introduced into the disk device to manage defective sectors and perform XOR operations on all sectors except defective sectors when writing data to generate and write parity sectors, thereby improving error correction capabilities.
By generating and managing parity sectors, the processing performance of the disk device is improved, especially the ability to correct defective sectors during the writing process, thereby enhancing the reliability and efficiency of data reading.
Smart Images

Figure CN115114074B_ABST
Abstract
Description
[0001] Related Application
[0002] This application claims priority from Japanese Patent Application No. 2021-044666 filed March 18, 2021. The entire contents of the prior application are incorporated herein by reference. TECHNICAL FIELD
[0003] Embodiments of the present application relate to a disk device. BACKGROUND
[0004] A disk device corrects a sector based on a correction code attached to the sector in a case where the sector cannot be read. The disk device can have a correction function of correcting the sector based on a parity sector corresponding to a track including the sector in a case where the sector cannot be corrected (recovered or restored) by the correction code corresponding to the sector. The disk device writes a result of an exclusive OR (XOR) operation on each sector of a predetermined track as a parity sector to the track. The disk device performs read modify write of rewriting a parity sector by reading the track in a case where a part of the sectors of the track is written (or overwritten). SUMMARY
[0005] Embodiments of the present application provide a disk device capable of improving processing performance.
[0006] A disk device of the present embodiment includes a disk including a first track having a plurality of first error sectors including a defect and a first parity sector, a second track having a second parity sector, and a media cache; a head that writes data to the disk and reads data from the disk; a defect management unit that manages the defect; and a controller that, in a case where the first error sector is managed by the defect management unit, in a case where a write command to write write data to a first region of a part of the first track is accepted, after performing an XOR operation on all sectors except for the first region of the first track and the first parity sector, writes the write data to the first region, and writes a result of an XOR operation on the write data and a result of the XOR operation to the first parity sector. BRIEF DESCRIPTION OF DRAWINGS
[0007] Figure 1 is a block diagram showing the configuration of a disk device of an embodiment.
[0008] Figure 2 is a schematic view showing an example of a disk of an embodiment.
[0009] Figure 3 is a schematic diagram showing an example of the general recording process.
[0010] Figure 4 is a schematic diagram showing an example of the parity recording process.
[0011] Figure 5 is a schematic diagram showing an example of the monitoring object sector and the parity sector of the embodiment.
[0012] Figure 6 is a flowchart showing an example of the updating method of the parity sector.
[0013] Figure 7 is a flowchart showing an example of the setting method of the monitoring object sector in the track containing the invalid parity sector of the embodiment.
[0014] Figure 8 is a flowchart showing an example of the setting method of the monitoring object sector in the track containing the valid parity sector of the embodiment.
[0015] Figure 9 is a flowchart showing an example of the writing process method of the embodiment.
[0016] Figure 10 is a block diagram showing the configuration of the disk device of the modified example 1.
[0017] Figure 11 is a schematic diagram showing an example of the reallocation process method of the modified example 1.
[0018] Figure 12 is a flowchart showing an example of the reallocation method of the modified example 1.
[0019] Figure 13 is a flowchart showing an example of the writing process method of the modified example 2.
[0020] Figure 14 is a flowchart showing an example of the read change writing process of the modified example 2.
[0021] Figure 15 is a flowchart showing an example of the read process method of the modified example 3.
[0022] Figure 16 is a flowchart showing an example of the setting method of the monitoring object sector of the modified example 4. DETAILED DESCRIPTION
[0023] Hereinafter, the embodiment will be described with reference to the drawings. In addition, the drawings are an example, and do not limit the scope of the invention.
[0024] (Embodiment)
[0025] Figure 1 is a block diagram showing the configuration of the disk device 1 of the embodiment.
[0026] The disk device 1 is provided with a head disk assembly (HDA) described later, a driver IC 20, a head amplifier integrated circuit (hereinafter, referred to as a head amplifier IC or a preamplifier) 30, a volatile memory 70, a nonvolatile memory 80, a buffer memory (cache) 90, a system controller 130 which is an integrated circuit of a single chip. In addition, the disk device 1 is connected with a host system (hereinafter, referred to as a host) 100.
[0027] The HAD has a disk (hereinafter, referred to as a disk) 10, a spindle motor (hereinafter, referred to as a SPM) 12, an arm 13 on which a head 15 is mounted, and a voice coil motor (hereinafter, referred to as a VCM) 14. The disk 10 is mounted to the SPM 12 and rotates by the driving of the SPM 12. The arm 13 and the VCM 14 constitute an actuator. The actuator moves and controls the head 15 mounted to the arm 13 to a predetermined position of the disk 10 by the driving of the VCM 14. The disk 10 and the head 15 can be provided in a number of two or more.
[0028] The disc 10 allocates, in a region where data can be written, a user data area 10a which can be used by a user, a media cache (or also sometimes referred to as a media cache area) 10b which temporarily holds data (or a command) transferred from a host or the like before writing to a predetermined region of the user data area 10a, and a system area 10c in which information required for system management is written. Further, the media cache 10b can also not be configured to the disc 10. Hereinafter, a direction from an inner periphery to an outer periphery of the disc 10, or a direction from an outer periphery to an inner periphery of the disc 10 will be referred to as a radial direction. In the radial direction, a direction from the inner periphery to the outer periphery will be referred to as an outer direction (outer side), and a direction from the inner periphery to the outer periphery will be referred to as an inner direction (inner side). A direction orthogonal to the radial direction of the disc 10 will be referred to as a circumferential direction. The circumferential direction corresponds to a direction along a circumference of the disc 10. In addition, a predetermined position in the radial direction of the disc 10 will be referred to as a radial position, and a predetermined position in the circumferential direction of the disc 10 will be referred to as a circumferential position. Sometimes, the radial position and the circumferential position will be collectively referred to as a position. Further, an "orbit" is used with the meaning of one of a plurality of regions divided in the radial direction of the disc 10, a path of the head 15 at a predetermined radial position, data extending in the circumferential direction of the disc 10, data written to one turn of an orbit at a predetermined radial position, data written to a predetermined orbit of the disc 10, a portion of data written to a predetermined orbit of the disc 10, or the like. A "sector" is used with the meaning of one of a plurality of regions divided in the circumferential direction on a predetermined orbit of the disc 10, data written to a predetermined circumferential position at a predetermined radial position of the disc 10, data written to a predetermined sector of a predetermined orbit of the disc 10, or the like. Sometimes, a "radial width of an orbit" will be referred to as an "orbit width". A "path passing through a center position of an orbit width at a predetermined orbit" will be referred to as an "orbit center".
[0029] The head 15 has a slider as a main body, and has a write head 15W and a read head 15R attached to the slider. The write head 15W writes data to the disc 10. The read head 15R reads data written to the disc 10. Also, "write head 15W" is sometimes referred to simply as "head 15", "read head 15R" is sometimes referred to simply as "head 15", and "write head 15W and read head 15R" are sometimes collectively referred to as "head 15". Also, "the center portion of head 15" is sometimes referred to as "head 15", "the center portion of write head 15W" is sometimes referred to as "write head 15W", and "the center portion of read head 15R" is sometimes referred to as "read head 15R". Also, "the center portion of write head 15W" is sometimes referred to simply as "head 15", and "the center portion of read head 15R" is sometimes referred to simply as "head 15". Also, the case where "the center portion of head 15 is positioned at the track center of a predetermined track" is sometimes expressed as "head 15 is positioned at a predetermined track", "head 15 is arranged at a predetermined track", or "head 15 is located at a predetermined track".
[0030] Figure 2 is a schematic view showing an example of the disc 10 of the present embodiment. As shown in Figure 2 , the direction in which the disc 10 is rotated is referred to as the rotation direction in the circumferential direction. Also, in the example shown in Figure 2 , the rotation direction is indicated in the counterclockwise direction, but can be the opposite direction (clockwise). In Figure 2 , the disc 10 is divided into an inner circumferential region IR located in the inner direction, an outer circumferential region OR located in the outer direction, and a middle circumferential region MR located between the inner circumferential region IR and the outer circumferential region OR.
[0031] In the example shown in Figure 2 , the disc 10 includes a user data region 10a, a media cache 10b, and a system region 10c. In Figure 2 , the user data region 10a, the media cache 10b, and the system region 10c are arranged in the order described in the outer direction. In Figure 2 , the media cache 10b is arranged adjacent in the outer direction of the user data region 10a. In other words, the media cache 10b is arranged between the user data region 10a and the system region 10c. Here, "adjacent" means not only that data, objects, regions, spaces, and the like are arranged next to each other, but also includes the case where they are arranged with a predetermined interval therebetween. In Figure 2 , the system region 10c is arranged adjacent in the outer direction of the media cache 10b. Also, the order of arrangement of the user data region 10a, the media cache 10b, and the system region 10c is not limited to Figure 2The order shown can also be any order. In addition, in a case where the medium cache 10b is not configured to the disk 10, the system area 10c can be configured adjacent to the user data area 10a in an outer direction.
[0032] In Figure 2 In the example shown, the user data area 10a is configured in a radial direction from the inner peripheral area IR to the outer peripheral area OR. In Figure 2 In the example shown, the medium cache 10b is configured in the radial direction to the outer peripheral area OR. In addition, the medium cache 10b can also be located in the inner peripheral area IR or the middle peripheral area MR. In addition, the medium cache 10b can also be dispersed in the outer peripheral area OR, the middle peripheral area MR, and the inner peripheral area IR. In Figure 2 In the example shown, the system area 10c is configured in the radial direction to the outer peripheral area OR. In other words, the system area 10c is configured from a predetermined position of the outer peripheral area OR to the outermost periphery of the disk 10. In addition, the system area 10c can also be configured to the middle peripheral area MR or the inner peripheral area IR.
[0033] The user data area 10a of the disk 10 can be written with data in a Shingled Write Magnetic Recording (SMR) or Shingled Write Recording (SWR) method in which a part of a radial direction of a predetermined track is overlapped with a tile recording of a track to be written next. In addition, the user data area 10a can also be written with data in a Conventional Magnetic Recording (CMR) method in which a track adjacent in the radial direction (hereinafter, also sometimes referred to as an adjacent track) to a predetermined track is written at a predetermined interval in the radial direction from the predetermined track, or can be written with data at random. Hereinafter, "writing data in the SMR method" is also sometimes referred to as "SMR", "performing an SMR process", or simply "writing". A writing process other than the CMR process is also sometimes referred to as an "SMR process". In addition, "writing data in the CMR method" is also sometimes referred to as "CMR", "performing a CMR process", or simply "writing".
[0034] As Figure 2 As shown, the head 15 is configured to a predetermined position by moving from the inner direction to the outer direction by rotation of the VCM 14 around the rotation axis, or moving from the outer direction to the inner direction, with respect to the disk 10.
[0035] The drive IC 20 controls the driving of the SPM 12 and the VCM 14 according to the control of the system controller 130 (in detail, the MPU 60 described later).
[0036] The head amplifier IC (pre-amplifier) 30 has a read amplifier and a write driver, and the like. The read amplifier amplifies a read signal read out from the disk DK, and outputs to the system controller 130 (in detail, a read / write (R / W) channel 40 described later). The write driver outputs a write current corresponding to a signal output from the R / W channel 40 to the head 15.
[0037] The volatile memory 70 is a semiconductor memory in which data saved is lost if power supply is cut off. The volatile memory 70 saves data and the like required for processing in each part of the disk device 1. The volatile memory 70 is, for example, a DRAM (Dynamic Random Access Memory) or a SDRAM (Synchronous Dynamic Random Access Memory).
[0038] The non-volatile memory 80 is a semiconductor memory in which data saved is recorded even if power supply is cut off. The non-volatile memory 80 is, for example, a flash ROM (Flash Read Only Memory) of a NOR type or a NAND type.
[0039] The buffer memory 90 is a semiconductor memory that temporarily records data and the like transmitted and received between the disk device 1 and the host 100. Further, the buffer memory 90 can be configured integrally with the volatile memory 70. The buffer memory 90 is, for example, a DRAM, a SRAM (Static Random Access Memory), a SDRAM, a FeRAM (Ferroelectric Random Access Memory), or an MRAM (Magneto Resistive Random Access Memory), and the like.
[0040] The system controller (controller) 130 is realized, for example, using a large-scale integrated circuit (LSI) called a System-on-a-Chip (SoC) in which a plurality of elements are integrated on a single chip. The system controller 130 includes a read / write (R / W) channel 40, a hard disk controller (HDC) 50, a microprocessor (MPU) 60. The system controller 130 is electrically connected to, for example, the driver IC 20, the head amplifier IC 30, the volatile memory 70, the non-volatile memory 80, the buffer memory 90, and the host system 100, and the like.
[0041] The R / W channel 40 performs signal processing of data (hereinafter, also referred to as read data) transferred from the disk 10 to the host 100 and data (hereinafter, also referred to as write data) transferred from the host 100 according to an instruction from the MPU 60 described later. The R / W channel 40 has a circuit or a function of modulating the write data. The R / W channel 40 has a circuit or a function of measuring and demodulating the signal quality of the read data. The R / W channel 40 is electrically connected to, for example, the head amplifier IC 30, the HDC 50, and the MPU 60.
[0042] The HDC 50 controls the transfer of data. For example, the HDC 50 controls the transfer of data between the host 100 and the disk 10 according to an instruction from the MPU 60 described later. The HDC 50 is electrically connected to, for example, the R / W channel 40, the MPU 60, the volatile memory 70, the nonvolatile memory 80, and the buffer memory 90.
[0043] The MPU 60 is a main controller that controls each part of the disk device 1. The MPU 60 controls the VCM 14 via the driver IC 20 to perform servo control of positioning the head 15. The MPU 60 controls the SPM 12 via the driver IC 20 to rotate the disk 10. The MPU 60 controls the write operation of data to the disk 10 and selects a storage destination of data, such as write data, transferred from the host 100. In addition, the MPU 60 controls the read operation of data from the disk 10 and controls the processing of data, such as read data, transferred from the disk DK to the host 100. In addition, the MPU 60 manages a region in which data is recorded. The MPU 60 is connected to each part of the disk device 1. The MPU 60 is electrically connected to, for example, the driver IC 20, the R / W channel 40, and the HDC 50.
[0044] The MPU 60 has a read / write control section 610, an error detection section 620, an error correction section 630, a parity sector management section 640, and a monitoring object sector management section 650. The MPU 60 executes processing of each section, such as the read / write control section 610, the error detection section 620, the error correction section 630, the parity sector management section 640, and the monitoring object sector management section 650, on firmware. Alternatively, the MPU 60 can have each section, such as the read / write control section 610, the error detection section 620, the error correction section 630, the parity sector management section 640, and the monitoring object sector management section 650, as a circuit. The read / write control section 610, the error detection section 620, the error correction section 630, the parity sector management section 640, and the monitoring object sector management section 650 can be included in the R / W channel 40 or the HDC 50.
[0045] The read / write control section 610 controls a read process of reading data from the disc 10 and a write process of writing data to the disc 10 in accordance with a command or the like from the host 100. The read / write control section 610 controls the VCM 14 via the driver IC 20 to position the head 15 at a predetermined position of the disc 10, and performs the read process or the write process. Hereinafter, the term "access" is also sometimes used in a meaning including recording or writing data (write process) to a predetermined area, reading out or reading data (read process) from a predetermined area, and moving the head 15 or the like to a predetermined area.
[0046] The read / write control section 610 performs the write process, for example, in a Conventional Magnetic Recording (CMR) mode of writing data to other tracks (hereinafter, also sometimes referred to as adjacent tracks) or other sectors (hereinafter, also sometimes referred to as adjacent sectors) adjacent to a predetermined track or a predetermined sector at a predetermined gap in a radial direction from the track or the sector. The "adjacent tracks" include "a track adjacent in an outer direction of the predetermined track", "a track adjacent in an inner direction of the predetermined track", and "a plurality of tracks adjacent in the outer direction and the inner direction of the predetermined track". The "adjacent sectors" include "a sector adjacent in an outer direction of the predetermined sector", "a sector adjacent in an inner direction of the predetermined sector", and "a plurality of sectors adjacent in the outer direction and the inner direction of the predetermined sector". Hereinafter, "writing data in the CMR mode" is also sometimes referred to as "CMR", "performing a CMR process", or simply "writing".
[0047] Further, the read / write control section 610 can also perform the write process in a Shingled write Magnetic Recording (SMR, or Shingled Write Recording: SWR) mode of writing a tile of a track to be written next in a part of a radial direction of a track written previously when writing to a plurality of tracks sequentially. Hereinafter, "writing data in the SMR mode" is also sometimes referred to as "SMR", "performing a SMR process", or simply "writing".
[0048] Figure 3 is a schematic view showing an example of a CMR process. Figure 3 A traveling direction is shown. The direction in which the head 15 writes and reads data with respect to the disc 10 sequentially in a circumferential direction, that is, the direction in which the head 15 travels with respect to the disc 10 in the circumferential direction is sometimes referred to as a traveling direction. For example, the traveling direction is a direction opposite to a direction of rotation of the disc 10. Further, the traveling direction can also be a direction identical to the direction of rotation of the disc 10. Figure 3 Tracks CTR1, CTR2, and CTR3 are shown.Figure 3 For example, tracks CTR1, CTR2, and CTR3 have the same track width. However, tracks CTR1 through CTR3 can also have different track widths. Terms such as "same," "identical," "consistent," and "equivalent" not only mean completely identical, but also include the implication of differences to a degree that would be considered substantially the same. Figure 3 The orbital center CTC1 of orbital CTR1, the orbital center CTC2 of orbital CTR2, and the orbital center CTC3 of orbital CTR3 are shown. Figure 3 In the example shown, tracks CTR1, CTR2, and CTR3 are written with track spacing CTP. The track center CTC1 of track CTR1 and the track center CTC2 of track CTR2 are separated with track spacing CTP. The track center CTC2 of track CTR2 and the track center CTC3 of track CTR3 are separated with track spacing CTP. Tracks CTR1 and CTR2 are separated with gap GP. Tracks CTR2 and CTR3 are separated with gap GP. Furthermore, tracks CTR1 to CTR3 can also be written with different track spacings. Figure 3 For ease of explanation, each track is shown as a rectangular shape extending in the circumferential direction with a predetermined track width, but in reality, it is curved along the circumferential direction. Alternatively, each track can also be wavy, extending in the circumferential direction while varying in the radial direction.
[0049] exist Figure 3 In the example shown, the MPU60, within a predetermined area of disk 10, such as user data area 10a, positions its head 15 at track center CTC1 to perform normal recording of track CTR1 or a predetermined sector of track CTR1. Within user data area 10a, the MPU60, with its head 15 positioned at track center CTC2 (separated from track center CTC1 by track pitch CTP) inwards from track center CTC1, performs normal recording of track CTR2 or a predetermined sector of track CTR2. Within user data area 10a, the MPU60, with its head 15 positioned at track center CTC3 (separated from track center CTC2 by track pitch CTP) inwards from track center CTC2, performs normal recording of track CTR3 or a predetermined sector of track CTR3. In a predetermined area of disk 10, such as user data area 10a, MPU60 can perform normal recording sequentially on tracks CTR1, CTR2, and CTR3, or it can perform normal recording randomly on predetermined sectors of track CTR1, track CTR2, and track CTR3.
[0050] Figure 4 This is a schematic diagram illustrating an example of watt record processing. Figure 4The direction is shown. The direction in which a plurality of tracks are continuously recorded in the radial direction, that is, the direction in which the track on which writing was performed previously overlaps the track on which writing will be performed next, is also called the forward direction. In Figure 4 the inner direction in the radial direction is set as the forward direction, or the outer direction in the radial direction can be set as the forward direction. Figure 4 The plurality of tracks STR1, STR2, and STR3, which are continuously written in one direction in the radial direction, are shown. Hereinafter, in the land recording, the region in which data is written by the write head 15W is called a written track, and the remaining region other than the region in which the other written track is written in the predetermined track is also sometimes called a read track. In Figure 4 the track center STC1 of the track STR1 in which no other track is written, the track center STC2 of the track STR2 in which no other track is written, and the track center STC3 of the track STR3 in which no other track is written are shown. In Figure 4 the example shown, the tracks STR1, STR2, and STR3 are written with a track pitch STP. The track center STC1 of the track STR1 and the track center STC2 of the track STR2 are separated by the track pitch STP. The track center STC2 of the track STR2 and the track center STC3 of the track STR3 are separated by the track pitch STP. The tracks STR1 to STR3 can also be written with different track pitches. In Figure 4 the radial direction width of the region in the track STR1 in which no other track is written by the track STR2 is the same as the radial direction width of the region in the track STR2 in which no other track is written by the track STR3. Further, the radial direction width of the region in the track STR1 in which no other track is written by the track STR2 and the radial direction width of the region in the track STR2 in which no other track is written by the track STR3 can also be different. In Figure 4 for convenience of explanation, the tracks are shown in a rectangular shape extending in the circumferential direction by a predetermined track width, and in fact, are curved in the circumferential direction. In addition, the tracks can also be wavy, one side of which varies in the radial direction and the other side of which extends in the circumferential direction. Further, in Figure 4 three tracks are written, but the number of tracks written can be less than three or more than three.
[0051] In Figure 5In the illustrated example, the MPU 60 sequentially records the tracks STR1 to STR3 in the inner direction of the tracks at the track pitch STP. In addition, the MPU 60 can sequentially record the tracks STR1 to STR3 in the outer direction of the tracks at the track pitch STP. The MPU 60 writes the track STR2 in the inner direction of the track STR1 at the track pitch STP, and partially overlaps the track STR2 in the inner direction of the track STR1. The MPU 60 writes the track STR3 in the inner direction of the track STR2 at the track pitch STP, and partially overlaps the track STR3 in the inner direction of the track STR2.
[0052] The error detection section 620 detects data, sectors, and areas, or the like, in which an error has occurred. For example, the error detection section 620 detects data that cannot be read (hereinafter, also referred to as read error data or error data) or a sector that cannot be read (hereinafter, also referred to as a read error sector or an error sector). The error data and the error sector can be generated, for example, due to a defect, a shift of the head 15, a shift of an adjacent track, or the like.
[0053] The error correction section 630 recovers (corrects, remedies, or corrects errors of) the error data or the error sector. The error correction section 630 performs read retry of the error data or the error sector by multiple times of reading. In addition, the error correction section 630 performs processing (hereinafter, also referred to as ECC processing or error correction processing) of correcting errors of data or a sector based on an error correction code (hereinafter, also referred to as a sector ECC). The error correction section 630 performs the ECC processing (hereinafter, also referred to as sector ECC processing) of the error sector based on the ECC (hereinafter, also referred to as a sector ECC) corresponding to the error sector of a predetermined track. The error correction section 630 performs the ECC processing (hereinafter, also referred to as track ECC processing) of the error sector based on the ECC (hereinafter, also referred to as a track ECC) corresponding to the error sector of a predetermined track. For example, the error correction section 630 performs the track ECC processing of the error sector of a predetermined track based on a parity data or a parity sector corresponding to the track. The error correction section 630 records information (hereinafter, also referred to as error sector information) associated with the error sector, for example, in a predetermined recording area, such as the disc 10, the volatile memory 70, or the nonvolatile memory 80.
[0054] The parity sector management section 640 performs Exclusive OR (XOR) to calculate a parity sector (or parity data), writes and manages the parity sector (or parity data). The parity sector (or parity data) includes, for example, a parity bit and a parity check code.
[0055] The parity sector management section 640 calculates a parity sector by performing XOR operation on data of a predetermined area, and writes the calculated parity sector to a predetermined area of the disc 10. The parity sector management section 640 calculates a parity sector by performing XOR operation on all sectors of a predetermined track, and writes the calculated parity sector to the track. In addition, the parity sector management section 640 can calculate a parity sector by performing XOR operation on a part of sectors of a predetermined track, and writes the calculated parity sector to the track. For example, a parity sector can be calculated by performing XOR operation on a part of sectors of a predetermined track, and a parity sector of the track can be calculated by performing XOR operation on the parity sector and sectors to be written to an area of the track other than the part of sectors, and writing the parity sector of the track to the track. For example, the parity sector management section 640 can calculate a parity sector by performing XOR operation on all sectors (hereinafter, also referred to as valid sectors) other than invalid sectors (hereinafter, also referred to as invalid sectors) of a predetermined track, and writes the calculated parity sector to the track. The invalid sectors correspond to sectors not used in recording of data and the like. The valid sectors correspond to sectors used in recording of data and the like.
[0056] The parity sector management section 640 manages whether each parity sector corresponding to each track is a valid parity sector (hereinafter, also referred to as valid parity sector) that can be used in error correction or an invalid parity sector (hereinafter, also referred to as invalid parity sector) that cannot be used in error correction.
[0057] The parity sector management section 640 manages a parity sector after XOR operation on all sectors of a predetermined track as a valid parity sector. The parity sector management section 640 records or registers the parity sector of the track as a valid parity sector in a predetermined recording area, for example, the disc 10, the volatile memory 70, or the nonvolatile memory 80. For example, the parity sector management section 640 manages a parity sector obtained by performing XOR operation on all valid sectors of a predetermined track as a valid parity sector. The parity sector management section 640 manages the parity sector of the track as a valid parity sector.
[0058] The parity sector management section 640 manages a parity sector of a track after a part of sectors has been written (overwritten or re-written) as an invalid parity sector in a case where the parity sector is a parity sector before the part of sectors was written. The parity sector management section 640 records or registers the parity sector of the track as an invalid parity sector in a predetermined recording area, for example, the disc 10, the volatile memory 70, or the non-volatile memory 80. For example, the invalid parity sector corresponds to a result of performing XOR operation on all sectors of the track before the part of sectors of the track after the part of sectors has been written (overwritten or re-written) was written (overwritten or re-written). For example, the parity sector management section 640 manages a parity sector of a track after a part of valid sectors has been written (overwritten or re-written) as an invalid parity sector in a case where the parity sector is a parity sector before the part of valid sectors was written.
[0059] The parity sector management section 640 calculates (or generates) a parity sector by performing XOR operation on all sectors including the re-written part of sectors in a track including an invalid parity sector, for example, at an idle time when there is a margin in the processing capacity of the disc device 1, and writes (corrects, overwrites, or re-writes) the calculated parity sector (valid parity sector) to the parity sector of the track. The parity sector management section 640 records or registers the calculated parity sector as a valid parity sector in a predetermined recording area, for example, the disc 10, the volatile memory 70, or the non-volatile memory 80.
[0060] For example, the parity sector management section 640 writes all sectors (1 track) of a predetermined track to a predetermined position, calculates (or generates) a parity sector by performing XOR operation on all sectors (for example, valid sectors) of the 1 track in a case where the write command for writing all sectors (1 track) of the track to the disc 10 is accepted from the host 100 or the like, and writes the calculated parity sector to the parity sector of the track. The parity sector management section 640 records or registers the parity sector of the track as a valid parity sector in a predetermined recording area, for example, the disc 10, the volatile memory 70, or the non-volatile memory 80, as a table. Hereinafter, the "track including a valid parity sector" is also sometimes referred to as a "valid parity track".
[0061] For example, the parity sector management section 640, in a case where a write command to write a part of sectors of a predetermined track to the disc 10 is accepted from the host 100 or the like, first reads the predetermined track, performs an XOR operation on all sectors except the sectors in the area to be written by the write command and the parity sector, thereby calculating the parity sector for all sectors except the sectors to be written with respect to the predetermined track. Next, the sectors to be written by the write command and the parity sector of the track, which is the result of the XOR operation on the written sectors, are written to the track. The parity sector management section 640 records or registers the parity sector of the track as a valid parity sector in a predetermined recording area, for example, the disc 10, the volatile memory 70, or the nonvolatile memory 80, as a table. Hereinafter, the case where "a parity sector is generated from all sectors except a part of sectors of a predetermined track, an XOR operation is performed on the sectors written to the part of the area and the parity sector other than the sectors, thereby updating the parity sector of the track" is sometimes referred to as "read-modify-write".
[0062] For example, the parity sector management section 640, in a case where a write command to write a part of sectors of a predetermined track to the disc 10 is accepted from the host 100 or the like, writes (overwrites or rewrites) the part of sectors of the track, does not perform an XOR operation on the track, and does not calculate the parity sector. The parity sector management section 640 records or registers the parity sector of the track as an invalid parity sector in a predetermined recording area, for example, the disc 10, the volatile memory 70, or the nonvolatile memory 80, as a table. Hereinafter, the track including the invalid parity sector is sometimes referred to as an "invalid parity track". The parity sector management section 640 reads the invalid parity track at Idle, generates a valid parity sector by performing an XOR operation on all sectors of the invalid parity track, and writes (corrects, overwrites, or rewrites) the valid parity sector to the invalid parity sector, thereby changing from the invalid parity track to the valid parity track.
[0063] The monitoring target sector management section 650 manages defective sectors, i.e., error sectors (hereinafter, also referred to as monitoring target sectors) that have generated errors, for example, due to a flaw generated on the disc 10. The monitoring target sector management section 650 detects a monitoring target sector at the time of reading a predetermined track. In a case where a monitoring target sector is detected, the monitoring target sector management section 650 records information (hereinafter, also referred to as monitoring target sector information) of the position of the disc 10 and the sector number of the monitoring target sector and the like and information (hereinafter, also referred to as defect information) of a bit string or the like indicating the position of a defect, e.g., a flaw, and the length of the flaw, corresponding to the monitoring target sector, in a predetermined recording area, e.g., the disc 10, the volatile memory 70, or the non-volatile memory 80.
[0064] The monitoring target sector management section 650, for example, performs error correction in a case where an error sector is again detected at the error sector at the time of re-reading the track after detecting the error sector at a predetermined track. For example, an error sector in which a read error is again detected at the time of re-reading by performing sector ECC and rewriting is set, recorded, or registered as a table or the like as a monitoring target sector. The monitoring target sector management section 650, for example, sets, records, or registers a sector number corresponding to the monitoring target sector and defect information corresponding to the monitoring target sector as a table in a predetermined recording area, e.g., the disc 10, the volatile memory 70, or the non-volatile memory 80. The monitoring target sector management section 650, for example, sets, records, or registers Erasure information indicating that the quality of data of the monitoring target sector is low or the possibility of generating an error is higher than other areas as a table in a predetermined recording area, e.g., the disc 10, the volatile memory 70, or the non-volatile memory 80. The Erasure information corresponds to information indicating the position and length of a defect, e.g., a flaw, or the like. For example, by setting the Erasure information for the monitoring target sector, quality improvement of the entire track (used in the judgment of whether or not to perform reallocation) can be more accurately performed in the R / W channel 40, so that effective correction can be performed.
[0065] Figure 5 is a schematic view indicating an example of the monitoring target sector and the parity sector of the present embodiment. Figure 5 Tracks TRak and TRak+1 are shown. In the example shown in FIG. 8, the monitoring target sector is set in the track TRak. The parity sector is set in the track TRak+1. Figure 5In the example shown, the MPU 60 writes all the sectors SC01 to SC0n of the track TRak in the recoding order in the traveling direction, in a case where a command to write the track TRak is accepted from the host 100 or the like. The MPU 60 XORs the sectors SC01 to SC0n and writes the result of the XOR of the sectors SC01 to SC0n to the parity sector (valid parity sector) P0. The MPU 60 can perform track ECC on the track TRak based on the parity sector P0, for example.
[0066] In Figure 6 In the example shown, the MPU 60 writes all the sectors SC01 to SC0n of the track TRak in the recoding order in the traveling direction, in a case where a command to write the track TRak is accepted from the host 100 or the like. The MPU 60 XORs the sectors SC01 to SC0n and writes the result of the XOR of the sectors SC01 to SC0n to the parity sector (valid parity sector) P0. The MPU 60 can perform track ECC on the track TRak based on the parity sector P0, for example.
[0067] In the example shown, the MPU 60 writes all the sectors SC01 to SC0n of the track TRak in the recoding order in the traveling direction, in a case where a command to write the track TRak is accepted from the host 100 or the like. The MPU 60 XORs the sectors SC01 to SC0n and writes the result of the XOR of the sectors SC01 to SC0n to the parity sector (valid parity sector) P0. The MPU 60 can perform track ECC on the track TRak based on the parity sector P0, for example.
[0068] Figure 7 is a flowchart showing an example of a method of updating a parity sector.
[0069] The MPU 60 determines whether the parity sector of the predetermined track is an invalid parity sector or a valid parity sector (B601). In other words, the MPU 60 determines whether the parity sector of the predetermined track is a valid parity sector or an invalid parity sector. In a case where the parity sector of the predetermined track is determined to be a valid parity sector (NO of B601), the MPU 60 ends the processing. In a case where the parity sector of the predetermined track is determined to be an invalid parity sector (YES of B601), the MPU 60 reads all sectors of the predetermined track (1 track) from the disc 10 (B602), and performs an XOR operation on all sectors of the track (B603). The MPU 60 writes (overwrites or rewrites) the result of the XOR operation on all sectors of the predetermined track to the parity sector of the track (B604), sets or registers the invalid parity sector of the predetermined track as a valid parity sector (B605), and ends the processing.
[0070] Figure 9 is a flowchart showing an example of a method of setting a monitoring target sector in a track including an invalid parity sector according to the present embodiment.
[0071] The MPU 60 detects an error sector in a predetermined track (B701), and determines whether the parity sector corresponding to the track is a valid parity sector or an invalid parity sector (B702). In other words, the MPU 60 determines whether the parity sector corresponding to the predetermined track is a valid parity sector or an invalid parity sector. In a case where the parity sector corresponding to the predetermined track is determined to be a valid parity sector (YES of B702), the MPU 60 proceeds to the flowchart of FIG. 7 (B703) described later. In a case where the parity sector corresponding to the predetermined track is determined to be an invalid parity sector (NO of B702), the MPU 60 reads all sectors of the predetermined track (1 track) of the disc 10 again (B704), and determines whether a read error is detected again in the error sector of the track (B705). Figure 8
[0072] In a case where it is determined that a read error is not detected again in the error sector of the predetermined track (NO of B705), the MPU 60 writes (overwrites or rewrites) the result of the XOR operation on all sectors of the track as the parity sector (B706). The MPU 60 sets or registers the parity sector corresponding to the predetermined track as a valid parity sector (B707), and ends the processing.
[0073] In a case where it is determined that a read error is detected again in the error sector of the predetermined track (Yes in B705), the MPU 60 continues retry until correct reading is possible, overwrites the error sector with the correct data obtained, and writes the result of the XOR operation of all sectors including the error sector of the track to which the error sector corresponds as the parity sector of the track (overwriting or rewriting) (B708). The MPU 60 sets or registers the parity sector corresponding to the predetermined track as a valid parity sector (B709), reads the error sector of the track again, and acquires defect information in the disc 10 (B710).
[0074] The MPU 60 determines whether a read error is detected again in the error sector of the predetermined track (B711). In a case where it is determined that a read error is not detected again in the error sector of the predetermined track (No in B711), the process ends.
[0075] In a case where it is determined that a read error is detected again in the error sector of the predetermined track (Yes in B711), the MPU 60 determines whether the quality (error amount) of the track exceeds a threshold or is equal to or less than the threshold (B712). In a case where it is determined that the quality (error amount) of the track is equal to or less than the threshold (No in B712), the MPU 60 sets the error sector as a monitoring object sector and registers it (B715). In a case where it is determined that the quality (error amount) of the track exceeds the threshold (Yes in B712), the MPU 60 performs re-assignment (B713), registers the error sector from which the re-assignment sector is removed as a monitoring object sector (B714), and ends the process.
[0076] Figure 7 is a flowchart showing an example of a method of setting a monitoring object sector in a track including a valid parity sector according to the present embodiment.
[0077] In a case where the process of B703 is entered in the flowchart shown in Figure 9 In a case where the process of B703 is entered in the flowchart shown in
[0078] The MPU 60 determines whether a read error is detected again in the error sector of the predetermined track (B805). In a case where it is determined that a read error is not detected again in the error sector of the track (NO in B805), the MPU 60 ends the processing. In a case where it is determined that a read error is detected again in the error sector of the predetermined track (YES in B805), the MPU 60 determines whether the quality (error amount) of the track exceeds the threshold or is equal to or lower than the threshold (B712). In a case where it is determined that the quality (error amount) of the track is equal to or lower than the threshold (NO in B712), the MPU 60 proceeds to the processing of B715. In a case where it is determined that the quality (error amount) of the track exceeds the threshold (YES in B712), the MPU 60 performs reallocation (B713), registers the error sector other than the reallocated sector as a monitoring target sector (B714), and ends the processing.
[0079] Figure 10 is a flowchart showing an example of the write processing method of the present embodiment.
[0080] The MPU 60 receives a write command from the host 100 or the like (B901). The MPU 60 determines whether to write all sectors of the predetermined track (1 track) of the disc 10 (B902). In other words, the MPU 60 determines whether to write all sectors of the predetermined track (1 track) of the disc 10 or to write (overwrite or rewrite) a part of the predetermined track, for example, a part of the sectors of the predetermined track. In a case where it is determined to write all sectors of the predetermined track (1 track) of the disc 10 (YES in B902), the MPU 60 writes all sectors of the predetermined track, and writes (overwrites or rewrites) the result of the XOR operation performed on all sectors of the track as the parity sector of the track (B903). The MPU 60 sets or registers the parity sector corresponding to the predetermined track as a valid parity sector (B904), and ends the processing.
[0081] In a case where it is determined to write a part of the sectors of the predetermined track of the disc 10 (NO in B902), the MPU 60 determines whether the predetermined track includes a monitoring target sector (B905). In a case where it is determined that the predetermined track does not include a monitoring target sector (NO in B905), the MPU 60 writes a part of the sectors of the predetermined track (B906). The MPU 60 sets or registers the parity sector corresponding to the predetermined track as an invalid parity sector (B907), and ends the processing.
[0082] In a case where it is determined that the predetermined track contains the monitoring target sector (B905: YES), the MPU 60 reads all sectors (1 track) of the track containing the monitoring target sector in the disc 10 (B908), and performs an XOR operation on all sectors of the predetermined track except for the written part sectors and the parity sector (B909). The MPU 60 writes all sectors of the predetermined track containing the written part sectors, and writes the result of the XOR operation on the written part sectors and the XOR operation result generated in B909 as the parity sector of the track (overwriting or rewriting) (B910). The MPU 60 sets or registers the parity sector corresponding to the predetermined track as the valid parity sector (B911), and ends the process. The processes of B908 to B912 correspond to, for example, read-modify-write.
[0083] According to the embodiment, in the disc device 1, the parity sector of the track containing the defect such as a flaw is the valid parity sector. The disc device 1 can correct the erroneous sector caused by the defect such as a flaw. Therefore, the disc device 1 can not secure an area for performing reassignment in the disc 10. The disc device 1 performs read-modify-write only on the track containing the defect such as a flaw. Therefore, the disc device 1 can improve the performance.
[0084] Next, the disc device of other embodiments and other modified examples of the foregoing embodiment will be described. In the other embodiments and other modified examples, the same reference numerals are assigned to the same parts as those of the foregoing embodiment, and detailed description thereof will be omitted.
[0085] (Modified Example 1)
[0086] The disc device 1 of Modified Example 1 is different from the disc device 1 of the foregoing embodiment in that the reassignment process is performed.
[0087] Figure 11 is a block diagram showing the configuration of the disc device 1 of Modified Example 1.
[0088] The MPU 60 also has a reassignment (Re-Assign) control section 660. The MPU 60 executes the process of the reassignment control section 660 and the like on firmware. In addition, the MPU 60 can also have a circuit of the reassignment control section 660. The reassignment control section 660 can also be included in the R / W channel 40 or the HDC 50.
[0089] The Re-Assign control section 660 re-assigns (or re-assignment processing) a predetermined area, for example, a sector or data. The re-assignment or re-assignment processing includes a processing of writing data written to a predetermined area to another area other than the predetermined area, that is, a processing of replacing a predetermined sector with another sector different from the predetermined sector, a processing of reconfiguring, or a processing of copying. The Re-Assign control section 660 re-assigns an error sector. For example, the Re-Assign control section 660 re-assigns at least one error sector, for example, a monitoring object sector, in a predetermined area of the disc 10, for example, the media cache 10b or the system area 10c, in a case where the number of error sectors or the length of defects, for example, flaws, in a predetermined track exceeds a threshold value based on the monitoring object sector information and the defect information. Here, the threshold value corresponds to the number of sectors that can be corrected or recovered by the track ECC. For example, the Re-Assign control section 660 records or registers an error sector, for example, a monitoring object sector, subjected to re-assignment as an invalid sector in a predetermined recording area, for example, the disc 10, the volatile memory 70, or the non-volatile memory 80.
[0090] Figure 11 is a schematic view showing an example of a re-assignment processing method of the modification example 1. In Figure 11 , the tracks TRbck, TRak, TRak+1, TRak+2, and TRak+3 are shown. In Figure 5 , the tracks TRak, TRak+1, TRak+2, and TRak+3 are continuously arranged in the inner direction in the order of recording in the user data area 10a. The tracks TRak and TRak+1 correspond to Figure 11The track TRak+2 has sectors SC21, SC22, SC23,..., SC2(n-1), and SC2n and a parity sector P2. The sectors SC21 to SC2(n-1) are continuously arranged in the traveling direction in the order described. The parity sector P2 is adjacent to the sector SC2(n-1) in the traveling direction. The parity sector P2 corresponds to a result of an XOR operation on the sectors SC21 to SC2n. The track TRak+3 has sectors SC31, SC32, SC33,..., SC3(n-1), and SC3n and a parity sector P3. The sectors SC31 to SC3(n-1) are continuously arranged in the traveling direction in the order described. The parity sector P3 is adjacent to the sector SC3(n-1) in the traveling direction. The parity sector P3 corresponds to a result of an XOR operation on the sectors SC31 to SC3n. The track TRbck is arranged in the medium cache 10b and / or the system area 10c. The track TRbck corresponds to a recording area to which a sector (or data) subjected to reallocation is written. The track TRbck has a sector SC13, a sector SC32, and a plurality of spare sectors. In the track TRbck, the sector SC32 is adjacent to the sector SC13 in the traveling direction. The sector SC13 of the track TRbck corresponds to the sector SC13 of the track TRak+1. The sector SC32 of the track TRbck corresponds to the sector SC32 of the track TRak+3.
[0091] In Figure 11 In the example shown, the MPU 60 reads the track TRak+1, detects a plurality of monitoring target sectors. The MPU 60 reallocates the monitoring target sector SC13 in the track TRbck in a case where the number of monitoring target sectors is greater than a threshold value by one, and sets the monitoring target sector SC13 of the track TRak+1 as an invalid sector. The MPU 60 reads all sectors (SC11, SC12,..., SC1(n-1), SC1n) except the sector SC13 of the track TRak+1, and writes a result of an XOR operation on all sectors except the sector SC13 in the parity sector P1. Further, the MPU 60 does not perform reallocation even in a case where a plurality of monitoring target sectors are detected, if each Erasure information (length of error) is small. Alternatively, the MPU 60 can perform reallocation even if the number of monitoring target sectors is one, if the Erasure information is large.
[0092] In Figure 12In the illustrated example, the MPU 60 reads the track TRak+3, detects a plurality of monitor object sectors. The MPU 60 reassigns the monitor object sector SC32 to the track TRbck in a case where the number of monitor object sectors is greater than the threshold value by one, and sets the monitor object sector SC32 of the track TRak+3 to an invalid sector. The MPU 60 reads all sectors (SC31, SC33,..., SC3(n-1), SC3n) other than the sector SC32 of the track TRak+3, and writes the result of the XOR operation on all sectors other than the sector SC32 to the parity sector P3.
[0093] Figure 13 is a flowchart showing an example of the reassignment method of Modification 1.
[0094] The MPU 60 detects an error sector in a predetermined track (B1201), and determines whether the parity sector corresponding to the track is a valid parity sector (B1202). In other words, the MPU 60 determines whether the parity sector corresponding to the predetermined track is a valid parity sector or an invalid parity sector. In a case where the parity sector corresponding to the predetermined track is determined to be a valid parity sector (B1202: Yes), the MPU 60 reads all sectors (1 track) of the predetermined track of the disc 10 again (B1203), and proceeds to the processing of B1206. In a case where the parity sector corresponding to the predetermined track is determined to be an invalid parity sector (B1202: No), the MPU 60 reads all sectors (1 track) of the predetermined track of the disc 10 again (B1204). The MPU 60 writes all sectors of the predetermined track of the disc 10, and writes the result of the XOR operation on all sectors of the track as a parity sector (overwriting or rewriting) (B1205).
[0095] The MPU 60 determines whether a read error is detected again in the error sector of the predetermined track (B1206). In a case where it is determined that a read error is not detected again in the error sector of the predetermined track (B1206: No), the MPU 60 ends the processing. In a case where it is determined that a read error is detected again in the error sector of the predetermined track (B1206: Yes), the MPU 60 continues retrying until correct reading is possible, writes the error sector in which the read error is detected again with correct data in the predetermined track (B1207), and reads the written error sector again in the track (B1208).
[0096] The MPU 60 determines whether a read error is detected again in the error sector of the predetermined track (B1209). In a case where it is determined that a read error is not detected again in the error sector of the predetermined track (NO in B1209), the MPU 60 ends the processing. In a case where it is determined that a read error is detected again in the error sector of the predetermined track (YES in B1209), the MPU 60 sets or registers the error sector as a monitoring object sector, and determines whether the number or length of error sectors in the track exceeds a threshold value or is equal to or less than the threshold value (B1210). In a case where it is determined that the number or length of error sectors in the predetermined track is equal to or less than the threshold value (NO in B1210), the MPU 60 sets or registers the detected error sector as a monitoring object sector (B1215), and ends the processing.
[0097] In a case where it is determined that the number or length of error sectors in the predetermined track exceeds the threshold value (YES in B1210), the MPU 60 sets or registers the error sectors other than the reallocation object sector, which exceeds the threshold value, as monitoring object sectors (B1211). The MPU 60 performs reading on all sectors in the predetermined track except for the at least one error sector which is reallocated so as to be equal to or less than the threshold value, and writes the result of the XOR operation on all sectors except for the at least one error sector which is reallocated as a parity sector (overwrites or rewrites) (B1212). The MPU 60 sets or registers the parity sector which is written in the predetermined track as a valid parity sector (B1213), performs seeking on other tracks different from the predetermined track, reallocates the at least one error sector to the other tracks, sets the at least one error sector which is reallocated in the track before the reallocation as an invalid sector (B1214), and ends the processing.
[0098] According to Modification 1, in a case where the disk device 1 determines that the number or length of error sectors in the predetermined track exceeds the threshold value, the disk device 1 reallocates the selected at least one error sector to the medium cache 10b or the system area 10c so as to be equal to or less than the threshold value. The disk device 1 can reduce the possibility of occurrence of an error such as a read error even in a case where a number of error sectors which cannot be corrected or recovered by track ECC is generated. Thus, the disk device 1 can improve reliability.
[0099] (Modification 2)
[0100] The disk device 1 of Modification 2 performs timing of read change writing differently from the disk device 1 of the foregoing embodiment and Modification 1.
[0101] MPU 60 determines whether there is a free capacity in the media cache 10b in a case where a write command to write data to a track including a monitoring object sector is received. In a case where it is determined that there is a free capacity in the media cache 10b, the MPU 60 temporarily stores the write command (or write data) in the media cache 10b of the disc 10. The MPU 60 performs read-modify-write when there is a margin in processing capacity, for example, at Idle.
[0102] Figure 14 is a flowchart showing an example of the write processing method of Modification Example 2.
[0103] The MPU 60 receives a write command from the host 100 or the like (B901). The MPU 60 determines whether to write to all sectors (1 track) of a predetermined track of the disc 10 or not to write to all sectors (1 track) of the predetermined track of the disc 10 (B902). In a case where it is determined to write to a part of the sectors of the predetermined track of the disc 10 (No of B902), the MPU 60 determines whether the track includes a monitoring object sector (B905).
[0104] In a case where it is determined that the predetermined track includes a monitoring object sector (Yes of B905), the MPU 60 determines whether there is a free capacity in the media cache 10b (B1301). In a case where it is determined that there is no free capacity in the media cache 10b (No of B1301), the MPU 60 proceeds to the flowchart of Figure 14 (B1304) described later.
[0105] In a case where it is determined that there is a free capacity in the media cache 10b (Yes of B1301), the MPU 60 temporarily stores the write command (or write data) in the media cache 10b (B1302). The MPU 60 determines whether there is a margin in processing capacity (B1303). In other words, the MPU 60 determines whether it is Idle. In a case where it is determined that it is not Idle (No of B1303), the MPU 60 proceeds to the processing of B908. In a case where it is determined that it is Idle (Yes of B1303), the MPU 60 proceeds to the flowchart of Figure 14 (B1304) described later.
[0106] Figure 13 is a flowchart showing an example of the read-modify-write processing of Modification Example 2.
[0107] In Figure 15In the case where the process of the flowchart shown enters B1304, the MPU 60 reads all sectors (1 track) of the track including the monitoring target sector from the disc 10 (B908), and performs an XOR operation on all sectors of the track except for the sectors to be written and the parity sector (B909). The MPU 60 sets or registers the Erasure information at the predetermined track (B910). The MPU 60 writes all sectors of the predetermined track including the sectors to be written, and writes the result of the XOR operation on the sectors to be written and the result of the XOR operation on the sectors to be written as the parity sector of the track (overwriting or rewriting) (B911). The MPU 60 sets or registers the parity sector corresponding to the predetermined track as the valid parity sector (B912), and ends the process.
[0108] According to Modification 2, in the case where the disc device 1 receives a write command to write data to the track including the monitoring target sector, the disc device 1 determines whether there is a free capacity in the media cache 10b. In the case where it is determined that there is a free capacity in the media cache 10b, the disc device 1 temporarily stores the write command (or the write data) in the media cache 10b of the disc 10. The disc device 1 performs the read-modify-write when the processing capacity is sufficient, for example, at Idle. Thus, the disc device 1 temporarily stores the write command (or the write data) in the media cache 10b only when writing data to the track including the monitoring target sector, and thus it is possible to suppress the decrease in processing performance.
[0109] (Modification 3)
[0110] The read processing method of the disc device 1 of Modification 3 is different from the disc device 1 of the aforementioned embodiment, Modification 1, and Modification 2.
[0111] In the case where the MPU 60 receives a read command to read the region including the monitoring target sector, the MPU 60 reads the region including the monitoring target sector specified by the read command based on the Erasure information, reads the track including the monitoring target sector based on the Erasure information, and effectively corrects the monitoring target sector.
[0112] Figure 16 FIG. 15 is a flowchart showing an example of the read processing method of Modification 3.
[0113] The MPU 60 receives a read command from the host 100 or the like (B1501). The MPU 60 determines whether the region specified by the read command includes the monitoring target sector (B1502). In the case where it is determined that the region specified by the read command does not include the monitoring target sector (NO of B1502), the MPU 60 reads the region specified by the read command (B1503), and ends the process.
[0114] In a case where it is determined that the area specified by the read command contains the monitoring object sector (B1502: Yes), the MPU 60 reads the area containing the monitoring object sector specified by the read command using the Erasure information and the parity sector (B1504), and ends the processing.
[0115] According to Modification 3, in a case where the disk device 1 receives a read command to read an area containing a monitoring object sector, the disk device 1 reads the area containing the monitoring object sector specified by the read command based on the Erasure information, reads the track containing the monitoring object sector based on the Erasure information, and can improve the correction efficiency by explicitly indicating the area where the error probability is high. Thus, the occurrence of a case where the disk device 1 performs error correction based on the data written to the area where a defect such as a flaw has occurred can be suppressed.
[0116] (Modification 4)
[0117] In the disk device 1 of Modification 4, the method of setting the monitoring object sector is different from those of the aforementioned embodiments, Modification 1, Modification 2, and Modification 3.
[0118] The MPU 60 performs the update of the parity sector and the setting or registration of the monitoring object sector at Idle.
[0119] is a flowchart showing an example of the method of setting the monitoring object sector of Modification 4.
[0120] The MPU 60 determines whether it is at Idle or not (B1601). In a case where it is determined that it is not at Idle (B1601: No), the MPU 60 ends the processing. In a case where it is determined that it is at Idle (B1601: Yes), the MPU 60 proceeds to the processing of B701.
[0121] According to Modification 4, the disk device 1 performs the update of the parity sector and the setting or registration of the monitoring object sector at Idle. Thus, the disk device 1 can reduce the possibility that a defect such as a flaw occurs in the disk 10 before the parity sector of a predetermined track is updated and the monitoring object sector becomes unreadable.
[0122] The embodiments have been described, but these embodiments are given as examples for the purpose of suggestion and are not intended to limit the scope of the application. The new embodiments can be implemented in various other ways, and various omissions, substitutions, and changes can be made within the scope of the gist of the application. The embodiments and modifications thereof are included in the scope and gist of the application and are included in the scope of the application and equivalents thereof recited in the scope of claims.
[0123] The following describes an example of a magnetic disk device and an error correction method configured according to the present disclosure. (1)
[0125] A magnetic disk device includes:
[0126] a disk including: a first track having a plurality of first error sectors including a defect and a first parity sector; a second track having a second parity sector; and a media cache;
[0127] a head that writes data to and reads data from the disk;
[0128] a defect management section that manages defects; and
[0129] a controller that, in a case where the first error sector is managed by the defect management section, in a case where a write command to write write data to a first region of a portion of the first track is accepted, after performing an XOR operation on all sectors except for sectors of the first region of the first track and the first parity sector, writes the write data to the first region, and writes a result of an XOR operation on the write data and a result of the XOR operation after that to the first parity sector. (2)
[0131] The magnetic disk device according to claim 1,
[0132] the controller sets the first parity sector as a valid parity sector that can be used in error correction of the first track. (3)
[0134] The magnetic disk device of (1) or (2), the controller sets the first parity sector as a valid parity sector that can be used in error correction of the first track. (4)
[0136] The magnetic disk device of (3), the controller sets the second parity sector as an invalid parity sector that cannot be used in error correction of the second track. (5)
[0138] The magnetic disk device of any one of (1) to (4), the controller, in a case where the number of the plurality of error sectors is greater than a threshold value or the defect is greater than a first length, reallocates at least one error sector within the plurality of error sectors in the media cache, and in a case where the number of the plurality of error sectors is greater than the threshold value and the defect is smaller than the first length, does not perform reallocation. (6)
[0140] The disk device of any one of (1) to (4), wherein the controller temporarily stores the write data in the media cache in a case where the write data is written to the first area. (7)
[0142] The disk device of (6), wherein the controller temporarily stores the write data in the media cache in a case where the write data is written to the first area. (8)
[0144] The disk device of (1), wherein the controller acquires a plurality of position information of the plurality of first error sectors respectively. (9)
[0146] The disk device of (8), wherein the controller acquires the plurality of position information at an idle time. (10)
[0148] The disk device of any one of (1) to (9), wherein the controller registers the plurality of first error sectors as sectors in which errors are generated due to defects in a case where the plurality of first error sectors detect read errors again after detecting read errors. (11)
[0150] A write / read processing method suitable for a disk device, comprising: a disk including a first track having a plurality of first error sectors having defects and a first parity sector, a second track having a second parity sector, and a media cache, and a head that writes data to the disk and reads data from the disk,
[0151] in a case where a write command to write write data to a first area of a part of the first track is accepted, the write data is written to the first area, and a result of an XOR operation on all sectors of the first track is written to the first parity sector.
Claims
1. A disk device, comprising: a disk including a plurality of error sectors including defects, a first track having a first parity sector, a second track having a second parity sector, and a media cache; a head that writes data to and reads data from the disk; a monitoring sector management section that detects an error sector that has generated an error due to a defect and records information of the error sector in a volatile memory or a nonvolatile memory; and a controller that, in a case where a write command to write first data to a first area of a portion of the first track is accepted, first determines whether the first track includes any of the error sectors recorded by the monitoring sector management section, in a case where it is determined that the first track includes the error sector, performs a first XOR operation on all sectors of the first track except one or more sectors of the first area and the first parity sector of the first track, then writes the first data to the one or more sectors of the first area, performs a second XOR operation on the one or more sectors of the first area and a result of the first XOR operation, and writes a result of the second XOR operation to the first parity sector.
2. The disk device according to claim 1, wherein the controller sets the first parity sector as a valid parity sector that can be used in error correction of the first track.
3. The disk device according to claim 2, wherein the controller, in a case where a write command to write second data to a second area of a portion of the second track is accepted, first determines whether the second track includes any of the error sectors recorded by the monitoring sector management section, in a case where it is determined that the second track does not include the error sector, writes the second data to one or more sectors of the second area.
4. The disk device according to claim 3, wherein the controller sets the second parity sector as an invalid parity sector that cannot be used in error correction of the second track.
5. The disk device according to claim 1, wherein the controller, in a case where a number of the error sectors is greater than a threshold value, reallocates at least one error sector within the plurality of error sectors in the media cache.
6. The disk device according to claim 1, wherein the controller temporarily stores the first data in the media cache before writing the first data to the first area.
7. The disk device according to claim 6, wherein the controller writes the first data from the media cache to the first area when it is free.
8. The disk device according to claim 1, wherein the controller acquires information of a position and a length of an error of each of the plurality of error sectors.
9. The disk device according to claim 8, wherein the controller acquires the information of the position and the length of the error when it is free.
10. The disk device according to claim 1, wherein The controller writes to all other sectors of the first track when writing the first data to the one or more sectors of the first zone.
Citation Information
Patent Citations
Exposure control apparatus
JP2021044666A
Magnetic disk device and write processing method
US10910013B1
Magnetic disk device and write processing method
US20190378543A1