Magnetic disk device and data control method

JP2025025750APending Publication Date: 2025-02-21KK TOSHIBA +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2023130849
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-08-10
Publication Date
2025-02-21

Smart Images

  • Figure 2025025750000001_ABST
    Figure 2025025750000001_ABST
Patent Text Reader

Abstract

To provide a magnetic disk device and a data control method for changing a write format on a magnetic disk.SOLUTION: A magnetic disk device according to an embodiment is a magnetic disk device using an SMR system, and user data is written to a disk with a header such as a preamble for each data frame including a plurality of blocks, which is a data area to which the user data is written in a track of a disk.SELECTED DRAWING: Figure 5
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] An embodiment of the present invention relates to a magnetic disk device and a data control method using SMR recording (shingled recording) technology. [Background technology]

[0002] Magnetic disk drives using the Shingled Magnetic Recording (SMR) recording method increase disk capacity by overlapping adjacent tracks. With the SMR method, when writing data to a track, all data on multiple tracks in the same band must be rewritten, and processing such as temporarily storing the track data in a cache area is required. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] U.S. Patent No. 9,601,142 [Patent Document 2] U.S. Pat. No. 9,448,738 [Patent Document 3] US Patent Application Publication No. 2017 / 0124104 Summary of the Invention [Problem to be solved by the invention]

[0004] However, further improvements in data storage efficiency are possible by manipulating the data in the tracks through temporary storage processes.

[0005] An object of the present invention is to provide a magnetic disk device and a data control method that change the write format for a magnetic disk. [Means for solving the problem]

[0006] The magnetic disk device according to the embodiment is a magnetic disk device using the SMR method, and writes user data to the disk by adding a header such as a preamble to each data frame, which is a data area in a track of the disk where user data is written and includes multiple blocks. [Brief description of the drawings]

[0007] [Figure 1] FIG. 1 is a configuration block diagram of a magnetic disk device according to the first embodiment. [Diagram 2] FIG. 2 is a schematic diagram showing an example of the data structure of a track on the magnetic disk according to the first embodiment. [Diagram 3] FIG. 3 is a schematic diagram showing an example of a data structure of a magnetic disk according to the first embodiment. [Figure 4] FIG. 4 is a flowchart showing a process performed when the magnetic disk device according to the first embodiment receives a write command. [Diagram 5] FIG. 5 is a diagram showing an example of a management table showing the relationship between user-specified sectors and sectors when the magnetic disk device according to the first embodiment receives and processes a write command. [Figure 6] FIG. 6 is a schematic diagram showing the relationship between various sectors and various data when the magnetic disk device according to the first embodiment receives and processes a write command. [Figure 7] FIG. 7 is a flowchart showing a process performed when the magnetic disk device according to the second embodiment receives a read command. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0008] Hereinafter, an embodiment of the present invention will be described with reference to the drawings. (First embodiment) In this embodiment, an example of a magnetic disk device is shown in which data of a user-specified sector specified in a write command received from a host is format-converted and written to a disk.

[0009] FIG. 1 is a functional block diagram of a magnetic disk device according to the first embodiment.

[0010] The magnetic disk device 1 is an SMR type storage device equipped with a magnetic disk 11 (hereinafter sometimes simply referred to as disk 11) from which data is read and written, and is equipped with a processing device such as a microprocessor equipped with computer functions such as arithmetic processing. The magnetic disk device 1 outputs data to the host system 2 based on commands received from the connected host system 2, and writes data input from the host system 2 to the disk 11.

[0011] Disk 11 is a disk-shaped magnetic rotating disk storage medium, and has a data area where data can be written (sometimes called "write"), which is assigned with a user data area available to users, a system area where information required for system management is written, a media cache area where various data can be temporarily stored, etc. Hereinafter, the direction perpendicular to the radial direction of disk 11 is referred to as the circumferential direction. Disk 11 is attached to spindle 12, and rotates when driven by spindle 12.

[0012] In the data area of ​​the disk 11, a plurality of tracks are set concentrically around the spindle 12. In the figure, the plurality of tracks are shown as TR[i] and TR[j] (i and j indicate the numbers of any track, and are referred to as tracks TR when no particular distinction is made). When reading and writing data on the disk 11, the head 16 is moved to the track TR to be read or written by seek control, tracking control, etc., and the head 16 receives a read signal from the track TR and outputs a write signal. When a particular distinction is made, the data on the disk 11 is referred to as disk data, data on the disk 11 that has been commanded to be read is referred to as read data, and data that has been commanded to be written to the disk 11 is referred to as write data.

