Magnetic disk device and data control method

By adding preambles and other headers to the tracks of the SMR disk device and changing the writing format, the problem of low data writing efficiency in the SMR disk device is solved, and more efficient data writing and media use are achieved.

CN119479709APending Publication Date: 2025-02-18KK TOSHIBA +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311777812.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-08-10
Filing Date
2023-12-22
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

In disk devices using tiled magnetic recording (SMR) technology, track data needs to be frequently rewrite, resulting in low data writing efficiency and difficult to effectively solve this problem in the prior art.

Method used

In the track of the disk device, headers such as preambles are attached to each data area to write user data to the disk, and change the writing format to improve writing efficiency.

Benefits of technology

By changing the write format, the data writing efficiency of the disk device is improved, the blank period during the write process is reduced, the loss of format efficiency is avoided, and more efficient media use is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119479709A_ABST
    Figure CN119479709A_ABST
Patent Text Reader

Abstract

According to one embodiment, the invention relates to a magnetic disk device and a data control method using SMR recording (shingled magnetic recording) technology. According to one embodiment, a magnetic disk device based on a shingled magnetic recording (SMR) method is provided, and the magnetic disk device writes user data to a disk by adding a header such as a preamble to each of data frames including a plurality of blocks, which are data regions in which the user data is written, in a disk track.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority based on Japanese Patent Application No. 2023-130849 (filing date: August 10, 2023). This application incorporates all the contents of the basic application by reference. Technical Field

[0002] The present embodiment generally relates to a magnetic disk device and a data control method using SMR recording (shingled magnetic recording) technology. Background Art

[0003] Magnetic disk devices using the Shingled Magnetic Recording (SMR) recording method achieve increased disk capacity by overlapping adjacent tracks. In the SMR method, when writing data to a track, it is necessary to rewrite all the data of multiple tracks in the same band, and it is necessary to temporarily save the track data in a cache area, etc. Summary of the invention

[0004] In one embodiment, a magnetic disk device based on the SMR method adds a header such as a preamble to each data frame including a plurality of blocks as a data area for writing user data in a track of the disk, and writes the user data to the disk.

[0005] According to one embodiment, it is possible to provide a magnetic disk device and a data control method for changing a writing format to a magnetic disk. BRIEF DESCRIPTION OF THE DRAWINGS

[0006] Figure 1 This is a block diagram showing the configuration of the magnetic disk device according to the first embodiment.

[0007] Figure 2 This is a schematic diagram showing an example of data structure of tracks in the magnetic disk according to the first embodiment.

[0008] Figure 3 This is a schematic diagram showing an example of data configuration of a magnetic disk according to the first embodiment.

[0009] Figure 4 This is a flowchart showing the processing performed when the magnetic disk device according to the first embodiment receives a write command.

[0010] Figure 5 This is a diagram showing an example of a management table indicating the relationship between user-specified sectors and sectors when the magnetic disk device according to the first embodiment receives and processes a write command.

[0011] Figure 6 This 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.

[0012] Figure 7 This is a flowchart showing the processing performed when the magnetic disk device according to the second embodiment receives a read command.

[0013] Description of symbols

