Magnetic disk device
By detecting and replacing the number of writes and block status of the magnetic head in the magnetic disk device, the problem of shortened magnetic head life is solved, the service life of the magnetic head is extended, and the performance of the magnetic disk device is improved.
Patent Information
- Application Number
- CN202310723900.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-03-15
- Filing Date
- 2023-06-19
- Publication Date
- 2024-09-20
AI Technical Summary
In a magnetic disk device, an increase in the number of writes to a magnetic head leads to a shortened lifespan, and it is difficult to effectively suppress the reduction in the lifespan of the magnetic head with the existing technology.
By setting up a counter and an unwritten detection unit in the disk device, the number of writes and block status of each magnetic head is detected, and the logical block address is judged and exchanged based on the set threshold to ensure that the magnetic head that writes data has a lower write performance. write times to avoid frequent use of heads with too high write times.
It extends the service life of the magnetic head, reduces the deterioration of the magnetic head caused by excessive writing times, and improves the overall performance and reliability of the disk device.
Smart Images

Figure CN118675557A
Abstract
Description
[0001] This application claims priority based on Japanese Patent Application No. 2023-041176 (filing date: March 15, 2023). The present application incorporates the entire contents of the basic application by reference. Technical Field
[0002] An embodiment of the present invention relates to a magnetic disk device. Background Art
[0003] The magnetic disk device has a plurality of magnetic disks and a plurality of magnetic heads for writing data to the magnetic disks. It is known that in order to achieve high recording density, energy-assisted recording types such as high-frequency assisted magnetic recording (MAMR) and heat-assisted magnetic recording (HAMR) can be used for magnetic disk devices, but the writing performance of the magnetic head will decrease according to the number of writes.
[0004] In general wear leveling, data concentration is suppressed by monitoring the writing status in the recording area of the disk and writing data to the vacant area first. However, in such an algorithm, there is a situation where the number of writes to a specific head increases and the life is shortened. Summary of the invention
[0005] This embodiment provides a magnetic disk device capable of suppressing reduction in the life of a magnetic head.
[0006] The magnetic disk device involved in the embodiment comprises: at least one magnetic disk, having a first recording surface and a second recording surface, wherein the first recording surface and the second recording surface respectively include a plurality of blocks assigned with logical block addresses; a first magnetic head, writing data to the first recording surface; a second magnetic head, writing data to the second recording surface; and a controller, having a counter, a non-write detection unit and a memory, wherein the counter detects the number of writes of the first magnetic head and the second magnetic head respectively, the non-write detection unit detects non-written blocks from the plurality of blocks, the memory stores a first threshold value for the number of writes of the first magnetic head and the second magnetic head respectively and a second threshold value below the first threshold value, and the controller performs control so that, when receiving an instruction to write data to the first block of the first recording surface among the plurality of blocks, the controller determines the write of the first magnetic head to write data to the first block. Whether the number of writes by the first head exceeds the first threshold, when the number of writes by the first head does not exceed the first threshold, the first head writes data to the first block, when the number of writes by the first head exceeds the first threshold, it is determined whether the number of writes by the second head exceeds the second threshold, when the number of writes by the second head exceeds the second threshold, the first head writes data to the first block, when the number of writes by the second head does not exceed the second threshold, it is determined whether there is an unwritten second block on the second recording surface, when the second block does not exist, the first head writes data to the first block, when the second block exists, the logical block address assigned to the first block is swapped with the logical block address assigned to the second block, and the second head writes data to the second block. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Figure 1 This is a block diagram showing the structure of a magnetic disk device according to one embodiment.
[0008] Figure 2 It is a perspective view showing a magnetic head and a magnetic disk in the magnetic disk device according to the above embodiment.
[0009] Figure 3 It is an enlarged cross-sectional view showing an example of the magnetic disk and the magnetic head according to the above-mentioned embodiment.
[0010] Figure 4 This is a diagram showing an example of control during writing of the magnetic disk device according to the above-mentioned embodiment.
[0011] Figure 5 It is the successor Figure 4 The following is a diagram for explaining an example of control during writing of the magnetic disk device according to the above-mentioned embodiment.
[0012] Figure 6 This is a diagram showing an example of control during writing of the magnetic disk device according to the above-mentioned embodiment.
[0013] Figure 7 It is the successor Figure 6 The following is a diagram showing an example of control during writing of the magnetic disk device according to the above-mentioned embodiment.
[0014] Figure 8 This is a flowchart showing an example of a procedure (sequence) of a write process of the magnetic disk device according to the above-mentioned embodiment.
[0015] Fig. 9 It is the successor Figure 8 The following is a flowchart showing an example of a procedure of a write process of the magnetic disk device according to the above-mentioned embodiment.
[0016] Fig.10 It is the successor Fig. 9 The following is a flowchart showing an example of a procedure of a write process of the magnetic disk device according to the above-mentioned embodiment.
[0017] Fig.11 It is the successor Fig. 9 The following is a flowchart showing an example of a procedure of a write process of the magnetic disk device according to the above-mentioned embodiment.
[0018] Fig.12 It is the successor Figure 8 The following is a flowchart showing an example of the procedure of the write processing according to the first modification.
[0019] Fig.13 It is the successor Figure 8 The following is a flowchart showing an example of the procedure of the write processing according to the second modification. DETAILED DESCRIPTION
[0020] Hereinafter, a magnetic disk device according to an embodiment will be described with reference to the drawings.
[0021] In addition, the disclosure is only an example after all, and those skilled in the art can easily think that the contents obtained by appropriate changes while maintaining the purpose of the invention are certainly included in the scope of the present invention. In addition, in order to make the drawings and descriptions clearer, there are cases where the width, thickness, shape, etc. of each part are schematically represented compared with the actual implementation form, but this is only an example and does not limit the interpretation of the present invention. In addition, in this specification and each figure, for the same elements as those described in the previous figure, the same reference numerals are sometimes marked and the detailed description is appropriately omitted.
[0022] Figure 1 It is a block diagram showing the structure of the magnetic disk device 10 according to one embodiment.
[0023] like Figure 1 As shown, the magnetic disk device 10 includes a rectangular housing 11 , a magnetic disk 12 as a recording medium disposed in the housing 11 , a spindle motor 14 that supports and rotates the magnetic disk 12 , and a magnetic head 16 .
[0024] In the disk 12, a user data area 12a that can be used by the user, a media cache area 12b that temporarily holds data (or instructions) transmitted from the host 45, etc. before writing them to a predetermined area of the user data area 12a, and a system area 12c that records information required for system management are allocated as areas where data can be written.
[0025] In addition, the medium cache area 12b does not necessarily need to be allocated, and the system area 12c may be allocated to the memory 47 described later.
[0026] The magnetic head 16 has a write head 16W for writing data to the magnetic disk 12 and a read head 16R for reading data from the magnetic disk 12 .
[0027] The magnetic disk device 10 includes a head actuator 18 for moving and positioning the magnetic head 16 to an arbitrary track on the magnetic disk 12. The head actuator 18 includes a carriage assembly 20 for movably supporting the magnetic head 16 and a voice coil motor (VCM) 22 for rotating the carriage assembly 20.
[0028] The carriage assembly 20 includes a bearing 24 rotatably supported by the housing 11 and a plurality of suspensions 26 extending from the bearing 24. The magnetic head 16 is supported at the front end of each suspension 26.
[0029] The magnetic disk device 10 includes a preamplifier IC 30 for driving the magnetic head 16, a main controller 40, and a driver IC 48. The preamplifier IC 30 includes a read amplifier, a write current control circuit 32, and an element energy control circuit 34, which are not shown. The read amplifier amplifies the read signal read from the magnetic disk 12 by the read head 16R and outputs it to the main controller 40 (more specifically, the R / W channel 42 described later). The write current control circuit 32 outputs a write current corresponding to the signal output from the R / W channel 42 to the write head 16W. The element energy control circuit 34 is electrically connected to the auxiliary element 200 described later, and applies a predetermined energy (e.g., current, voltage) to the auxiliary element 200.
[0030] The main controller 40 and the driver IC 48 are configured, for example, on a control circuit substrate (not shown) provided on the back side of the housing 11. The main controller 40 includes an R / W channel 42, a hard disk controller (HDC) 44, a microprocessor (MPU) 46, a memory 47, etc. The main controller 40 is electrically connected to the VCM 22 and the spindle motor 14 via the driver IC 48. The HDC 44 can be connected to a host 45.
[0031] The R / W channel 42 is a signal processing circuit for reading / writing data. The HDC 44 controls data transmission between the host 45 and the R / W channel 42 according to instructions from the MPU 46. The HDC 44 is electrically connected to the R / W channel 42, the MPU 46, the memory 47, etc. The memory 47 includes a volatile memory and a non-volatile memory. For example, the memory 47 includes a buffer memory formed of a DRAM and a flash memory, etc. The memory 47 stores programs and parameters required for the processing of the MPU 46.
[0032] The memory 47 stores a first threshold value and a second threshold value less than the first threshold value for the number of writes of each magnetic head 16. The second threshold value may be the same as the first threshold value. The first threshold value and the second threshold value are, for example, 10,000 times and 100,000 times.
[0033] The MPU 46 is a main control unit that controls various parts of the magnetic disk device 10. The MPU 46 performs servo control required for controlling read / write operations and positioning of the magnetic head 16. The MPU 46 includes a write control unit 46a that controls write processing, a read control unit 46b that controls read processing, a counter 46c that detects the number of writes of the magnetic head 16, a non-write detection unit 46d that detects whether data has been written to each block described later, and a pattern detection unit 46e that detects whether the data written to the block is composed of a periodically repeated pattern.
[0034] The periodically repeated pattern is, for example, a pattern consisting of only 0s, a pattern consisting of only 1s, a regular repeated pattern, etc. A regular repeated pattern is, for example, a pattern in which 0s and 1s are repeated alternately.
[0035] The write control unit 46a controls data writing processing according to a command from the host computer 45, etc. Specifically, the write control unit 46a controls the VCM 22 via the driver IC 48 to place the magnetic head 16 at a predetermined position on the magnetic disk 12 and write data.
[0036] The read control unit 46b controls the data read process according to the command from the host computer 45, etc. Specifically, the read control unit 46b controls the VCM 22 via the driver IC 48 to place the magnetic head 16 at a predetermined position on the magnetic disk 12 and read the data.
[0037] Figure 2 It is a perspective view showing the magnetic head 16 and the magnetic disk 12 of the magnetic disk device 10 according to the above embodiment.
[0038] like Figure 2 As shown, the magnetic disk device 10 has a plurality of magnetic heads 16 and a plurality of magnetic disks 12. In one example, the magnetic disk device 10 has n magnetic heads 16 and n / 2 magnetic disks 12. The plurality of magnetic heads 16 and the plurality of magnetic disks 12 are arranged along the rotation axis a.
[0039] Each disk 12 has a pair of recording surfaces RS, including multiple tracks T along the circumferential direction and multiple sectors CE formed by dividing the tracks T in the circumferential direction. The multiple tracks T are arranged in a radial direction. The sector CE is a storage area where data is written. The disk 12 is divided into multiple blocks. Each of the multiple blocks contains at least one sector and is assigned a logical block address (LBA).
[0040] The main controller 40 stores the logical block address assigned to each block in the memory 47 .
[0041] Based on the result detected by the non-writing detection unit 46d, the main controller 40 stores a flag indicating whether data has been written to each block in association with the logical block address assigned to each block in the memory 47. In addition, based on the result detected by the mode detection unit 46e, the main controller 40 stores a flag indicating whether the mode of data written to each block is a predetermined mode in association with the logical block address assigned to each block in the memory 47.
[0042] Each magnetic head 16 faces one recording surface RS. The main controller 40 can control each of the plurality of magnetic heads 16. Specifically, the main controller 40 can control the preamplifier IC 30 through the write control unit 46a to drive any magnetic head 16 (eg, the magnetic head H1) to write data to the recording surface RS1 of the magnetic disk 12.
[0043] Figure 3 FIG. 1 is an enlarged cross-sectional view showing an example of the magnetic disk 12 and the magnetic head 16 according to the above-mentioned embodiment. Figure 3 In the embodiment, the rotation direction B of the magnetic disk 12 is consistent with the direction of the air flow C.
[0044] like Figure 3As shown, the magnetic disk 12 is sequentially stacked with a substrate 101, a soft magnetic layer 102, a magnetic recording layer 103 and a protective film 104. The substrate 101 is formed of a disc-shaped non-magnetic body. The soft magnetic layer 102 is located on the substrate 101. The soft magnetic layer 102 is formed of a material exhibiting soft magnetic properties. The magnetic recording layer 103 is located on the soft magnetic layer 102. The magnetic recording layer 103 has magnetic anisotropy in a direction perpendicular to the surface of the magnetic disk 12 (the surface of the magnetic recording layer 103 or the surface of the protective film 104). The protective film 104 is located on the magnetic recording layer 103.
[0045] The magnetic head 16 includes a slider 160 . The slider 160 has an ABS (Air Bearing Surface) 162 facing the surface (eg, protective film 104 ) of the magnetic disk 12 and a trailing end 164 located on the outflow side of the air flow C. Parts of the write head 16W and the read head 16R are exposed from the ABS 162 .
[0046] The reading head 16R is composed of a magnetic film 166, a shielding film 168, and a shielding film 170. The magnetic film 166 is located between the shielding film 168 and the shielding film 170 to generate a magnetoresistance effect. The shielding film 168 is located on the trailing end 164 side relative to the magnetic film 166. The shielding film 170 is opposite to the shielding film 168. The lower ends of the magnetic film 166, the shielding film 168, and the shielding film 170 are exposed from the ABS 162.
[0047] The write head 16W is provided on the trailing end 164 side of the slider 160 relative to the read head 16R. The write head 16W includes a main magnetic pole 172, a write shield 174, an insulator 176, a recording coil 178 arranged to be wound around a magnetic circuit including the main magnetic pole 172 and the write shield 174 so as to flow magnetic flux in the main magnetic pole 172, and an auxiliary element 200.
[0048] The main magnetic pole 172 is formed of a soft magnetic material having a high saturation magnetic flux density. The main magnetic pole 172 generates a recording magnetic field perpendicular to the surface of the magnetic disk 12 in order to magnetize the magnetic recording layer 103 of the magnetic disk 12. In one example, the main magnetic pole 172 extends substantially perpendicularly to the ABS 162.
[0049] The lower surface of a front end portion 172 a of the main magnetic pole 172 on the ABS 162 side is exposed from the ABS 162 .
[0050] The write shield 174 is formed of a soft magnetic body having a high saturation magnetic flux density. The write shield 174 is provided to efficiently close the magnetic circuit via the soft magnetic layer 102 directly below the main magnetic pole 172. The write shield 174 is located on the trailing end 164 side relative to the main magnetic pole 172. The write shield 174 has a connecting portion 174a protruding toward the main magnetic pole 172 at the end opposite to the ABS 162. The connecting portion 174a is connected to the main magnetic pole 172 via an insulator 176. The connecting portion 174a is electrically insulated from the main magnetic pole 172. In addition, the connecting portion 174a is magnetically connected to the main magnetic pole 172.
[0051] The write shield 174 is formed in a substantially L-shape and has a front end portion 174 b facing the front end portion 172 a of the main magnetic pole 172 with a write gap therebetween on the ABS 162 side. The bottom surface of the front end portion 174 b is exposed from the ABS 162 .
[0052] In one example, the recording coil 178 is wound around the connection portion 174 a. When writing a signal to the magnetic disk 12 , a current flows through the recording coil 178 , and the recording coil 178 excites the main magnetic pole 172 , causing a magnetic flux to flow through the main magnetic pole 172 .
[0053] The auxiliary element 200 is disposed between the front end portion 172a of the main magnetic pole 172 and the front end portion 174b of the write shield 174. In other words, the auxiliary element 200 is disposed in the write gap. The auxiliary element 200 is, for example, a spin torque oscillator (STO). The STO, for example, has a structure in which a base layer formed of a non-magnetic conductive layer, a spin injection layer, an intermediate layer, an oscillation layer, and a gap layer formed of a non-magnetic conductive layer are sequentially stacked from the front end portion 172a side of the main magnetic pole 172 to the front end portion 174b side of the write shield 174.
[0054] The auxiliary element 200 generates energy to the magnetic disk 12 by applying current or voltage. The energy is, for example, a high-frequency magnetic field. The auxiliary element 200 applies a high-frequency magnetic field to the magnetic recording layer 103 of the magnetic disk 12, thereby reducing the coercive force of the magnetic recording layer 103. Thus, the writing performance of the write head 16W to the magnetic disk 12 is improved.
[0055] On the other hand, when the number of times the magnetic disk 12 is written with energy increases, the writing ability of the magnetic head 16 gradually decreases. In other words, when data is written using energy-assisted magnetic recording methods such as high-frequency assisted magnetic recording methods and thermal assisted magnetic recording methods, the magnetic head 16 deteriorates according to the number of writes.
[0056] Below, refer to Figure 4 and Figure 5 , an example of a method of selecting the magnetic head 16 during a write process of the magnetic disk device 10 according to the present embodiment will be described.
[0057] exist Figure 4 and Figure 5 In FIG. 1 , n magnetic heads 16 and a plurality of blocks are shown in parallel. In one example, blocks included in the corresponding recording surface are shown next to each magnetic head 16. Figure 4 and Figure 5 In FIG. 1 , a mark indicating the writing status of each block is shown below each block.
[0058] In one example, the flag indicating a block to which no data (more specifically, user data) has been written is 001, the flag indicating a block to which data consisting only of 0s has been written is 010, and the flag indicating a block to which data consisting only of 1s has been written is 100. In addition, the flag indicating a block to which data consisting of a combination of 1s and 0s has been written is 000.
[0059] In addition, data consisting of only 0s and data consisting of only 1s are fixed pattern data written to a block when an erase process or the like is performed, for example.
[0060] Hereinafter, a “block to which data has not been written” is also referred to as an “unwritten block”.
[0061] Figure 4 This is a diagram for explaining an example of control during writing of the magnetic disk device 10 according to the above-mentioned embodiment.
[0062] like Figure 4 As shown in FIG. 1 , logical block addresses are allocated to a plurality of blocks. Hereinafter, a case where a command to write data to block a1 allocated with LBAn+1 is received will be described as an example.
[0063] The block a1 is included in the recording surface RS1 corresponding to the magnetic head H1. When the number of writes of the magnetic head H1 detected by the counter 46c exceeds the first threshold value, it is confirmed whether there is a magnetic head 16 whose number of writes is less than the second threshold value. When the magnetic head H2 is detected as the magnetic head 16 whose number of writes is less than the second threshold value, the mark of each block on the recording surface RS2 corresponding to the magnetic head H2 is confirmed.
[0064] In one example, the flag of block b1 assigned with LBA3n+2 is 001, which indicates that it is an unwritten block. In the above case, the logical block address assigned to block a1 is swapped with the logical block address assigned to block b1. That is, when there is an unwritten block, the logical block address of the block that receives the write instruction is swapped with the logical block address of the unwritten block.
[0065] Figure 5 It is the successor Figure 4The following is a diagram for explaining an example of control during writing of the magnetic disk device 10 according to the above-mentioned embodiment.
[0066] like Figure 5 As shown, the logical block address assigned to the block a1 and the logical block address assigned to the block b1 are swapped. More specifically, LBA3n+2 is assigned to the block a1, and LBAn+1 is assigned to the block b1.
[0067] In the state where the logical block addresses are exchanged as described above, the magnetic head H2 writes data to the block b1. In addition, the fact that LBA3n+2 is allocated to the block a1 and LBAn+1 is allocated to the block b1 is stored in the memory 47.
[0068] Next, refer to Figure 6 and Figure 7 , the case where the recording surface RS2 corresponding to the magnetic head H2 does not include any unwritten blocks is described.
[0069] Figure 6 1 is a diagram showing an example of control of the magnetic disk device during writing according to the above embodiment. Hereinafter, a case where a command to write data to the block a2 to which LBA2n+1 is assigned is taken as an example.
[0070] The block a2 is included in the recording surface RS1 corresponding to the magnetic head H1. When the number of writes of the magnetic head H1 detected by the counter 46c exceeds the first threshold value, it is confirmed whether there is a magnetic head 16 whose number of writes is less than the second threshold value. When the magnetic head H2 is detected as the magnetic head 16 whose number of writes is less than the second threshold value, the mark of each block on the recording surface RS2 corresponding to the magnetic head H2 is confirmed.
[0071] In one example, there is no mark indicating an unwritten block on the recording surface RS2 corresponding to the magnetic head H2. In other words, there is no unwritten block on the recording surface RS2 corresponding to the magnetic head H2.
[0072] At this time, for the block a2 and the block on the recording surface RS2 corresponding to the magnetic head H2, the flag indicating the data mode is confirmed.
[0073] In one example, it is possible to check whether the data is composed of only 0s or only 1s by the flag. The flag of block a2 is 010, which indicates that data of a pattern of only 0s is written. In addition, the recording surface RS2 corresponding to the magnetic head H2 includes a block b2 in which the same flag (010) as that of block a2 is established. LBA4n+2 is allocated to block b2.
[0074] In the above case, the logical block address assigned to block a2 is swapped with the logical block address assigned to block b2. That is, when the block (in one example, block a2) receiving the instruction to write is written with predetermined data consisting of a periodic repetitive pattern, and the recording surface RS corresponding to the magnetic head 16 with a small number of writes includes a block (in one example, block b2) written with the same data as the above block, the logical block address assigned to the block receiving the instruction to write is swapped with the logical block address assigned to the block written with the same data as the block receiving the instruction to write.
[0075] Figure 7 It is the successor Figure 6 The following is a diagram showing an example of control during writing of the magnetic disk device according to the above-mentioned embodiment.
[0076] like Figure 7 As shown, the logical block address assigned to block a2 and the logical block address assigned to block b2 are swapped. More specifically, LBA4n+2 is assigned to block a2, and LBA2n+1 is assigned to block b2.
[0077] In the state where the logical block addresses are exchanged as described above, the magnetic head H2 writes data to the block b2. In addition, the fact that LBA4n+2 is allocated to the block a2 and LBA2n+1 is allocated to the block b2 is stored in the memory 47.
[0078] In this embodiment, the case where the mark of block a2 and the mark of block b2 are 010 is described as an example. In addition, the same process is performed when there is a block marked with 100 on the recording surface RS1 corresponding to the magnetic head H1 and there is a block marked with 100 on the recording surface RS2 corresponding to the magnetic head H2.
[0079] by Figure 6 and Figure 7 For example, when receiving an instruction to write data to block a3, the logical block address assigned to block a3 is swapped with the logical block address assigned to block b3, and the head H2 writes data to block b3.
[0080] Furthermore, the flag is not limited to indicating a block in which data consisting of only 0s or only 1s are written, but may also be a flag indicating a block in which data consisting of alternating 0s and 1s such as "0101 ... 1010" is written. In other words, the flag may also be a flag indicating a block in which data consisting of a periodically repeating pattern is written.
[0081] Next, refer to Figures 8 to 11, a description will be given of a process when the magnetic head 16 is selected in a write process of the magnetic disk device 10 according to the present embodiment.
[0082] Figure 8 This is a flowchart showing an example of a procedure of a write process of the magnetic disk device 10 according to the above-described embodiment. Fig. 9 It is the successor Figure 8 The following is a flowchart showing an example of a procedure of a write process of the magnetic disk device 10 according to the above-described embodiment. Fig.10 It is the successor Fig. 9 The following is a flowchart showing an example of a procedure of a write process of the magnetic disk device 10 according to the above-described embodiment. Fig.11 It is the successor Fig. 9 The following is a flowchart showing an example of a procedure of a write process of the magnetic disk device 10 according to the above-described embodiment.
[0083] like Figures 8 to 11 As shown, when the write process starts, when receiving an instruction to write data to the first block of the first recording surface written by the first magnetic head among the multiple blocks (S5), the main controller 40 determines whether the number of writes by the first magnetic head for writing data to the first block exceeds the first threshold value (S10). When the number of writes by the first magnetic head does not exceed the first threshold value, the first magnetic head writes data to the first block (S20), and the write process ends.
[0084] When the number of writes by the first head exceeds the first threshold ( S10 ), the main controller 40 selects a second head different from the first head ( S11 ), and determines whether the number of writes by the second head exceeds the second threshold ( S15 ).
[0085] When the number of writes by the second head exceeds the second threshold value ( S15 ), step S20 is executed.
[0086] In addition, in step S15, when the number of writes of the second head exceeds the second threshold value and there are multiple heads 16 different from the first head, a process of selecting a third head different from the first head and the second head and judging whether the number of writes of the third head exceeds the second threshold value may be performed. In other words, when the selected head 16 exceeds the second threshold value and there is a head 16 that has not been selected (hereinafter referred to as "unselected head"), a head 16 may be selected from the unselected heads 16, and it may be judged whether the selected head 16 exceeds the second threshold value. The above-mentioned selection and judgment process may also be repeated until there is no unselected head 16, or until it is judged that the selected head 16 does not exceed the second threshold value.
[0087] In addition, the magnetic head 16 can also be selected in the order from near to far from the first magnetic head. In this case, for example, the second magnetic head is the magnetic head 16 closest to the first magnetic head, and the third magnetic head becomes the magnetic head 16 next to the second magnetic head and close to the first magnetic head. By selecting in this way, the magnetic head 16 that does not exceed the second threshold value closest to the first magnetic head can be efficiently determined. In addition, the method for selecting the magnetic head 16 is not limited to the above method.
[0088] The following describes the situation where the number of writes to the second head in step S15 does not exceed the second threshold value, but when selection and judgment are performed as described above until it is determined that the selected head 16 does not exceed the second threshold value, "the second head" can be reread as "the selected head".
[0089] When the number of write times of the second magnetic head does not exceed the second threshold value (S15), it is determined whether there is an unwritten second block on the second recording surface to which the second magnetic head performs writing (S25). When there is a second block (S25), the main controller 40 swaps the logical block address assigned to the first block with the logical block address assigned to the second block (S30), writes data to the second block by the second magnetic head (S35), and ends the writing process.
[0090] Furthermore, in step S25, when there are multiple unwritten blocks on the second recording surface, for example, the block with the smallest logical block address number may be used as the second block. When confirming whether or not the blocks with the smallest logical block address match the second block in order, if the second block is defined as described above, the second block can be efficiently determined. Furthermore, the method for selecting the second block when there are multiple unwritten blocks is not limited to the method described above.
[0091] When the second block does not exist ( S25 ), the main controller 40 determines whether the first data written to the first block is composed of a periodic repeating pattern ( S40 ), and executes step S20 when the first data is not composed of a periodic repeating pattern.
[0092] When the first data is composed of a periodically repeated pattern ( S40 ), the main controller 40 determines whether or not there is a third block in which the third data composed of the periodically repeated pattern is written on the second recording surface ( S45 ).
[0093] Furthermore, in step S45, when there are a plurality of blocks in which data consisting of a periodic repeating pattern is written on the second recording surface, for example, the block having the smallest logical block address may be used as the third block. When confirming whether or not the blocks with the smallest logical block address match the third block in order, if the third block is defined as described above, the third block can be efficiently determined. Furthermore, the method of selecting the third block in the case where there are a plurality of blocks in which data consisting of a periodic repeating pattern is written is not limited to the method described above.
[0094] When the third block exists ( S45 ), the main controller 40 determines whether the first data and the third data are identical ( S50 ). When the first data and the third data are not identical, step S20 is executed.
[0095] When the first data and the third data are the same (S50), the main controller 40 swaps the logical block address assigned to the first block with the logical block address assigned to the third block (S55), writes data to the third block by the second head (S60), and ends the write process.
[0096] In addition, step S25 may be a process of determining whether the second block exists on the second recording surface based on the flag stored in the memory 47. In other words, it may be a process of determining whether the second block having a flag indicating an unwritten block is present on the second recording surface.
[0097] Step S40 may be a process of determining whether the first data is composed of a periodic repeating pattern based on a flag stored in the memory 47. In other words, it may be a process of determining whether a flag indicating that data of a periodic repeating pattern is written in the first block is set.
[0098] Step S45 may also be a process of determining whether there is a third block in which the third data is written on the second recording surface based on the flag stored in the memory 47. In other words, it may be a process of determining whether there is a block in which a flag indicating that data having a periodic repetition pattern is written is set on the second recording surface.
[0099] In addition, when one flag corresponds to one data pattern, after executing step S25, the process may proceed to step S50 without executing steps S40 and S45. In this case, in step S50, a process is executed to determine whether the flag of the first block and the flag of the third block are the same. If they are the same, step S55 is executed. If the flag of the first block and the flag of the third block are not the same (S50), step S20 is executed.
[0100] Regarding the relationship between the first recording surface and the second recording surface during the writing process, the first recording surface and the second recording surface can be set on the front and back of the same magnetic disk 12, or can be set on different surfaces of the magnetic disk 12. Figure 2 For example, the first recording surface may be the recording surface RS1 and the second recording surface may be the recording surface RS2. Alternatively, the first recording surface may be the recording surface RS1 and the second recording surface may be the recording surface RS3.
[0101] The effects of this embodiment will be described.
[0102] According to the magnetic disk device 10 involved in this embodiment, when the main controller 40 of the magnetic disk device 10 receives an instruction to write data to the first block, it determines whether the number of writes by the first head writing to the first block exceeds the first threshold value. If it exceeds the first threshold value, it determines whether there is a second head whose number of writes is less than the second threshold value.
[0103] When a second magnetic head exists, the main controller 40 determines whether there is an unwritten second block on the recording surface corresponding to the second magnetic head. When a second block exists, the logical block address assigned to the first block is swapped with the logical block address assigned to the second block, and the second magnetic head writes data to the second block.
[0104] On the other hand, in the absence of the second magnetic head, the main controller 40 determines whether the first data written to the first block is composed of a periodically repeating pattern. If the first data is composed of a periodically repeating pattern, it determines whether there is a third block on the recording surface corresponding to the second magnetic head in which the third data composed of a periodically repeating pattern is written.
[0105] When the third block exists, the main controller 40 determines whether the first data and the third data are the same. If the first data and the third data are the same, the logical block address assigned to the first block is swapped with the logical block address assigned to the third block, and the data is written to the third block by the second head.
[0106] Thus, since writing is performed not by the first magnetic head having a large number of writing times but by the second magnetic head having a small number of writing times, the number of writing times among the plurality of magnetic heads 16 can be smoothed.
[0107] In addition, generally speaking, when data is written to the written block by swapping the logical block address of the first block with the logical block address of the written block in which data with an unknown data pattern is written, it is necessary to perform a first action of copying the data of the written block to another area (such as memory 47), a second action of writing the data to the written block, and a third action of rewriting the copied data to the first block.
[0108] Since the second block is not written, there is no need to perform the first operation of copying the data written to the second block to other areas. Similarly, since the data pattern of the third block is the same as the data pattern of the first block, there is no need to perform the first operation of copying the data written to the third block to other areas. According to the above, the cost of moving data can be reduced.
[0109] In addition, the main controller 40 stores a flag indicating whether each of the plurality of blocks has not been written in association with the logical block address in the memory 47 , and determines whether the second block exists based on the flag.
[0110] Furthermore, the main controller 40 stores a flag indicating whether the data written to each of the plurality of blocks is composed of a periodic repetition pattern in association with the logical block address in the memory, and determines whether the third block exists based on the flag. By using the flag as described above, it is easy to identify the second block and the third block.
[0111] The data consisting of the periodically repeated pattern is preferably data consisting of only 0s or data consisting of only 1s. This makes it possible to easily manage flags.
[0112] Next, a magnetic disk device 10 according to a modified example will be described. In the modified example described below, the same reference numerals are given to the same parts as those in the above embodiment, and their detailed description is omitted, and the parts different from the above embodiment are mainly described in detail. Figure 8 The procedure of the writing process shown is also the same as the procedure of the writing process of the modification example.
[0113] (First Modification)
[0114] A first modification of the magnetic disk device 10 according to the above embodiment will be described. In the first modification, the magnetic disk device 10 is configured not to include the mode detection unit 46e.
[0115] Below, refer to Figure 8 and Fig.12 , the process of writing processing of the first variant is explained.
[0116] Fig.12 It is the successor Figure 8 The following is a flowchart showing an example of the process of writing processing of the first variant. Figure 8 and Fig.12 As shown, when the number of writes by the second head does not exceed the second threshold value (S15), the main controller 40 determines whether there is an unwritten second block on the second recording surface (S25). When there is no second block, the main controller 40 executes step S20 and ends the write process.
[0117] If there is a second block that has not been written (S25), steps S30 and S35 are executed to end the writing process. The processes of steps S30 and S35 are the same as the writing process in the above-mentioned embodiment.
[0118] According to the first modified example of the magnetic disk device 10 configured as described above, it is possible to obtain the same effects as those of the above-described embodiment with a simpler configuration.
[0119] (Second Modification)
[0120] A second modification of the magnetic disk device 10 according to the above embodiment will be described. In the second modification, the magnetic disk device 10 is configured not to include the non-writing detection unit 46 d.
[0121] Below, refer to Figure 8 , Fig.11 and Fig.13 , the process of writing processing of the second variant is described. In addition, in the second variant, Fig.11 It is the successor Fig.13 The following flowchart shows an example of the write process according to the second modification, and the processes of step S55 and step S60 are the same as the write process in the above-mentioned embodiment.
[0122] like Figure 8 , Fig.11 and Fig.13 As shown, when the number of writes by the second head does not exceed the second threshold value (S15), step S40 is executed. When the first data is composed of a periodic repetitive pattern (S40), the processing of steps S45 to S60 is executed in the same manner as the write processing of the above embodiment.
[0123] When the first data does not consist of a periodically repeated pattern ( S40 ), step S20 is executed to terminate the write process.
[0124] According to the second modification example of the magnetic disk device 10 configured as described above, it is possible to obtain the same effects as those of the first modification example.
[0125] The embodiments of the present invention have been described, but the above embodiments are presented as examples and are not intended to limit the scope of the invention. The above new embodiments can be implemented in various other ways, and various omissions, substitutions, and changes can be made without departing from the scope of the invention. These embodiments and / or their modifications are included in the scope and / or the main idea of the invention, and are included in the invention described in the claims and the scope of the invention and its equivalent.
Claims
1. A magnetic disk device comprising: at least one magnetic disk having a first recording surface and a second recording surface, wherein the first recording surface and the second recording surface respectively include a plurality of blocks to which logical block addresses are allocated; A first magnetic head for writing data to the first recording surface; a second magnetic head for writing data to the second recording surface; as well as The controller comprises a counter, a non-writing detection unit, and a memory, wherein the counter detects the number of writes of the first head and the second head respectively, the non-writing detection unit detects non-written blocks from the plurality of blocks, and the memory stores a first threshold value for the number of writes of the first head and the second head respectively and a second threshold value below the first threshold value, The controller performs control so that, When receiving an instruction to write data to a first block of the first recording surface among the plurality of blocks, determining whether the number of write times of the first magnetic head for writing data to the first block exceeds the first threshold, When the number of writes by the first head does not exceed the first threshold, the first head writes data to the first block, When the number of writes by the first head exceeds the first threshold, it is determined whether the number of writes by the second head exceeds the second threshold, When the number of writes by the second head exceeds the second threshold, the first head writes data to the first block. When the number of writes by the second head does not exceed the second threshold, determining whether there is an unwritten second block on the second recording surface, When the second block does not exist, the first head writes data to the first block. When the second block exists, the logical block address allocated to the first block is exchanged with the logical block address allocated to the second block, and the second magnetic head writes data to the second block.
2. The magnetic disk device according to claim 1, The first recording surface and the second recording surface are provided on the front and back sides of the one magnetic disk.
3. The magnetic disk device according to claim 1, There are multiple disks. The first recording surface and the second recording surface are provided on different surfaces of the magnetic disk.
4. The magnetic disk device according to claim 1, the controller, storing in the memory a flag indicating whether each of the plurality of blocks has not been written to, in association with a logical block address, It is determined whether the second block exists based on the flag.
5. A magnetic disk device comprising: at least one magnetic disk having a first recording surface and a second recording surface, wherein the first recording surface and the second recording surface respectively include a plurality of blocks to which logical block addresses are allocated; A first magnetic head for writing data to the first recording surface; a second magnetic head for writing data to the second recording surface; as well as The controller comprises a counter, a pattern detection unit and a memory, wherein the counter detects the number of writes of the first head and the second head respectively, the pattern detection unit detects whether the written data is composed of a periodically repeated pattern, and the memory stores a first threshold value for the number of writes of the first head and the second head respectively and a second threshold value below the first threshold value, The controller performs control so that, When receiving an instruction to write data to a first block of the first recording surface among the plurality of blocks, determining whether the number of write times of the first magnetic head for writing data to the first block exceeds the first threshold, When the number of writes by the first head does not exceed the first threshold, the first head writes data to the first block, When the number of writes by the first magnetic head exceeds the first threshold, it is determined whether the number of writes by the second magnetic head exceeds the second threshold, When the number of writes by the second head exceeds the second threshold, the first head writes data to the first block. When the number of writes by the second head does not exceed the second threshold, determining whether the first data written to the first block is composed of a periodically repeated pattern, When the first data is not composed of a periodically repeated pattern, the first magnetic head writes data to the first block. In a case where the first data is composed of a periodically repeated pattern, it is determined whether there is a third block in which third data composed of a periodically repeated pattern is written on the second recording surface, In the absence of the third block, the first head writes data to the first block. In the case where the third block exists, determining whether the first data and the third data are the same, When the first data and the third data are different, the first magnetic head writes data to the first block. When the first data and the third data are identical, the logical block address assigned to the first block is exchanged with the logical block address assigned to the third block, and the second head writes data to the third block.
6. The magnetic disk device according to claim 5, The first recording surface and the second recording surface are provided on the front and back sides of the one magnetic disk.
7. The magnetic disk device according to claim 5, There are multiple disks. The first recording surface and the second recording surface are provided on different surfaces of the magnetic disk.
8. The magnetic disk device according to claim 5, the controller, storing in the memory a flag indicating whether the data written to each of the plurality of blocks is composed of a periodically repeated pattern in association with a logical block address, It is determined whether the third block exists based on the flag.
9. The magnetic disk device according to claim 5, The data consisting of the periodically repeated pattern is data consisting of only 0s or data consisting of only 1s.
10. A magnetic disk device comprising: at least one magnetic disk having a first recording surface and a second recording surface, wherein the first recording surface and the second recording surface respectively include a plurality of blocks to which logical block addresses are allocated; A first magnetic head for writing data to the first recording surface; a second magnetic head for writing data to the second recording surface; as well as A controller having a counter, a non-writing detection unit, a pattern detection unit, and a memory, wherein the counter detects the number of writes of the first head and the second head, the non-writing detection unit detects non-written blocks from the plurality of blocks, the pattern detection unit detects whether the data written to each block in the plurality of blocks is composed of a periodically repeated pattern, and the memory stores a first threshold value for the number of writes of the first head and the second head, and a second threshold value below the first threshold value. The controller performs control so that, When receiving an instruction to write data to a first block of a first recording surface among the plurality of blocks, determining whether the number of write times of the first magnetic head for writing data to the first block exceeds the first threshold, When the number of writes by the first head does not exceed the first threshold, the first head writes data to the first block, When the number of writes by the first head exceeds the first threshold, it is determined whether the number of writes by the second head exceeds the second threshold, When the number of writes by the second head exceeds the second threshold, the first head writes data to the first block. When the number of writes by the second head does not exceed the second threshold, determining whether there is an unwritten second block on the second recording surface, When the second block exists, the logical block address assigned to the first block is exchanged with the logical block address assigned to the second block, and the second head writes data to the second block. In the case where the second block does not exist, determining whether the first data written to the first block is composed of a periodically repeated pattern, When the first data is not composed of a periodically repeated pattern, the first magnetic head writes data to the first block. In a case where the first data is composed of a periodically repeated pattern, it is determined whether there is a third block in which third data composed of a periodically repeated pattern is written on the second recording surface, In the absence of the third block, the first head writes data to the first block. In the case where the third block exists, determining whether the first data and the third data are the same, When the first data and the third data are different, the first magnetic head writes data to the first block. When the first data and the third data are identical, the logical block address assigned to the first block is exchanged with the logical block address assigned to the third block, and the second head writes data to the third block.
11. The magnetic disk device according to claim 10, The first recording surface and the second recording surface are provided on the front and back sides of the one magnetic disk.
12. The magnetic disk device according to claim 10, There are multiple disks. The first recording surface and the second recording surface are provided on different surfaces of the magnetic disk.
13. The magnetic disk device according to any one of claims 1 to 12, The first magnetic head and the second magnetic head output energy to corresponding recording surfaces to write data.