[0013] In addition, servo information is written on the disk 11 and is used for detecting the position of the head 16, etc. The servo information is provided at predetermined positions (called servo areas) in the circumferential direction of the disk 11. The servo information is general, and detailed explanation is omitted. In the example of FIG. 1, three servo areas SVA1, SVA2, and SVA3 (called servo areas SVA when no particular distinction is made) are shown as examples of servo areas, but generally, servo areas SVA are provided at equal intervals over the entire circumferential direction of the disk 11, and servo information is written in the servo area SVA of each track TR. The magnetic disk device 1 can detect the current position of the head 16 by the servo information read by the head 16.

[0014] The areas between the servo areas SVA on the disk 11 are areas where data such as user data is stored, and are called data frames. The spindle 12 is a support for the disk 11, and is installed in a housing or the like of the magnetic disk 1. When the spindle 12 rotates, the disk 11 rotates.

[0015] The VCM 13 is a voice coil motor type actuator, and is used to move the arm 15 and the like. The VCM 13 controls the operation of the arm 15 and the like based on an input current. Note that, although an example of the VCM 13 is shown in this embodiment, the present invention is not limited to a voice coil motor type actuator.

[0016] The pivot 14 is a bearing that supports the arm 15 and the like and allows it to rotate. The arm 15 supports the head 16, transmits power from the VCM 13 to the head 16, and moves the head 16 to a target track TR.

[0017] Head 16 is a component that writes data to disk 11 and reads data recorded on the data tracks of disk 11. When making a particular distinction, a head that writes data to disk 11 is called write head 16W, and a head that reads data recorded on the data tracks of disk 11 is called read head 16R.

[0018] The control unit 101 is a hard disk controller that receives commands from the host 2 and controls each part of the magnetic disk device 1 based on the received commands. The control unit 101 may be configured with hardware such as a processor such as a CPU or a microprocessor, or an IC chip equipped with other processors, or may be executed by a software (including firmware) program, or may be provided as hardware or a combination of software and hardware. The control unit 101 receives commands such as an instruction to write data to the disk 11 or an instruction to read data from the disk 11 from the host 2, for example.

[0019] The various processes of the control unit 101 may be executed by a software (including firmware) program, or may be provided as hardware or software, or a combination of both.

[0020] The communication unit 102 is connected via a cable or the like and exchanges data with the host 2 .

[0021] The head amplifier IC 103 includes, for example, a read amplifier and a write driver. The read amplifier amplifies a read signal read from the disk 11 and outputs it to the R / W channel 104. The write driver outputs a write current to the head 16 according to the signal output from the R / W channel 104.

[0022] The R / W channel 104 controls the head amplifier IC 103 to read data from the disk 11 and write data to the disk 11 in response to instructions from the control unit 101 etc. The R / W channel 104 receives a read signal from the head amplifier IC 103 and extracts data read from the disk 11 (read data). The R / W channel 104 also generates a write data signal based on data instructed to be written (write data) and outputs it to the head amplifier IC 103. The R / W channel 104 also extracts servo information from the read signal received from the head amplifier IC 103.

[0023] The driver IC 105 outputs a current or voltage for driving and controlling the SPM 12, VCM 13, etc., according to control from the control unit 101, etc.

[0024] The memory 106 is a semiconductor memory in which stored data is lost when the power supply is cut off, and may be used as a work memory for the control unit 101, etc. The memory 106 is, for example, a dynamic random access memory (DRAM) or a synchronous dynamic random access memory (SDRAM). The memory 106 may include, for example, a buffer area for temporarily storing commands received by the magnetic disk device 1 from the host system 2.

[0025] The storage unit 107 is a semiconductor memory that records stored data even if the power supply is cut off. The storage unit 107 stores data, programs, etc., necessary for processing of the magnetic disk device 1, such as a sector management table. The storage unit 107 is, for example, a NOR type or NAND type flash ROM (Flash Read Only Memory: FROM).

[0026] The host 2 is, for example, a personal computer main unit, and is connected to the magnetic disk device 1. The host 2, for example, outputs data read / write commands and write data to the magnetic disk device 1, and receives read data from the magnetic disk device 1.

[0027] FIG. 2 is a schematic diagram showing an example of the data structure of a track on the magnetic disk according to the first embodiment.

[0028] Fig. 2(a) is an example of a track frame format, in which the servo areas SVA and data frames DR, which are data areas, shown in Fig. 1, are allocated alternately. Fig. 2(b) is an example in which one data frame DR1 is further divided into block units, and each of the nb blocks is called a sector (also called a physical address). A logical address called a Logical Block Address (LBA) is assigned to each sector. The host 2 uses the LBA to create and send commands to the magnetic disk device 1. Fig. 2(c) shows the physical addresses on the magnetic disk 11 that correspond to the LBAs.