[0014] 1 magnetic disk device (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 read / write (R / W) channel, 105 driver IC, 106 memory, 107 storage unit. DETAILED DESCRIPTION

[0015] Hereinafter, embodiments of the present invention will be described with reference to the drawings.

[0016] (First embodiment)

[0017] In this embodiment, an example of a magnetic disk device is described which performs format conversion on data in a user-specified sector specified by a write command received from a host and writes the data to a disk.

[0018] Figure 1 This is a functional block diagram of the magnetic disk device according to the first embodiment.

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

[0020] The disk 11 is a disk-shaped magnetic rotating disk storage medium, and a data area where data can be written (sometimes also referred to as "write") is allocated with a user data area that can be used by a user, a system area where information required for system management is written, a medium cache area that can temporarily store various data, etc. Hereinafter, the direction orthogonal to the radial direction of the disk 11 is referred to as the circumferential direction. The disk 11 is mounted on a spindle 12 and is rotated by the drive of the spindle 12.

[0021] The disk 11 has a plurality of tracks set concentrically around the spindle 12 in the data area. In the figure, the plurality of tracks are shown as TR[i], TR[j] (i, j represent the numbers of any tracks, and are referred to as tracks TR unless otherwise specified). When reading and writing data on the disk 11, the head 16 is moved to the track TR to be read or written through seek control, tracking control, etc., and the head 16 receives a read signal and / or outputs a write signal for the track TR. In addition, when otherwise specified, the data on the disk 11 is referred to as disk data, the data on the disk 11 to be read is referred to as read data, and the data to be written to the disk 11 is referred to as write data.

[0022] In addition, servo information is written on the disk 11 for use in detecting the position of the head 16. The servo information is set at a predetermined position (called a servo area) in the circumferential direction of the disk 11. The servo information is general in nature and a detailed description thereof is omitted. Figure 1 In the example of FIG. 1 , three servo areas SVA1, SVA2, and SVA3 (hereinafter referred to as servo areas SVA unless otherwise distinguished) are shown as examples of servo areas. Generally, the servo areas SVA are arranged at equal intervals in 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 through the servo information read by the head 16.

[0023] In addition, between the servo areas SVA of the disk 11 are areas for storing data such as user data, which are called data frames.

[0024] The spindle 12 is a support of the disk 11 and is provided in a housing or the like of the magnetic disk 1. When the spindle 12 rotates, the disk 11 rotates.

[0025] The VCM 13 is a voice coil motor type actuator for moving the arm 15 etc. The VCM 13 controls the operation of the arm 15 etc. based on the input current. In addition, although the example of the VCM 13 is shown in this embodiment, it is not limited to the voice coil motor type actuator.

[0026] The pivot shaft 14 is a bearing for supporting the arm 15 and the like and performing a rotational operation and the like.

[0027] The arm 15 is an arm that supports the head 16 , and transmits the power from the VCM 13 to the head 16 , thereby moving the head 16 to the target track TR.

[0028] The head 16 is a part that writes data to the disk 11 and / or reads data recorded on the data track of the disk 11. In the case of special distinction, the head that writes data to the disk 11 is called a write head 16W, and the head that reads data recorded on the data track of the disk 11 is called a read head 16R.

[0029] The control unit 101 is a hard disk controller that receives instructions from the host 2 and controls various parts of the magnetic disk device 1 based on the received instructions. The control unit 101 can be composed of hardware such as a processing device such as a CPU or a microprocessor, an IC chip having other processing devices, etc., or can be executed by a program of software (including firmware, etc.), or can be provided as hardware or a combination of software and hardware. For example, the control unit 101 receives instructions such as a write command to write data to the disk 11 and a read command to read data from the disk 11 from the host 2.

[0030] Various processes of the control unit 101 may be executed by a software (including firmware, etc.) program, or may be provided as hardware or software, or a combination thereof.

[0031] The communication unit 102 is connected via a cable or the like to exchange data with the host computer 2 .

[0032] 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 corresponding to the signal output from the R / W channel 104 to the head 16.

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

[0034] The driver IC 105 drives the SPM 12 , the VCM 13 , and the like according to control from the control unit 101 and the like, and outputs a current or a voltage for control.

[0035] The memory 106 is a semiconductor memory that loses the stored data when the power supply is cut off, and can also be used as a working memory of the control unit 101, etc. The memory 106 is, for example, a DRAM (Dynamic Random Access Memory) or an SDRAM (Synchronous Dynamic Random Access Memory). The memory 106 can also have a buffer area for temporarily storing instructions received by the magnetic disk device 1 from the host system 2, etc.

[0036] The storage unit 107 is a semiconductor memory that records stored data even when the power supply is cut off. The storage unit 107 stores data and programs required 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, flash read only memory: FROM).

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

[0038] Figure 2 This is a schematic diagram showing an example of data structure of tracks in the magnetic disk according to the first embodiment.

[0039] Figure 2 (a) is an example of a frame format of tracks, which are alternately allocated Figure 1 A servo area SVA and a data frame DR as a data area are shown. Figure 2 (b) is an example of further dividing a data frame DR1 into block units. 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 a command to the disk device 1 and send it. Figure 2 (c) shows the physical address on the magnetic disk 11 corresponding to the LBA.

[0040] Figure 3 This is a schematic diagram showing an example of data configuration of a magnetic disk according to the first embodiment.

[0041] Since the magnetic disk device 1 adopts the SMR method, adjacent tracks on the disk 11 overlap. Therefore, for example, when writing data to track TR[1], if there is original data in the adjacent track TR[2] in front of it (towards the center of the disk 11), the data needs to be rewritten. Therefore, when writing data to track TR[1] in the SMR method, it is necessary to temporarily copy the data of track TR[2] to the medium cache area of ​​the disk 11, and then write the data to track TR[1] after the backup. Furthermore, when writing data to track TR[2] in the same way, it is necessary to rewrite the data of the adjacent track TR[3] in front of it in the same way.

[0042] Therefore, for example, when writing data to track TR[1], it is necessary to write data again until there is no adjacent track in front (equivalent to TR[nt] in the figure). The set of adjacent tracks from track TR[1] to TR[nt] is called a band (equivalent to Band[1] in the figure). In addition, it is also possible to assume multiple bands on the disk 11, and the set of multiple bands is called a zone. In the figure, multiple bands are shown as Band[band identification number]. Since a guard band is set between adjacent bands, when writing data to band Band[1], for example, the influence on band Band[2] which is the adjacent band in front of it can be ignored. Hereinafter, writing to the disk 11 in band units is referred to as band writing.

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

[0044] An example of the processing operation of the magnetic disk device according to the present embodiment will be described below.

[0045] The SMR-type magnetic disk device 1 implements band writing based on, for example, a command sent from the host 2. The command includes the address of the starting block of the write destination (sometimes also referred to as the starting LBA) and the number of blocks. The sector in the area determined by the starting sector address and the number of blocks is called a user-specified sector. In addition, the size of the user-specified sector is called the user-specified sector size (sometimes also referred to as the user-specified block size). The user-specified sector size is the smallest unit of data that a user can specify when operating data. The user-specified sector size is not included in the command issued during operation and is usually a value set at the factory, but the user can also intentionally switch the setting from the host 2 or the like.

[0046] Sometimes the user specifies the sector size and Figure 2The data frame length (sector of the data area on the disk 11) shown is different. When writing write data to the disk 11, the firmware (referred to as FW) of the control unit 101 of this embodiment performs format conversion such as dividing and / or connecting the data of the sector size specified by the user in a manner consistent with the data frame length of the disk 11, and executes data writing to the disk 11.

[0047] When writing to disk 11 via tape writing, the data frame length sometimes changes due to segment conversion, etc. The control unit 101 follows the switching of the data frame length, changes the writing format (number of bits, etc.) of the received data in a manner consistent with the switched data frame length, and implements data writing.

[0048] Figure 4 This is a flowchart showing the processing performed when the magnetic disk device according to the first embodiment receives a write command.

[0049] The FW of the control unit 101 receives a write instruction including a write start LBA and a write block number (step S101). The control unit 101 selects the start physical address P[n] corresponding to the start LBA as the physical address for starting the write process (step S102). Assume that P[n] is in band [n]. The control unit 101 determines the data frame length F[n] based on the track information of the segment including the address P[n] (step S103).

[0050] 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 converted sector size (number of bits) Ls[n] becomes the same size as the data frame length F[n] (step S104). The control unit 101 calculates the write data length W[n] as the product of the write block number B[n] included in the received command and the user-specified sector size Lus, as W[n]=B×Lus (step S105). The write block number B[n] indicates the number of write blocks included in the band Band[n].

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