[0029] FIG. 3 is a schematic diagram showing an example of a data structure of a magnetic disk according to the first embodiment.

[0030] Since the magnetic disk device 1 employs the SMR method, adjacent tracks on the disk 11 overlap. Therefore, for example, when data is written to a track TR[1], if there is existing data on the adjacent track TR[2] on the other side (toward the center of the disk 11), that data must be rewritten. Therefore, when writing data to track TR[1] in the SMR method, it is necessary to perform an operation such as copying the data on track TR[2] to the media cache area of ​​the disk 11 once, taking a backup, and then writing the data to track TR[1]. Furthermore, when writing data to track TR[2] in the same way, it is necessary to perform an operation such as writing the data on the adjacent track TR[3] on the other side again in the same manner.

[0031] Therefore, for example, when writing data to track TR[1], an operation such as writing data again to a track (corresponding to TR[nt] in the figure) that has no adjacent tracks at the other end is required. A set of adjacent tracks from track TR[1] to TR[nt] is called a band (corresponding to Band[1] in the figure). Furthermore, multiple bands can be assumed on the disk 11, and a set of multiple bands is called a zone. In the figure, multiple bands are shown as Band[band identification number]. Since guard bands and the like are provided between adjacent bands, for example, when writing data to band Band[1], it is not necessary to consider the impact on the adjacent band at the other end, band Band[2]. Hereinafter, writing to disk 11 in band units is called band write.

[0032] Furthermore, it is possible to assume that there are multiple zones on the disk 11. In the figure, multiple zones are shown as Zone[zone identification number]. The figure shows an example in which there are nz zones on the disk 11, and Zone[1] has mb bands. The figure shows an example in which each track TR has nb physical addresses (nb blocks), and physical addresses are shown as P[sector identification number][track identification number]. Band[1] shows that there are nb×nt physical addresses (nb×nt blocks). The number of blocks in one track, nb, can be set to a different value for each zone, band, or track. Also, the number of tracks in one band, nt, can be set to a different value for each zone or band. Also, the number of bands in one zone, mb, can be set to a different value for each zone.

[0033] An example of the processing operation of the magnetic disk device of this embodiment will now be described.

[0034] The magnetic disk device 1, which is an SMR system, performs band writing based on a command sent from the host 2, for example. The command includes the address of the first block of the write destination (sometimes called the first LBA) and the number of blocks. A sector in an area specified by the first sector address and the number of blocks is called a user-specified sector. The size of a user-specified sector is called a user-specified sector size (sometimes called a user-specified block size). The user-specified sector size is the smallest unit of data that a user can specify when managing data. The user-specified sector size is not included in commands issued during operation, and is usually a value that is set at the time of shipment, but the user can also intentionally switch the setting separately from the host 2, etc.

[0035] The user-specified sector size may differ from the data frame length (data area sectors on the disk 11) shown in Fig. 2. When writing write data to the disk 11, the firmware (referred to as FW) of the control unit 101 in this embodiment performs format conversion such as dividing or connecting data of the user-specified sector size to match the data frame length of the disk 11, and executes data writing to the disk 11.

[0036] When writing to disk 11 using band write, the data frame length may change due to a zone change, etc., and the control unit 101 tracks the change in data frame length, changes the write format (number of bits, etc.) of the received data to match the data frame length after the change, and performs the data write.

[0037] FIG. 4 is a flowchart showing a process performed when the magnetic disk device according to the first embodiment receives a write command.

[0038] The FW of the control unit 101 receives a write command including a write start LBA and the number of write blocks (step S101). The control unit 101 selects a start physical address P[n] corresponding to the start LBA as the physical address at which to start the write process (step S102). It is assumed that P[n] is in band Band[n]. The control unit 101 identifies the data frame length F[n] from the track information of the zone including the address P[n] (step S103).

[0039] The control unit 101 determines the converted sector size (number of bits) Ls[n] for writing to the disk 11 as Ls[n]=F[n] so that the size is the same as the data frame length F[n] (step S104). The control unit 101 obtains the write data length W[n] as the product of the number of write blocks B[n] included in the received command and the user-specified sector size Lus, as in W[n]=B×Lus (step S105). The number of write blocks B[n] indicates the number of write blocks included in the band Band[n].

[0040] The control unit 101 divides the write data length W[n] by the sector size Ls[n] to obtain the number of sectors Ns[n] after conversion as Ns[n]=W[n] / Ls[n] (step S106). In step S106, the fraction of W[n] / Ls[n] is rounded up, for example. The write data length W[n] indicates the length of the write data included in the band Band[n].