[0052] The control unit 101 starts writing data of the number of sectors Ns[n] from P[n] and checks whether it converges to the band Band[n] (step S107). In step S107, for example, the number of blocks from P[n] to the last block of the band Band[n] is set to b[n], and the control unit 101 checks whether the condition Ns[n]-b[n]≦0 is satisfied. If the condition is satisfied in step S107 (step S107: Yes), the control unit 101 performs band writing of the number of blocks b[n] starting from the address P[n] with the sector size Ls[n] (step S108).

[0053] On the other hand, if the condition is not satisfied in step S107 (step S107: No), the control unit 101 writes the band of the number of blocks b[n] with the sector size Ls[n] from the address P[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 n=n+1, for example, and sets B[n] and P[n] to B[n]=(Ns[n]-b[n])×Ls[n] / Lus, P[n]=the starting address band of the next band, and executes the processing from step S102. Thereafter, the control unit 101 repeats the above processing until the writing of the data of the write data length W[n] is completed, and the writing of the write data to the medium disk 11 based on the command of the received instruction is completed.

[0054] Through the above-mentioned processing, when the disk device 1 receives the third instruction including the write command of the third user data, if it is impossible to write all of the third user data to the first band Band[i] (i is the identification number of the band), it selects the third data frame DR of the second band Band[j] (j is the identification number of the band) that can be written, and if the third data frame DR3 has a header, writes at least a portion of the third user data to the third data frame DR. In addition, if the third data frame DR has no header, a header is added to the third data frame DR, and at least a portion of the third user data is written. In addition, in the present embodiment, an example is shown assuming that the data frame length of the data frame DR is switched for each band, but in the case of switching for each segment, it is also possible to switch the data frame length for each band by using the same method as described above. Figure 4 The same processing as the flowchart is performed.

[0055] For example, when the disk device 1 receives the fourth instruction including a write command for the fourth user data, if it is impossible to write all of the fourth user data into the first segment Zone[i] (i is the identification number of the segment), it selects the fourth data frame of the second segment Zone[j] (j is the identification number of the segment) that can be written, and if the fourth data frame DR has a header, writes at least a portion of the fourth user data into the fourth data frame DR; if the fourth data frame DR does not have a header, it adds the header to the fourth data frame DR and writes at least a portion of the fourth user data.

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

[0057] In this embodiment, data is not written to the disk 11 as it is in the user-specified sector size, but the write sector size as the write unit to the disk 11 is set to the data frame length of the disk 11. That is, the control unit 101 converts the address of the data in the format of the user-specified sector size into a format based on the data frame length of the disk 11 and writes it. For example, the control unit 101 divides or connects each user-specified sector defined by the user-specified sector size in a manner consistent with the data frame length, changes it to an address converted by the sector size with the changed bit number, and performs address management.

[0058] When reading the data written as described above, the correspondence between the user-specified sector sent by the host 2 and the address on the disk 11 to which the data is written is required.

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

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

[0061] Figure 5 (a) is an example in which the writing unit to the disk is set to the unit of the user-specified sector specified by the command received from the host 2, which corresponds to the writing example of the magnetic disk device based on the conventional method.

[0062] Figure 5(b) is an example of a case where the writing unit to the disk 11 of this embodiment is set as a data frame unit. In addition, in this embodiment, when writing data to the track at the first end of a certain tape for the first time (when there is no influence of writing on other tracks at all), it is also possible to perform a data frame-based write operation. Figure 5 (a) can be used when writing to other tracks in the next write operation if there is any impact of writing on other tracks. Figure 5 Writing is performed by the method of this embodiment shown in (b).

[0063] Figure 5 (c) is a sector management table showing the correspondence between the user-specified sector designated by the command received from the host 2 and the write sector (data frame unit) written to the disk 11. Figure 5 (a) The data of the user-specified sector size U-Sct1 to U-Sct5 is written to Figure 5 (b) The sector management table may also be stored in the system area of ​​the disk 11, the memory 106, etc. For example, the sector management table may also be a correspondence between a user-specified sector (including the LBA and block number of the start block) as the write destination of the user data contained in the write command received from the host and an identification number (sometimes also referred to as a sector number) of a data frame on the disk where the user data is written.

[0064] Figure 6 This 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.

[0065] Figure 6 (a) is a diagram schematically showing a state in which the user-specified sector size U-Sct and the corresponding write data Data included in the command received by the magnetic disk device 1 from the host 2 are temporarily stored in the cache of the memory 106 or the like. The U-Sct and Data with the same numbers assigned to the symbols are represented as a group, for example, it means that the data Data1 is written with the user-specified sector size U-Sct1 specified by the user, and the data Data3 is written with the user-specified sector size U-Sct3. In the present embodiment, it is assumed that the write command and the read command are made with separate commands for each group of U-Sct and Data, but it is also possible to specify five groups of U-Sct and Data with one command.

[0066] Figure 6 (b) shows the sector area on the disk 11 and the state of storing data in the data area when performing band writing with a user-specified sector size such as 4kn, 512e, etc., similarly to the conventional SMR method and CMR magnetic disk device (referred to as the conventional method).

[0067] like Figure 6 As shown in the track TR of (b), the track is divided into a servo area and a data area. In the conventional method, since the data area is written with the size of the user-specified sector, sometimes writing is performed across the servo area, such as U-Sct2, U-Sct3, and U-Sct4. The write gate GT indicates the writing timing (ON / OFF) of the data. As shown in the write gate GT, when the data of different user-specified sectors are written into the same data frame, a blank period (sector gap) such as processing delay will be generated between the different user-specified sectors.

[0068] 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 each given a header such as a preamble and a synchronization code (SyncMark) and stored in the data frame. As shown in the data DT, in the conventional magnetic disk device, continuous sectors and divided sectors without servo are present at a considerable rate, which loses the format efficiency. In addition, when the amount of data that can be stored in the data frame (the written sector of the disk 11) is different due to differences in BPI (Bit Per Inchi) such as differences in the head, the segment or the position of the track on the disk 11, the above-mentioned loss of efficiency also occurs.

[0069] Figure 6 (c) shows the sector area on the disk 11 and the state of data stored in the data area when the tape writing according to the present embodiment is executed.

[0070] As shown in track TR, in the band writing of the present embodiment, when writing, the user-specified sector size U-Sct is converted into the size of the sector area of ​​the disk 11 (equivalent to the data frame length), and writing is performed with the converted sector size. Therefore, as shown in the write gate GT, no blank period (sector gap) is generated between different user-specified sectors. That is, as shown in data DT, by pre-connecting and / or dividing different user-specified sectors, no gap is generated in the data frame of the disk 11. For example, the data frame (Sct1) of the disk 11 contains all of Data1 and part of Data2. The rest of Data2 is written to the next data frame Sct2 together with a part of Data3. In the present embodiment, according to Figure 4 The processing flow chart of FIG. 1 converts the sector size written to disk 11 into the data frame length, thereby enabling Figure 6 (c) The data is written to the disk 11.

[0071] In addition, as shown in the data DT, in this embodiment, the data is given a header such as a preamble and a synchronization code (SyncMark) in a data frame length unit and stored in the data frame, so Figure 6 Compared with the conventional method shown in (b), the overhead caused by headers such as the preamble and the synchronization mark is reduced.

[0072] That is, the magnetic disk device 1 adds a header such as a preamble to each data frame and writes the user data to the magnetic disk 11. Alternatively, the magnetic disk device 1 may, for example, write the first user data to the first data frame according to the first instruction, and when there is free space in the first data frame where the user data can be written, perform processing as follows when receiving the second instruction.

[0073] That is, when the magnetic disk device 1 is instructed to write the second user data by, for example, the second command, the second user data is written from the physical address next to the last physical address of the written first user data in the first data frame. On the other hand, when the second user data cannot be written in its entirety in the first data frame, if the writable second data frame has a header, the remainder of the second user data is written in the writable area of ​​the second data frame, and if the second data frame has no header, a header is added to the writable area of ​​the second data frame and the remainder of the second user data is written.

[0074] According to this embodiment, since the user-specified sectors are divided or connected in such a way that the data frame length and the sector size are the same, there is no format loss due to the header data such as the preamble code and synchronization code of the continuous sectors without servo, and the sector gap due to the division of the sectors, so the area on the medium can be used without waste. In addition, by following the data frame length, the present embodiment can save data in a data frame format corresponding to the difference in data frame length between tracks, bands, segments, etc.

[0075] (Second embodiment)

[0076] In this embodiment, an example is shown in which the host 2 reads data written to the disk 11 in the first embodiment. When reading data, data up to the sector containing data of the data length specified by the host 2 is read, and only necessary data is taken out and output to the host 2.

[0077] Figure 7 This is a flowchart showing the processing performed when the magnetic disk device according to the second embodiment receives a read command.

[0078] The FW of the control unit 101 receives a read instruction including a read start LBA and a read block number (step S201). The control unit 101 selects the start physical address P[m] corresponding to the start LBA as the physical address for starting the read process (step S202). Assume that P[m] is in Band[m]. The control unit 101 determines the data frame length F[m] based on the track information of the segment including the address P[m] (step S203).

[0079] The control unit 101 determines the converted sector size (number of bits) Ls[m] for reading from the disk 11 as Ls[m]=F[m] so that it becomes the same size as the data frame length F[m] (step S104). Ls[m] represents the sector size of the disk 11 read by the magnetic disk device 1. The control unit 101 calculates 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] represents the number of read blocks included in the band Band[m].

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

[0081] The control unit 101 reads data of the sector number Ns[m] from P[m], and checks whether all the reading will end in the band Band[m] (step S207). In step S207, for example, the number of blocks from P[m] to the end of the band Band[m] is set to b[m], and the control unit 101 checks whether the condition Ns[m]-b[m]≦0 is satisfied. If the condition is satisfied in step S207 (step S207: Yes), the control unit 101 reads the block number b[m] from the address P[m] with the sector size Ls[m] (step S208). In step S208, the control unit 101 saves the read data in the buffer area of ​​the memory 106 or the like.

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

[0083] In step S212, for example, the control unit 101 sets m=m+1, sets B[m] and P[m] to B[m]=(Ns[m]-b[m])×Ls[m] / Lus, and P[m]=the start address band of the next band, and executes the processing from step S202. Thereafter, the control unit 101 repeats the above processing until the reading of the data of the read data length R[m] is completed, and the reading of the read data from the medium disk 11 based on the command received is completed. That is, the 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].

[0084] Through the above steps, after all the data specified by the command is read, the read data stored in the buffer area of ​​the memory 106 is converted into the sector size specified by the user and output to the host. Figure 5 (b) format, so in order to output to the host 2, it is necessary to convert it into the format when writing the corresponding data from the host 2 (equivalent to Figure 5 (a) format).