[0041] The control unit 101 starts writing data for the number of sectors Ns[n] from P[n] and checks whether it fits in the band Band[n] (step S107). In step S107, for example, the control unit 101 checks whether the condition Ns[n]-b[n]≦0 is satisfied, where b[n] is the number of blocks from P[n] to the end of the band Band[n]. If the condition is satisfied in step S107 (Yes in step S107), the control unit 101 executes band writing for the number of blocks b[n] from the address P[n] with a sector size Ls[n] (step S108).

[0042] On the other hand, if the condition is not satisfied in step S107 (No in step S107), the control unit 101 executes band write of the number of blocks b[n] from the address P[n] with a sector size Ls[n] (step S110), selects the next band Band[n+1], and writes the remaining data to Band[n+1] (step S111). In step S111, the control unit 101 sets B[n] and P[n] as the first address band of the next band, for example, n=n+1, B[n]=(Ns[n]-b[n])×Ls[n] / Lus, and P[n]=the nth band, and executes the process from step S102. Thereafter, the control unit 101 repeats the above process until writing of data of the write data length W[n] is completed, and completes writing of the write data to the medium disk 11 according to the command of the received command.

[0043] By the above process, when the magnetic disk device 1 receives a third command including a write command for the third user data, if the magnetic disk device 1 cannot write all of the third user data in the first band Band[i] (i is the identification number of the band), the magnetic disk device 1 selects a third data frame DR in the writable second band Band[j] (j is the identification number of the band), and if the third data frame DR3 has a header, writes at least a part of the third user data in the third data frame DR. If the third data frame DR does not have a header, the magnetic disk device 1 writes at least a part of the third user data by attaching a header to the third data frame DR. In this embodiment, an example is shown in which it is assumed that the data frame length of the data frame DR is switched for each band, but even if the data frame length is switched for each zone, the same process as the flowchart in FIG. 4 may be performed.

[0044] For example, when the magnetic disk device 1 receives a fourth command including an instruction to write fourth user data, if it is unable to write all of the fourth user data in the first zone Zone[i] (i is the zone identification number), it selects a fourth data frame in a writable second zone Zone[j] (j is the zone identification number), and if the fourth data frame DR has a header, it writes at least a part of the fourth user data into the fourth data frame DR, or if the fourth data frame DR does not have a header, it attaches the header to the fourth data frame DR and writes at least a part of the fourth user data.

[0045] When the control unit 101 completes writing the write data to the medium disk 11 in response to the received command, it updates the sector management table (step S109). The sector management table indicates, for example, the correspondence between the user-specified sector and the write sector (data frame) to the disk 11, and is stored in the storage unit 107, the system area on the medium disk 11, or the like.

[0046] In this embodiment, data is not written to the disk 11 as is in the user-specified sector size, but the write sector size, which is the unit of writing to the disk 11, is set as the data frame length of the disk 11. That is, the control unit 101 writes data configured in the format of the user-specified sector size by converting the address in a format based on the data frame length of the disk 11. For example, the control unit 101 manages addresses by dividing or connecting each user-specified sector defined by the user-specified sector size to match the data frame length and changing the address to an address converted by the sector size with the number of bits changed.

[0047] When reading the data written as described above, it is necessary to know the correspondence between the user-specified sector sent by the host 2 and the address on the disk 11 where the data has been written.

[0048] FIG. 5 is a diagram showing an example of a management table showing the relationship between the user-specified sector size and the sector when the magnetic disk device according to the first embodiment receives and processes a write command.

[0049] In write and read commands issued from the host 2, the destination to which data is to be written and the destination to which data is to be read are specified by the LBA of the first block, the number of blocks, and the set block length (user-specified sector size).

[0050] FIG. 5(a) shows an example in which the unit of writing to the disk is a user-specified sector unit specified in a command received from the host 2, and corresponds to an example of writing by a conventional magnetic disk device.

[0051] Fig. 5(b) is an example of the case where the writing unit to the disk 11 according to this embodiment is the data frame unit. In this embodiment, when writing data to the end track of a certain band for the first time (when writing has no effect on other tracks), writing may be performed according to Fig. 5(a), and when writing next time, if writing has an effect on other tracks, writing may be performed using the method of this embodiment shown in Fig. 5(b).