[0085] 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). Figure 4 The sector management table (for example, Figure 5 (c)), based on the corresponding relationship in the sector management table, Figure 5 The data stored in the memory 106 in the format of (b) is converted into the format of the host 2 ( Figure 5 (a) format).

[0086] After completing the conversion to the format of the host 2, 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, and only takes out the required data (data with the header removed) and reports it to the host.

[0087] Through the above steps, the host 2 can read the data written to the disk 11 by the first embodiment. More specifically, the magnetic disk device 1 obtains information of the user-specified sector of the writing destination of the read user data to be read according to the read command received from the host 2. The magnetic disk device 1 obtains the sector number of the writing destination of the read user data based on the obtained user-specified sector and the corresponding relationship indicated in the sector management table, obtains the read user data from the disk based on the sector number, and outputs the obtained read user data to the host.

[0088] According to the above-described embodiments, a magnetic disk device and a data control method are provided for changing a writing format to a magnetic disk.

[0089] In this embodiment, if Figure 1 As shown, an example of writing and reading data in a magnetic disk device 1 having one head 16 and one disk 11 is shown, but data can also be written and read based on the same processing in a magnetic disk device with multiple heads and multiple disks in which multiple heads 16 and multiple disks exist.

[0090] For example, when the data frame length of a magnetic disk device with multiple disks based on the method of this embodiment changes due to a head change, a segment change, etc. during writing, the device follows the switch of the data frame length each time, divides or connects each user-specified sector in a manner consistent with the data frame length after the switch, changes the number of bits, and switches the size of the write sector to perform writing.