[0052] Fig. 5(c) is a sector management table showing the correspondence between the user-specified sectors specified in the command received from the host 2 and the write sectors (in data frame units) on the disk 11. For example, data of user-specified sector sizes U-Sct1 to U-Sct5 in Fig. 5(a) is shown to be written to data frames Sct1 to Sct4 in Fig. 5(b). The sector management table may be stored in the system area of ​​the disk 11, memory 106, etc. For example, the sector management table may show the correspondence between the user-specified sectors (including the LBA of the first block and the number of blocks) to which the user data is to be written, which are included in the write command received from the host, and the identification number (sometimes referred to as the sector number) of the data frame on the disk to which the user data is written.

[0053] FIG. 6 is a schematic diagram showing the relationship between various sectors and various data when the magnetic disk device according to the first embodiment receives and processes a write command.

[0054] 6(a) is a diagram showing a state in which the user-specified sector size U-Sct and the corresponding write data Data included in a command received by the magnetic disk device 1 from the host 2 are temporarily stored in a cache such as the memory 106. The same numbers attached to the symbols indicate that U-Sct and Data are a pair, and for example, this indicates that data Data1 is written with a user-specified sector size U-Sct1 specified by the user, and data Data3 is written with a user-specified sector size U-Sct3. In this embodiment, a write command and a read command are issued by separate commands for each pair of U-Sct and Data, but five pairs of U-Sct and Data may be specified by one command.

[0055] Figure 6(b) shows the state of data storage in the sector areas and data areas on disk 11 when performing Band Write with a user-specified sector size such as 4kn or 512e, as in conventional SMR or CMR magnetic disk devices (referred to as conventional methods).

[0056] As shown in track TR in Figure 6(b), the track is divided into a servo area and a data area, but in the conventional method, band write is performed in the data area with the size of the user-specified sector, so writing may occur across the servo area, for example, U-Sct2, U-Sct3, U-Sct4. Write gate GT indicates the data write timing (ON / OFF). As shown in write gate GT, when data from different user-specified sectors is written to the same data frame, a blank period (sector gap) such as a processing delay occurs between different user-specified sectors.

[0057] The data DT indicates the state of data written to the data frame on the disk 11. As shown in the data DT, the data of each user-specified sector is given a header such as a preamble or a synchronization code (SyncMark) and is stored in the data frame. As shown in the data DT, in conventional magnetic disk devices, continuous sectors without servos and split sectors exist at a considerable rate, resulting in loss of format efficiency. In addition, when the amount of data that can be stored in a data frame (write sector of the disk 11) differs due to differences in BPI (Bits Per Inch) depending on, for example, differences in heads or zones or the position of the track on the disk 11, the above-mentioned loss of efficiency also occurs.

[0058] FIG. 6C shows the state of data storage in the sector areas and data areas on the disk 11 when Band Write according to this embodiment is executed.

[0059] As shown in the track TR, in the band write according to this embodiment, when writing, the user-specified sector size U-Sct is converted to the size of the sector area of ​​the disk 11 (corresponding to the data frame length) and writing is performed with the converted sector size, so that no blank period (sector gap) occurs between different user-specified sectors as shown in the write gate GT. That is, as shown in the data DT, by connecting or separating different user-specified sectors in advance, no gap occurs in the data frame of the disk 11. For example, the data frame (Sct1) of the disk 11 includes all of Data1 and part of Data2. The rest of Data2 is written to the next data frame Sct2 together with part of Data3. In this embodiment, the write sector size to the disk 11 is converted to the data frame length according to the processing flowchart of FIG. 4, so that writing to the disk 11 can be performed as shown in FIG. 6(c).

[0060] As shown in the data DT, in this embodiment, headers such as a preamble and a synchronization code (SyncMark) are added to the data in data frame length units and stored in the data frame, so that the overhead caused by headers such as a preamble and a synchronization code (SyncMark) is less than in the conventional method shown in Figure 6 (b).

[0061] That is, the magnetic disk device 1 attaches a header such as a preamble to each data frame and writes the user data to the disk 11. Furthermore, the magnetic disk device 1 may perform the following process when it receives a second command after the first user data has been written to the first data frame by the first command and there is free space in the first data frame to write user data thereto.

[0062] That is, for example, when a command to write the second user data is issued by the second command, the magnetic disk device 1 writes the second user data from the physical address next to the last physical address of the first user data written in the first data frame. On the other hand, when it is not possible to write all of the second user data in the first data frame, if the writable second data frame has a header, the magnetic disk device 1 writes the remainder of the second user data in the writable area of ​​the second data frame, and if the second data frame has no header, the magnetic disk device 1 writes the remainder of the second user data with a header attached in the writable area of ​​the second data frame.