[0091] In addition, when the data frame length changes due to head changes, segment changes, etc. during reading, the magnetic disk device with multiple disks based on the method of this embodiment follows the switching of the data frame length each time, divides or connects each user-specified sector in a manner consistent with the data frame length after the switch, changes the number of bits, and switches the size of the read sector to perform reading.

[0092] For example, in a magnetic disk device with multiple disks based on the method of the present embodiment, when, for example, a fifth instruction including a write command for the fifth user data is received and the fifth user data is being written to the third zone Zone[i] (i is an identification number of the zone) on the first disk through the first head and is switched to the second head in the middle of the process, if the fifth data frame of the fourth zone Zone[j] (j is an identification number of the zone) of the second disk corresponding to the second head has a header, at least a portion of the fifth user data is written to the fifth data frame; if the fifth data frame does not have the header, the header is attached to the fifth data frame and at least a portion of the fifth user data is written.

[0093] In a magnetic disk device with multiple heads and multiple disks, if the amount of data that can be stored in a data frame (sector written to the disk 11) is different due to a difference in BPI, for example, depending on a difference in the position of the head, a considerable proportion of continuous sectors or split sectors that are not sandwiched by servo exist, resulting in a loss of format efficiency. According to the method of this embodiment, by converting data composed of a format specified by the host 2 (including user-specified sectors) into the format of the data frame of the disk 11 and writing it to the disk 11, even if it is applied to a magnetic disk device with multiple heads and multiple disks, format loss caused by continuous sectors or split sectors that are not sandwiched by servo does not occur, so that the area on the medium can be used without waste.

[0094] The magnetic disk device 1 may have any combination of one or more of the following features. (A-1) For example, Figure 6 As shown in data DT (c), the magnetic disk device 1 divides (in the example of Data2) or connects (in the example of Data2 and Data3) the data of each user-specified sector in such a way that the write sector size written to the disk during writing becomes the data frame length, and writes are performed by changing the number of bits without adding a header.

[0095] (A-2) For example, Figure 7 As shown in step S205, when reading data, the magnetic disk device 1 performs reading based on the sector size (data frame length) at the time of writing obtained from the information of the user-specified sector specified by the read command.

[0096] (A-3) When the data frame length changes due to a head change, a segment change, etc. during writing, a magnetic disk device with multiple disks based on the method of this embodiment follows the switching of the data frame length each time, divides or connects each user-specified sector in a manner consistent with the data frame length after the switch, changes the number of bits, and switches the data frame length of the write sector to perform writing.

[0097] (A-4) When the data frame length changes due to a head change, a segment change, etc. during reading, a magnetic disk device with multiple disks based on the method of this embodiment follows the switching of the data frame length each time, divides or connects each user-specified sector in a manner consistent with the data frame length after the switch, changes the number of bits, and switches the data frame length of the read sector to perform reading.

[0098] (A-5) For example, Figure 7 As shown in step S210, when reading data, the magnetic disk device 1 reads data up to the sector including the data of the user-specified sector specified by the read command, and takes out only the required data (data with the header removed) and reports it to the host.

[0099] (A-6) The magnetic disk device 1 divides or connects each user-specified sector in accordance with the LBA defined by the block size specified by the user so as to match the data frame length, and changes the address to the address converted by the sector size with the changed bit number.

[0100] (A-7) The magnetic disk device 1 divides or connects each user-specified sector in accordance with the data frame length based on the LBA defined by the block size specified by the user, and stores the address converted by the sector size with the changed bit number in the system area.

[0101] (A-8) The magnetic disk device 1 divides or connects each user-specified sector in accordance with the LBA defined by the block size specified by the user so as to match the data frame length, and manages the address converted by the sector size with the changed bit number.

[0102] In addition, the present invention is not limited to the above-mentioned embodiments as they are. In the implementation stage, the constituent elements can be deformed and concretized within the scope of the main purpose. In addition, various inventions can be formed by appropriately combining the multiple constituent elements disclosed in the above-mentioned embodiments. For example, several constituent elements can be deleted from all the constituent elements shown in the embodiments. Moreover, the constituent elements in different embodiments can also be appropriately combined. In addition, the processing steps shown in the flowcharts, timing diagrams, etc. shown in the above-mentioned embodiments are within the scope of the main purpose of the present invention, even if the order of the steps is changed, deleted, or steps are added, etc., it is also within the scope of the present invention.

[0103] The processing shown in the flowchart, timing chart, etc. can also be implemented by software (program, etc.) operated by a computer including hardware such as a CPU, IC chip, digital signal processor (Digital Signal Processor or DSP) or a microcomputer, or a combination of hardware and software.

[0104] In addition, the device of the present invention can also be applied when the claims are expressed as control logic, when expressed as a program containing instructions for causing a computer to execute, and when expressed as a computer-readable recording medium recording the instructions. In addition, there is no limitation on the names and terms used, and even other expressions are included in the present invention as long as they are substantially the same content and the same purpose.

Claims

1. A magnetic disk device based on a shingled magnetic recording method, i.e., an SMR method, In a track of a disk, user data is written to the disk by adding a header such as a preamble to each data frame. The data frame is a data area in which the user data is written and includes a plurality of blocks.

2. The magnetic disk device according to claim 1, After the first user data is written into the first data frame according to the first command, if there is free space in the first data frame for writing the user data, When a command to write the second user data is issued by a second command, the second user data is written from a physical address next to the last physical address of the first user data in the first data frame.

3. The magnetic disk device according to claim 2, When all of the second user data cannot be written into the first data frame, When the writable second data frame has a header, writing the remainder of the second user data into a writable area of ​​the second data frame, When the second data frame has no 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. The magnetic disk device according to claim 3, A plurality of bands as groups of tracks are set on the disk. When receiving a third instruction including a command to write the third user data, if all of the third user data cannot be written to the first band, a third data frame of the second band that can be written is selected, When the third data frame has a header, writing at least a portion of the third user data into the third data frame, When the third data frame has no header, a header is added to the third data frame, and at least a part of the third user data is written.

5. The magnetic disk device according to claim 3, A plurality of segments as groups of bands are set on the disk, When receiving a fourth instruction including a command to write fourth user data, if all of the fourth user data cannot be written into the first sector, a fourth data frame of the second sector that can be written is selected, When the fourth data frame has a header, writing at least a portion of the fourth user data into the fourth data frame, When the fourth data frame has no header, the header is added to the fourth data frame, and at least a portion of the fourth user data is written.

6. The magnetic disk device according to claim 3, With multiple heads and corresponding multiple disks, When receiving the fifth instruction including a command to write the fifth user data and switching to the second head in the middle of writing the fifth user data to the third session on the first disk by the first head, When the fifth data frame of the fourth sector of the second disk corresponding to the second header has a header, at least a part of the fifth user data is written into the fifth data frame, When the fifth data frame does not have the header, the header is added to the fifth data frame, and at least a part of the fifth user data is written.

7. The magnetic disk device according to claim 1, A storage unit is provided for storing the correspondence between user-specified sectors and sector numbers, wherein the user-specified sectors are represented by the LBA, number of blocks, and block size of the starting block of the write destination of the user data contained in the write instruction received from the host, and the sector number is an identification number of the data frame on the disk into which the user data is written.

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

9. The magnetic disk device according to claim 7, According to the read command received from the host, the information of the user-specified sector of the read user data to be read is obtained. According to the user-specified sector and the corresponding relationship, the sector number of the writing destination of the read user data is obtained, Obtain the read user data according to the sector number, The acquired read user data is output to the host.

10. A data control method for writing data to a magnetic disk device based on an SMR method. In a track of a disk, user data is written to the disk by adding a header such as a preamble to each data frame. The data frame is a data area in which the user data is written and includes a plurality of blocks.

Citation Information

Patent Citations

  • Sensor

    JP2023130849A