[0063] According to this embodiment, since the user-specified sectors are divided or connected so that the data frame length and the sector size are the same, there is no format loss such as header data such as preambles and synchronization codes due to continuous sectors without servos, or sector gaps due to split sectors, so the area on the medium can be used without waste. Also, this embodiment can store data in a data frame format according to the difference in data frame length between tracks, bands, zones, etc. by tracking the data frame length. Second Embodiment In this embodiment, an example is shown in which the host 2 reads data written to the disk 11 by the first embodiment. When reading data, data is read up to a sector including data of a data length specified by the host 2, and only the necessary data is extracted and then output to the host 2.

[0064] FIG. 7 is a flowchart showing a process performed when the magnetic disk device according to the second embodiment receives a read command.

[0065] The FW of the control unit 101 receives a read command including a read start LBA and the number of read blocks (step S201). The control unit 101 selects a start physical address P[m] corresponding to the start LBA as the physical address at which to start the read process (step S202). It is assumed that P[m] is in Band[m]. The control unit 101 identifies the data frame length F[m] from the track information of the Zone including the address P[m] (step S203).

[0066] The control unit 101 determines the converted sector size (number of bits) Ls[m] for reading from the disk 11 so that the size is the same as the data frame length F[m], as Ls[m]=F[m] (step S104). Ls[m] indicates the sector size of the disk 11 read by the magnetic disk device 1. The control unit 101 obtains the read data length R[m] as the product of the number of read blocks B[m] included in the received command and the user-specified sector size Lus, as R[m]=B[m]×Lus (step S205). The number of read blocks B[m] indicates the number of read blocks included in the band Band[m].

[0067] The control unit 101 divides the read data length R[m] by the sector size Ls[m] to obtain the number of sectors Ns[m] after conversion as Ns[m]=R[m] / Ls[m] (step S206). In step S206, the fraction of R[m] / Ls[m] is rounded up, for example. The read data length R[m] indicates the length of the read data included in the band Band[m].

[0068] The control unit 101 starts reading data for the number of sectors Ns[m] from P[m] and checks whether all reading is completed at the band Band[m] (step S207). In step S207, for example, if the number of blocks from P[m] to the end of the band Band[m] is b[m], the control unit 101 checks whether the condition Ns[m]-b[m]≦0 is satisfied. If the condition is satisfied in step S207 (Yes in step S207), the control unit 101 executes reading of the number of blocks b[m] from the address P[m] with a sector size Ls[m] (step S208). In step S208, the control unit 101 stores the read data in a buffer such as the memory 106.

[0069] On the other hand, if the condition is not satisfied in step S207 (No in step S207), the control unit 101 reads the number of blocks b[m] from the address P[m] with a sector size Ls[m], and stores the read data in a buffer such as the memory 106 (step S211). Following the process of step S211, the control unit 101 selects the next band Band[m+1], and reads the remaining data from Band[m+1] (step S212).

[0070] In step S212, for example, the control unit 101 sets m=m+1, B[m]=(Ns[m]-b[m])×Ls[m] / Lus, and P[m]=the start address band of the next band, and executes the process from step S202. Thereafter, the control unit 101 repeats the above process until the reading of data of the read data length R[m] is completed, and completes the reading of the read data from the medium disk 11 according to the command of the received command. That is, reading and buffering of the read data are repeated while switching bands until the number of sectors Ns[m] is within the total number of blocks b[m] in the band including the start address P[m].

[0071] Once all data specified for reading by the command has been read using the above procedure, the read data stored in the buffer of memory 106 is converted to the user-specified sector size and output to the host. Since the read data that has been read (data stored in memory 106) is configured in the format of Fig. 5(b), in order to output it to the host 2, it must be converted to the format in which the data was written from the host 2 (corresponding to the format of Fig. 5(a)).

[0072] When the control unit 101 completes reading the read data into the memory 106, it converts the format of the read data based on the sector management table (step S209). More specifically, the control unit 101 acquires the sector management table (e.g., FIG. 5(c)) created when writing data in step S108 of FIG. 4, and converts the data stored in the memory 106 in the format of FIG. 5(b) into the format of the host 2 (the format of FIG. 5(a)) based on the correspondence in the sector management table.

[0073] When conversion to the format of the host 2 is completed, the control unit 101 outputs the converted data to the host 2 (step S210). In step S210, when reading data, the magnetic disk device 1 reads data up to the sector including the user-specified sector specified by the read command, extracts only the necessary data (data with the header removed), and reports it to the host.

[0074] The above procedure allows the host 2 to read data written to the disk 11 by the first embodiment. More specifically, the magnetic disk device 1 acquires information on a user-specified sector to which the read user data to be read is to be written from a read command received from the host 2. The magnetic disk device 1 acquires the sector number of the write destination of the read user data from the acquired user-specified sector and the correspondence shown in the sector management table, acquires the read user data from the disk based on the sector number, and outputs the acquired read user data to the host.

[0075] According to the above-described embodiment, a magnetic disk device and a data control method for changing the write format for a magnetic disk are provided.

[0076] In this embodiment, as shown in FIG. 1, an example of writing and reading data in a magnetic disk device 1 having one head 16 and one disk 11 has been shown, but writing and reading data using similar processing is also possible in a magnetic disk device having multiple heads 16 and multiple disks 11, that is, multiple heads 16 and multiple disks.

[0077] For example, a magnetic disk device equipped with multiple disks using the method of this embodiment tracks the change in data frame length each time the data frame length changes due to a head change, zone change, etc. during writing, and executes writing by dividing or connecting each user-specified sector to change the number of bits to match the data frame length after the change, and switching the size of the write sector.

[0078] Furthermore, when the data frame length changes due to a head change, zone change, or the like during reading, a magnetic disk device equipped with a multi-disk according to the method of this embodiment tracks the change in data frame length each time, divides or connects each user-specified sector to match the data frame length after the change, changes the number of bits, switches the read sector size, and executes the read.

[0079] For example, a magnetic disk device having a multi-disk according to the method of this embodiment receives a fifth command including an instruction to write fifth user data, and when switching to a second head while writing the fifth user data to the first disk in the third zone Zone[i] (i is the zone identification number) with the first head, if there is a header in the fifth data frame in the fourth zone Zone[j] (j is the zone identification number) of the second disk corresponding to the second head, it writes at least a part of the fifth user data into the fifth data frame, and if there is no header in the fifth data frame, it attaches the header to the fifth data frame and writes at least a part of the fifth user data.

[0080] In a magnetic disk device with multiple heads and multiple disks, when the amount of data that can be stored in a data frame (write sector of disk 11) differs due to differences in BPI depending on differences in head position, etc., there will be a significant proportion of continuous sectors without servos and split sectors, causing loss in format efficiency. According to the method of this embodiment, data configured in a format specified by the host 2 (including user-specified sectors) is converted to the format of the data frame of disk 11 and written to disk 11, so that even when applied to a magnetic disk device with multiple heads and multiple disks, there will be no format loss due to continuous sectors without servos and split sectors, and the area on the medium can be used without waste.

[0081] The magnetic disk device 1 may have any combination of one or more of the following features. (A-1) For example, as shown in data DT in Figure 6 (c), the magnetic disk device 1 divides (example of Data2) or connects (example of Data2 and Data3) the data of each user-specified sector so that the sector size written to the disk during Band write is the data frame length, and performs the write by changing the number of bits by not inserting a header. (A-2) For example, as shown in step S205 of FIG. 7, when reading data, the magnetic disk device 1 executes the read based on the sector size (data frame length) at the time of writing obtained from the information of the user-specified sector specified in the read command. (A-3) When the data frame length changes due to a head change, zone change, or the like during writing, a magnetic disk device equipped with multiple disks according to the method of this embodiment tracks the change in data frame length each time, divides or connects each user-specified sector to change the number of bits to match the data frame length after the change, and switches the data frame length of the write sector to execute the write. (A-4) When the data frame length changes due to a head change, zone change, or the like during reading, a magnetic disk device equipped with multiple disks according to the method of this embodiment tracks the change in data frame length each time, divides or connects each user-specified sector to match the data frame length after the change, changes the number of bits, and switches the data frame length of the read sector to execute the read. (A-5) For example, as shown in step S210 of FIG. 7, when reading data, the magnetic disk device 1 reads data up to the sector including the data of the user-specified sector specified in the read command, extracts only the necessary data (data with the header removed), and reports it to the host. (A-6) The magnetic disk device 1 divides or joins each user-specified sector so as to match the LBA defined by the user-specified block size with the data frame length, and changes the address to an address converted by the sector size with the number of bits changed. (A-7) The magnetic disk device 1 stores in the system area an address converted into a sector size by dividing or concatenating each user-specified sector so that the number of bits is changed to match the data frame length from the LBA defined by the user-specified block size. (A-8) The magnetic disk device 1 manages addresses converted into sector sizes with the number of bits changed by dividing or concatenating each user-specified sector so as to match the LBA and data frame length defined by the user-specified block size.

[0082] The present invention is not limited to the above-described embodiments as they are, and can be embodied by modifying the components in the implementation stage without departing from the gist of the invention. In addition, various inventions can be formed by appropriately combining the multiple components disclosed in the above-described embodiments. For example, some components may be deleted from all the components shown in the embodiments. Furthermore, components from different embodiments may be appropriately combined. In addition, the processing steps shown in the flowcharts and sequence charts shown in the above-described embodiments are within the scope of the present invention even if the order of steps is changed, steps are deleted, or steps are added, without departing from the gist of the present invention.

[0083] The processing shown in the flowcharts, sequence charts, etc. may be realized by hardware such as a CPU, an IC chip, or a digital signal processor (DSP), or by software (e.g., a program) operated on a computer including a microcomputer, or by a combination of hardware and software.

[0084] The present invention is also applicable when the claims are expressed as a control logic, a program including instructions for causing a computer to execute the control logic, or a computer-readable recording medium having the instructions written thereon. The names and terms used are not intended to be limiting, and other expressions that have substantially the same content and intent are also included in the present invention. [Explanation of symbols]

[0085] 1...magnetic disk drive (HDD), 2...host, 11...disk, 12...SPM, 13...VCM, 14...pivot, 15...arm, 16...head, 101...control unit, 102...communication unit, 103...head amplifier IC, 104...R / W channel, 105...driver IC, 106...memory, 107...storage unit.

Claims

1. A magnetic disk device using a Shingled Magnetic Recording (SMR) system, A magnetic disk device that writes user data to a disk by adding a header such as a preamble to each data frame, which is a data area in a track of a disk where the user data is written and includes a plurality of blocks.

2. If there is free space in the first data frame in which user data can be written after the first user data is written in the first data frame by the first command, 2. The magnetic disk drive according to claim 1, wherein when a write command for second user data is issued by a second command, the second user data is written from a physical address next to a last physical address of the first user data in the first data frame.

3. when all of the second user data cannot be written to the first data frame, if the writeable second data frame has a header, writing the remainder of the second user data into the writeable area of ​​the second data frame; 3. The magnetic disk drive according to claim 2, wherein if the second data frame does not have a header, a header is added to a writable area of ​​the second data frame and the remainder of the second user data is written.

4. A disc is divided into bands, which are groups of tracks. when receiving a third command including a write instruction for third user data, if all of the third user data cannot be written in the first band, selecting a third data frame in a writable second band; If the third data frame has a header, writing at least a portion of the third user data to the third data frame; 4. The magnetic disk drive according to claim 3, wherein if the third data frame does not have a header, a header is added to the third data frame and at least a part of the third user data is written.

5. A plurality of zones, which are groups of bands, are set on the disk; when receiving a fourth command including a write instruction for fourth user data, if all of the fourth user data cannot be written in the first zone, selecting a fourth data frame in a writable second zone; If the fourth data frame has a header, writing at least a portion of the fourth user data to the fourth data frame; 4. The magnetic disk drive according to claim 3, wherein if the fourth data frame does not have a header, the header is added to the fourth data frame and at least a part of the fourth user data is written.

6. A plurality of heads and a corresponding plurality of disks are provided, When a fifth command including a command to write fifth user data is received, and the fifth user data is written to the third zone on the first disk by the first head, the head is switched to the second head while the fifth user data is being written to the third zone on the first disk by the first head, if a header is present in a fifth data frame in a fourth zone of a second disk corresponding to the second head, writing at least a portion of the fifth user data to the fifth data frame; 4. The magnetic disk drive according to claim 3, wherein if the fifth data frame does not have the header, the magnetic disk drive adds the header to the fifth data frame and writes at least a part of the fifth user data.

7. a user-specified sector indicated by the LBA of the first block of the write destination of the user data included in the write command received from the host, the number of blocks, and the block size; 2. The magnetic disk drive according to claim 1, further comprising a storage unit for storing a correspondence between the user data and an identification number (sector number) of a data frame on the disk to which the user data is written.

8. 8. The magnetic disk drive according to claim 7, wherein the storage unit is in a system area of ​​the disk.

9. Obtain information on a user-specified sector of the read user data to be read from the read command received from the host; obtaining a sector number of a destination for writing the read user data from the user-specified sector and the correspondence relationship; obtaining the read user data from the sector number; 8. The magnetic disk drive according to claim 7, wherein the acquired read user data is output to the host.

10. A method for writing data to a magnetic disk device using an SMR system, comprising the steps of: A method for writing user data to a disk by adding a header such as a preamble to each data frame, which is a data area in a track of a disk and includes a plurality of blocks, to which the user data is written.

Citation Information

Patent Citations

  • Durable file system for sequentially written zoned storage

    US20170124104A1

  • Compression and formatting of data for data storage systems

    US9448738B2

  • Magnetic recording tracks with consolidated timing fields and no inter-sector gaps

    US9601142B1