Magnetic disk device and writing method
By introducing power-off protection function in the disk device, the problem of generating free bands during sequential writing in the prior art is solved, and bypass writing without using free bands is realized, writing efficiency is improved and data loss is avoided .
Patent Information
- Application Number
- CN202410072708.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-08-14
- Filing Date
- 2024-01-18
- Publication Date
- 2025-02-21
AI Technical Summary
When existing disk devices perform sequential writes, they need to generate free bands for bypass writes, resulting in increased access time and media cache consumption.
By introducing the power-off protection (PLP) function in the disk device, the volatile memory receives the data to be written and saves the unwritten data to the non-volatile memory in the event of an unexpected power outage, avoiding the Generate the requirement of free belts.
Bypass writing without using idle bands is realized, writing efficiency is improved, and data loss is avoided during power outage.
Smart Images

Figure CN119495325A_ABST
Abstract
Description
[0001] This application enjoys the priority of Japanese patent application No. 2023-131952 filed on August 14, 2023, and the entire contents of the Japanese patent application are cited in this application. Technical Field
[0002] The present embodiment generally relates to a magnetic disk device and a writing method using shingled magnetic recording (SMR) technology. Background Art
[0003] In a drive-managed SMR hard disk drive (hereinafter referred to as a disk device), a bypass write method is adopted in which sequential write data sent from a host is directly written into a tile recording area without passing through a media cache.
[0004] The bypass write method is a method in which, for the purpose of data protection during power outages, data is not overwritten on the band (the writing unit of a disk device in a watt recording method) that is the writing object, but a free band is generated at another location (by moving the data from a band that already has data to another area such as a media cache to make it a band in which new data can be written) and data is written there separately. Summary of the invention
[0005] One embodiment has a magnetic disk device that records data in a shingle recording manner. When sequential writing is performed on a shingle recording area on the magnetic disk, data to be written to a write target track and data arranged on a track in front of the write target track are received on a volatile memory, and then writing is performed on the write target track. When an unexpected power failure occurs, data that has not been written to the shingle recording area among the data received on the volatile memory is stored in a non-volatile memory.
[0006] According to one embodiment, it is possible to provide a magnetic disk device and a writing method that perform bypass writing without using a spare band. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Figure 1 This is a block diagram showing the hardware configuration of the magnetic disk device according to the first embodiment.
[0008] Figure 2 This is a schematic diagram showing an example of arrangement of tracks and data on a magnetic disk according to the first embodiment.
[0009] Figure 3 This is a schematic diagram showing an example of area arrangement on a magnetic disk according to the first embodiment.
[0010] Figure 4This is a schematic diagram showing an example of overlapping tracks of shingle recording on a magnetic disk according to the first embodiment.
[0011] Figure 5 This is a schematic diagram showing an example of a sub-area (sub-domain) in a data area on a magnetic disk according to the first embodiment.
[0012] Figure 6 This is a schematic diagram showing an example of use of the media cache on the disk according to the first embodiment.
[0013] Figure 7 This is a first schematic diagram showing an example of a data writing process to a magnetic disk in the magnetic disk device according to the first embodiment.
[0014] Figure 8 This is a second schematic diagram showing an example of a data writing process to a magnetic disk in the magnetic disk device according to the first embodiment.
[0015] Fig. 9 This is a third schematic diagram showing an example of a data writing process to a magnetic disk in the magnetic disk device according to the first embodiment.
[0016] Fig.10 This is a fourth schematic diagram showing an example of a data writing process to a magnetic disk in the magnetic disk device according to the first embodiment.
[0017] Fig.11 This is a schematic diagram showing an example of a buffer for bypass write processing in the magnetic disk device according to the first embodiment.
[0018] Fig.12 This is a diagram showing an example of a management table for bypass write processing in the magnetic disk device according to the first embodiment.
[0019] Fig.13 This is a schematic diagram showing an example of data written to a track by a bypass write process in the magnetic disk device according to the first embodiment.
[0020] Fig.14 This is a schematic diagram showing an example of data storage processing performed by the magnetic disk device according to the first embodiment using the PLP function.
[0021] Fig.15 This is a flowchart showing an operation example of the bypass write process of the magnetic disk device according to the first embodiment.
[0022] Fig.16 This is a schematic diagram showing an example of a data writing process to a magnetic disk in the magnetic disk device according to the second embodiment.
[0023] Description of symbols
[0024] 1 disk device; DK disk; 2 magnetic head; 3 spindle motor; 4 voice coil motor (VCM); 5 actuator; 6 motor driver; 7 head IC; 8 read / write IC; 9 gate array; 10 disk controller (HDC); 11 buffer RAM; 12 CPU bus; 13 RAM; 14 flash ROM; 15 CPU; 20 host system; 21 servo block; 22 read / write block; 23 host block; 24 read / write block; 25 buffer block. DETAILED DESCRIPTION
[0025] Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0026] (First embodiment)
[0027] This embodiment shows an example of a magnetic disk device of a memory using a power loss protection (PLP) function in a bypass write process of shingled magnetic recording (SMR). More specifically, when the magnetic disk device is powered off, the unwritten data is backed up using the PLP function.
[0028] Figure 1 This is a block diagram showing the hardware configuration of the magnetic disk device according to the first embodiment.
[0029] The magnetic disk device 1 is a storage device for writing or reading data on the surface of the magnetic disk DK according to a request from the host system 20. The magnetic disk device 1 is a drive-managed SMR magnetic disk device that adopts a recording method that overlaps writing of a part of adjacent tracks, that is, an SMR method. The drive-managed SMR refers to an SMR method in which the data writing position to the magnetic disk DK is managed on the magnetic disk device side. In addition, the magnetic disk device 1 has a PLP function that writes a part of the data in the buffer RAM 11 to the flash ROM 14 when the power is lost.
[0030] The magnetic disk DK is a disk-shaped magnetic rotating disk storage medium, fixed to a spindle motor (SPM) 3, and driven by the SPM 3 to rotate at a constant speed. Details will be described later.
[0031] The magnetic head 2 is fixed to one end of the actuator 5, and the other end of the actuator 5 is fixed to the voice coil motor (VCM) 4. The magnetic head 2 moves in a range overlapping with the surface of the magnetic disk DK in a circular arc track centered on the axis of the VCM 4 by being driven by the VCM 4. The magnetic head 2 is a head that outputs a write signal to the magnetic disk DK to write data and reads data from the magnetic disk DK to be taken out as a read signal.
[0032] Figure 1The magnetic disk device 1 shown in FIG. 1 shows an example of a situation in which a magnetic disk DK and a magnetic head 2 are provided, but it can also be a structure consisting of a plurality of magnetic disks and a plurality of magnetic heads (referred to as a multi-disk, etc.). In this case, a plurality of magnetic disks DK are fixed to the SPM 3 in a state of overlapping with a certain gap, and a plurality of magnetic heads 2 and an actuator 5 are fixed to the VCM 4 in a state of overlapping in accordance with the gaps of the magnetic disks. Therefore, all magnetic disks DK rotate at the same time, and all magnetic heads 2 move at the same time. In addition, there is also a situation in which the magnetic head 2 is configured on both the front and back sides of the magnetic disk DK.
[0033] The spindle motor (SPM) 3 is a support of the magnetic disk DK, and is provided in a housing or the like of the magnetic disk device 1. The magnetic disk DK rotates when the spindle motor 3 rotates.
[0034] The voice coil motor (VCM) 4 controls the operation of the actuator 5 and the like based on the input current.
[0035] The magnetic head 2 is fixed to one end of the actuator 5, and the other end of the actuator 5 is fixed to the VCM 4. In addition, although the actuator 5 of this embodiment is controlled by the VCM 4, the operation control of the actuator 5 is not limited to the voice coil motor.
[0036] The motor driver 6 controls the SPM 3 and the VCM 4 based on a control signal from the CPU 15 .
[0037] In addition, the motor driver 6 is also responsible for supplying power generated by the back electromotive force of the SPM 3 using the inertia moment of the disk DK as an energy source to each LSI for a certain period of time when power loss is detected during the rotation of the SPM 3. At this time, the CPU 15 writes part of the data in the buffer RAM 11 to the flash ROM 14 as one of the power loss processing. This function is generally called the power loss protection (Power Loss Protection, PLP) function.
[0038] The head IC 7 is, for example, an IC (Integrated Circuit) that amplifies an analog signal (read signal) read by the magnetic head 2 and outputs it to the read / write IC 8 , and outputs a write signal (write signal) received from the read / write IC 8 to the magnetic head 2 .
[0039] The read / write IC 8 is, for example, an IC that outputs write data (write data) to the magnetic disk DK to the head IC 7 and obtains read data (read data) from the magnetic disk DK based on an analog signal received from the head IC 7. The read / write IC 5 is mainly divided into a servo block 21 that performs signal processing required for positioning processing of the magnetic head DK and a read / write block 22 that performs signal processing for reading / writing data.
[0040] The gate array 9 represents hardware such as an IC that generates many signals for control. The function of the gate array 9 may be executed by software or by a combination of hardware and software.
[0041] The disk controller (HDC) 10 can be composed of hardware such as an IC chip with computer functions such as a microprocessor and / or software. In addition to being connected to the CPU bus 12, the disk controller (HDC) 10 is also connected to the gate array 9, the buffer RAM 11, and the read / write IC 8. In addition, the HDC 10 is divided into a host block 23 that performs interface control with the host system 20, a buffer block 25 that controls the buffer RAM, and a read / write block 24 that is connected to the read / write IC 8 and the gate array 9 and performs read / write processing.
[0042] When the magnetic disk device 1 receives a read command (read command) from the host system 20 and reads the data of the magnetic disk DK, the magnetic head 2 reads the analog signal from the magnetic disk DK and outputs it to the head IC7. The analog signal amplified by the head IC7 is separated into a servo signal and a data signal by the read / write IC8, and the data signal is decoded by the read / write block 22 and sent to the HDC10. The HDC10 processes the received data signal according to various signals for control from the gate array 9 to generate data to be transmitted to the host system 20 (for example, the read data requested by the read command). The data is temporarily stored in the buffer RAM11 and then transmitted to the host system 20.
[0043] When the magnetic disk device 1 receives a write command (write command) from the host system 20 and writes data to the magnetic disk DK, the write data transmitted from the host system 20 to the HDC 10 is temporarily stored in the buffer RAM 11, and then sent from the HDC 10 to the read / write IC 8 according to various signals for control from the gate array 9. The write data encoded by the read / write IC 8 is written to the magnetic disk DK by the magnetic head 2 via the head IC 7.
[0044] The buffer RAM 11 is a volatile memory that loses stored data when power is cut off, and temporarily stores data of a write command from the host system 20 . A part of the buffer RAM 11 is used as a buffer for bypass write processing of the magnetic disk device 1 .
[0045] The CPU bus 12 is a bus for data transmission, and is connected to a RAM 13 for variables, a flash ROM 14 recording a program to be executed by the CPU 15, a read / write IC 8, a gate array 9 for generating a plurality of control signals, and a disk controller (HDC) 10.
[0046] The flash ROM 14 can be rewritten under the control of the CPU 15. The flash ROM 14 also includes a dedicated area for storing data by the PLP function.
[0047] The CPU 15 is a central processing unit, which controls the SPM 3 and the VCM 4 through the motor driver 6. On the other hand, it controls various functions of the entire device, such as the control of other ICs and / or command processing. The control registers of the read / write IC 8, the gate array 9, and the HDC 10 are respectively allocated as a part of the storage space of the CPU 15, and the CPU 15 controls them by reading and writing to the area. In addition, the CPU 15 controls the start / stop and rotation speed maintenance of the SPM 3 through the motor driver 6, and the positioning of the magnetic head DK is performed in a stable rotation state after the SPM 3 is started.
[0048] The host system 20 is, for example, a computer, and outputs a read command to the magnetic disk device 1 to obtain read data, or outputs write data together with a write command.
[0049] Figure 2 This is a schematic diagram showing an example of arrangement of tracks and data on a magnetic disk according to the first embodiment.
[0050] The disk DK is rotated by the SPM 3 about the rotation axis 203. The direction of disk rotation (the direction orthogonal to the radial direction (radial direction) of the disk DK) is called the circumferential direction. With respect to the radial direction, the direction from the rotation axis 203, which is the center of the disk DK, to the outside is called the outer circumference, and the direction from the outside toward the rotation axis 203 is called the inner circumference.
[0051] On the disk DK, a plurality of tracks 204 are arranged concentrically, and data received from the host system 20 is recorded in a part of them according to a designated address. Although four tracks TR1, TR2, TR3, and TR4 (referred to as tracks TR unless otherwise specified) are shown in the example of the figure, a plurality of tracks are set concentrically around the SPM 12.
[0052] Areas (servo areas) 201 for recording servo data signals for positioning and areas (data areas) 202 for recording data transmitted from a host system are alternately and evenly arranged on a track 204. As shown in servo areas 210 to 217, the servo areas are evenly arranged in the circumferential direction of the magnetic disk DK, and the data areas are arranged between the servo areas.
[0053] The magnetic head 2 reads analog signals from each servo area, the head IC 7 amplifies the analog signals, and the read / write IC 8 obtains data (called servo data) from the amplified analog signals. In the disk DK, the servo areas are arranged at equal intervals in the circumferential direction, and the servo data are also obtained at equal intervals in time.
[0054] The read / write IC 8 and the gate array 9 use the servo data to generate a signal (called a position control signal) for positioning the magnetic head 2. The CPU 15 controls the motor driver 6 based on the position control signal to flow a current for positioning the magnetic head 2 through the VCM 4 in real time.
[0055] When the magnetic disk device 1 performs data reading and writing (reading and writing) on the data area, the magnetic head 16 is moved on the target track TR through seek control, tracking control, etc., and a read signal is read from the magnetic head 16, or a write signal is output to the track TR. In the case of no particular distinction, the data on the magnetic disk DK is called disk data, the data on the magnetic disk DK to be read is called read data, and the data to be written to the magnetic disk DK is called write data.
[0056] Figure 3 This is a schematic diagram showing an example of area arrangement on a magnetic disk according to the first embodiment.
[0057] The data area where data can be written (sometimes referred to as write) is allocated with a user data area that can be used by the user (host system 20), a media cache area that temporarily stores user data, and a system area where information required for system management is written.
[0058] The disk DK is divided from the outer circumference into a system area 301, a media cache (MC) area 302, and a user data area 303. Only the user data area 303 is recorded in the SMR method. In addition, only the data area 202 is focused on here, so the servo area 201 is omitted.
[0059] The system area 301 records management information such as a defect map, an MC management table, and an SMR data management table.
[0060] The MC area 302 is used as a medium cache for temporarily writing data to be written in the user data area 303. In the SMR method, data of multiple tracks needs to be written at once, and in most cases, it is not possible to directly rewrite only the data to be updated by the write command received from the host system 20. Therefore, it is necessary to temporarily hold the command data, but the capacity of the buffer RAM 11 alone is limited, so an area on the disk DK is used for this purpose.
[0061] The user data area 303 is the area where the write data from the host system 20 is finally recorded. This area is recorded in SMR mode, and all logical block addresses (Logical Block Address, LBA) are assigned to any place in the area. In addition, the user data area 303 is also divided into multiple sub-areas (only 303a, 303b, and 303c are shown in the figure, but the number is not limited). The sub-areas in this embodiment correspond to constant density recording (Constant Density Recording, CDR) zones.
[0062] Figure 4 This is a schematic diagram showing an example of overlapping tracks of shingle recording on a magnetic disk according to the first embodiment.
[0063] The tracks on the disk DK are all annular, but here each track is schematically represented by a quadrilateral in the up-down direction (circumferential direction of the disk DK). In addition, the horizontal direction is equivalent to the radial direction of the disk DK, and the figure shows an example of the arrangement of multiple tracks TRi (i is an integer greater than 2). In addition, in the figure, the direction of writing to the disk DK (write direction) is set to be from left to right, and the track on the left is called the rear track, and the track on the right is called the front track.
[0064] The magnetic disk device 1 adopts the SMR method, and therefore, as shown in the figure, a part of the track is recorded in the data area in a state where it overlaps with the adjacent track. Therefore, the writing of the track is limited to one direction (the direction of the arrow), and it is impossible to return to the rear track for writing (due to overlap, the front data will be destroyed).
[0065] In the SMR method, when rewriting part of the data, it is necessary to return to the beginning ( Figure 4 The beginning of TR1 of ) is completely rewritten, so it is set to Figure 2 The tracks in the user data area 303 (or sub-areas 303a, 303b, 303c) are grouped, and gaps are set between the groups to write in groups. This group is called a band (brick band, SMR band). In the SMR method, since it is impossible to return to the track behind for writing, writing will not be performed with gaps between tracks, and writing within the band is always sequential (in one direction with respect to the track).
[0066] Figure 5 is a schematic diagram showing an example of a sub-area in a data area on a disk according to the first embodiment, Figure 3 Taking the sub-region 303a shown as an example, the data region is represented as a rectangle with the circumferential direction as the vertical direction and the diameter direction as the horizontal direction (the left side is the outer circumference and the right side is the inner circumference).
[0067] The sub-area 303a is divided into a plurality of bands, which become the writing units of the data area. Writing to a band is particularly referred to as band writing (tile writing). In addition, for simplicity, bands 0 to 4 are shown in the figure as an example of a case where the number of bands is 5, but the number is not limited. If the number of bands is small, the writing unit will become larger, so many bands will be set in practice. In addition, the size (number of blocks) of all bands in the same sub-area is the same. The figure shows an example of configuring 5 tracks in each band, but the number is not limited.
[0068] Since a gap of a certain distance is provided between each band, for example, data in band 0 is not affected by writing to band 1 arranged before band 0.
[0069] In addition, LBAs are allocated in the order from the left band to the right band in the figure (for example, band 0, band 1, band 2). Therefore, the number of blocks allocated to one sub-region is "the number of bands in the region x the number of blocks per band".
[0070] Figure 6 is a schematic diagram showing an example of using the media cache on the disk according to the first embodiment. Figure 3 An example of use of the media cache area 302 is shown. In this figure, the position further to the right is regarded as the front, and the position further to the left is regarded as the back.
[0071] All blocks in the media cache area 302 are fixedly assigned "MC intra-LBA" indicating LBA in the MC, and all management is performed using the MC intra-LBA. Figure 6 .
[0072] The MC records the data received from the host system 20 in order from the front, and each data is added with a header recording the start LBA, block number, etc. The header records the attribute information of the data (start LBA, block number, LBA in MC described later).
[0073] In MC, such header data is recorded sequentially from the beginning in the order in which the commands are received, and basically the data is moved to the data area in order from the oldest data. Figure 3 data area 303). Figure 6 This shows an example in which data 0, 1, and 2 are written to the medium cache area 302 based on three commands, and the data 0, 1, and 2 are stored with headers 0, 1, and 2 added thereto, respectively.
[0074] In addition, after the MC is used to the end (the maximum value of LBA in MC), it is returned to the beginning for use again. In this way, the MC area is handled like a FIFO (First In First Out) of a circular buffer, and the amount of data is calculated from the beginning of the oldest data in the MC LBA (LBA in the figure). mB ) to the end of the latest data in the MC LBA (L mE ) is expressed as the difference between .
[0075] Furthermore, in practice, the movement of data to the data area is not always limited to the oldest data. For example, there is a case where data 1 is moved to the MC before data 0. However, in this case, the apparent usage amount does not change.
[0076] In addition, if the amount of data in MC increases during operation and the free area becomes too small, a free area has to be generated when receiving a command, and the command responsiveness deteriorates. Therefore, the data is appropriately moved to the data area so that the amount of data in MC does not become too large. This is called the flushing process of MC. Since writing to the data area can only be performed in units of bands, the existing (pre-existing) data in the band of the move destination that has not been updated becomes an overwrite of the same data. For example, in the case where the flushing destination of data M in MC is block C of a band consisting of five blocks A, B, C, D, and E, the data A, B, M, D, and E are sequentially written to the band of the flushing destination. The data A, B, D, and E are prepared by reading the original data before writing. Regarding the flushing process of the media cache related to the update process of the data A, B, M, D, and E, the following is used Fig.10 To narrate.
[0077] The above describes the tape writing based on the SMR method. A method for improving the performance of the SMR method is bypass writing (hereinafter, sometimes referred to as BPW). Bypass writing is a common method. Simply put, it is a process used in the previous SMR method to write data received from the host system 20 directly to the tape in the data area without passing through the MC.
[0078] Figure 7 This is a first schematic diagram showing an example of data writing processing on a magnetic disk in the magnetic disk device according to the first embodiment, and shows a state before bypass writing is performed on one tile.
[0079] The sequential write buffer SB (sometimes also referred to as a SEQW buffer) secures a portion of the DRAM area (buffer RAM 11) as a dedicated area for sequential writing to the tile, and is used to temporarily accumulate write data from the host system 20. The SEQW buffer area is used as a ring buffer, and has an entry pointer (EntryPoint, EP) indicating the beginning of the received data and a flash pointer (FlashPoint, FP) indicating the beginning of the data written to the tile. For example, the figure shows that data is received in the order of A, B1, B2, C1, C2. In addition, the figure shows an example of a state in which three write commands A, B, and C are received in sequence and these data are stored in the SEQW buffer.
[0080] The flash pointer FP does not exceed the entry pointer EP, which means that the data between these two pointers (A, B1, B2, C1, C2 in the figure) has not been written to the tape. Therefore, in the event of an unexpected power outage, the data is saved in the flash ROM 14 through the PLP function.
[0081] In this figure, an example is shown in which a shoe tape is composed of three tracks (TR0, TR1, TR2), and each track is represented by a plane, and its end is continuous with the beginning. BT0, BT1, BT2 (represented as BT when not specifically distinguished) respectively represent the starting position of data written in tracks TR0, TR1, and TR2. In addition, the starting position BT of each track shifts forward as the track number increases due to track skew (position offset). That is, the starting position BT shifts forward in the order of TR0, TR1, and TR2. In addition, in the example of this figure, it is assumed that the data of the first track disappears due to tape writing.
[0082] The data B and C stored in the SEQW buffer are data to be written based on the write commands B and C, and are displayed separately as B1, B2 and C1, C2 according to the write destination tracks. It is planned that data A and B1 are written to track TR0, B2 and C1 are written to track TR1, and C2 is written to track TR2.
[0083] Figure 8 1 is a second schematic diagram showing an example of data writing processing to a magnetic disk in the magnetic disk device according to the first embodiment, and shows a state after writing to track TR0 is executed.
[0084] exist Figure 7 In the state, the data of two tracks TR0 and TR1 exist in the SEQW buffer, so it is possible to write to track TR0. This is because by writing A and B1 to track TR0, all the data of track TR1 disappears due to the tile writing, but the data to be written to track TR1 already exists in the SEQW buffer. Figure 8If an unexpected power failure occurs in the state, data B2, C1, and C2 are stored in the non-volatile memory, so data loss will not occur.
[0085] Fig. 9 This is a third schematic diagram showing an example of data writing processing to a magnetic disk in the magnetic disk device according to the first embodiment, and shows a state where bypass writing to one tile is completed.
[0086] Track TR1 data B2, C1 and Figure 8 The same is true for the data A and B1 of the track TR0 shown in FIG. 1 , which are written at the time when the reception of C2 and D1 of the track TR2 in front of the track TR2 is completed. Moreover, regarding the track TR2 as the last track in the band, since there is no track in front of which data should be protected, it is impossible to write C2 and D1 after writing B2 and C1.
[0087] Data D2 represents data assigned to the next tile, waiting for subsequent data to be written into the next tile in the same way.
[0088] In the above example, bypass writing is performed from the beginning of the tape (the beginning of track TR0), but bypass writing can also be performed from the middle of the tape (for example, the beginning or middle of track TR1) in the same way.
[0089] In addition, at the end of the bypass write, for example, in the above example, when only data A and B are received but the sequential data following them (data C and D) are not received, the existing data of tracks TR1 and TR2 will be read in sequence and saved in the SEQW buffer, and written using the same tape writing method until the end of the tape.
[0090] Fig.10 The fourth schematic diagram shows an example of data writing processing to the magnetic disk in the magnetic disk device according to the first embodiment, and shows a state in which the MC flush processing for one shoe is being executed. In this example, a part of the data of the shoe is replaced with the data Bm on the MC.
[0091] In the case of this example, data written to tracks TR0 and TR1 are generated based on the existing data A, B1, B3 on the tracks and the data Bm read from MC, and stored in the SEQW buffer. Figure 8 Next, the data of track TR2 is read and stored in the SEQW buffer, and the flushing operation of MC is completed by continuously writing the data of tracks TR1 and TR2.
[0092] In addition, if the data in the media cache is not replaced Fig.10The process shown in the figure becomes a rewrite operation of the band. In an SMR band, due to repeated writing to adjacent bands, the data of the tracks near the boundary deteriorates, so it is sometimes necessary to rewrite the data of the band. This is called ATI (Adjacent Track Interference) refresh and is widely performed and is indispensable for magnetic disk devices in recent years. This ATI refresh can also be performed by the method of this embodiment.
[0093] Fig.11 1 is a schematic diagram showing an example of a buffer for bypass write processing of the magnetic disk device according to the first embodiment, and shows an example of the state of the SEQW buffer during a plurality of bypass write processes.
[0094] When bypass writing (BPW) is used, the magnetic disk device 1 writes the data received from the host system 20 directly to the band in the user area without passing through the MC. Figure 4 Therefore, bypass writing is possible only when sequential writing is achieved in the write destination band. Therefore, in this embodiment, the disk device 1 performs the following processing: detecting a group of write commands from the host system 20 that are sequential writing, and writing them into the band in a bypass writing manner. For commands that are not expected to be sequential writing, the bypass writing is applied. Fig.10 The write process via MC as described in.
[0095] In addition, multiple bypass writes can be performed simultaneously. For example, when multiple sequential write command groups of 100 blocks are received each time in a mixed order of LBA=10000, 20000, 10100, 20100, 10200, 20200, two command streams (command streams) will be received "simultaneously" in a time-division manner: a command group for writing in the order of LBA=10000, 10100, 10200, and a command group for writing in the order of LBA=20000, 20100, 20200. When receiving such multiple command groups, the magnetic disk device 1 of the present embodiment processes both command groups "simultaneously" in a bypass write manner. Fig.11 In the example of , a case where n+1 (n is a natural number) bypass writes are performed simultaneously is shown.
[0096] The bypass write buffer is a part of the buffer RAM 11, and is provided with a plurality of sets of SEQW buffers, entry pointers, and flash pointers. Thus, the magnetic disk device 1 can perform a plurality of bypass writes in parallel.
[0097] In this figure, SB0, SB1, SB2, SB n , and EP0, EP1, EP2, EPn , and FP0, FP1, FP2, FP n They are the 0th, 1st, 2nd, and nth SEQW buffers, entry pointers, and flash pointers. In the example of this figure, n+1 sets of SEQW buffers, entry pointers, and flash pointers are configured, but they can also be dynamically secured as needed.
[0098] Fig.12 1 and 2 are diagrams showing examples of management tables for bypass write processing of the magnetic disk device according to the first embodiment, wherein (a) shows a bypass write detection table and (b) shows a bypass write execution table.
[0099] Fig.12 The bypass write detection table (a) is used to detect sequential writes that may become the object of bypass write by monitoring the write command received from the host system 20, and can be stored in the system area of the disk DK, the flash ROM 14, etc. The bypass write detection table includes data elements such as Time indicating the command reception time, NextLBA (NLBA) indicating the starting LBA of the next write command that may become the sequential write, Blocks indicating the cumulative number of blocks of sequential write, and BP indicating the link information to the bypass write execution table, and the data elements are represented by columns.
[0100] For example, when the CPU 15 receives a write command A specifying 100 blocks from LBA=1000 when there is no entry in the bypass write detection table, the CPU 15 creates a new entry and sets NextLBA=1100(1000+100) and Blocks=100.
[0101] Assume that write command B is received after write command A, specifying 200 blocks from LBA=1100. Here, CPU 15 checks the NextLBA calculated when write command A was received and the LBA of write command B, and since both are 1100, it determines that write command B is a sequential command after write command A. CPU 15 uses the information of write command B to update the entry for write command A, setting NextLBA=1300(1100+200) and Blocks=300.
[0102] CPU15 monitors all write commands as described above to detect sequential write commands that last for a certain length or longer. In addition, the number of entries in the bypass write detection table is limited, so it is necessary to delete entries with low priority for new commands. CPU15 selects deletion candidate entries using the values of conditional items (e.g., Time and Blocks) according to a pre-set condition of "the entry with the least cumulative sequential blocks among the oldest 10 entries".
[0103] The CPU 15 monitors the write command, and if the sequential write command continues for a certain length or longer, it determines that the sequential write continues further, and performs bypass writing on the write range of the next received sequential write command.
[0104] Fig.12 The bypass write execution table (b) is data for managing bypass writes in execution. The bypass write execution table includes data elements such as entry number BP, Beginning LBA (BLBA) indicating the LBA where bypass writes are started, EP indicating the current entry pointer, and FP indicating the current flash pointer, and the data elements are represented by columns. CPU 15 manages bypass writes through each element. EP and FP are both accumulated block numbers and will not be reset to 0 due to the wrapping action in SB.
[0105] When the bypass write starts, the CPU 15 first performs an entry appending process on the bypass write execution table. In the entry appending process, an idle entry is selected and its entry number is set to the BP of the bypass write detection table. Then, as the initialization process of the entry, the CPU 15 sets the LBA where the bypass write starts to be performed as BeginningLBA, sets EP and FP to 0, and performs the bypass write.
[0106] After that, after receiving the write data from the host system 20, the CPU 15 increases the number of received blocks by the EP, and after writing the data to the target band in the user data area 303 of the disk DK, increases the number of written blocks by the FP. Figure 7 , Figure 8 , Fig. 9 That is, if data that can fill one track ahead of a certain track A is accumulated in the SEQW buffer, writing is performed on the track A. The CPU 15 manages the writing process on the track by the values of FP and EP.
[0107] Fig.11 and Fig.12 An example is shown in which the number of blocks per track is set to 1000 and bypass writing is started after sequential writing of more than 2000 blocks. The processing operation of the magnetic disk device 1 is described below using the entry with BP=0 (referred to as entry 0) and the entry with BP=1 (referred to as entry 1) as examples.
[0108] Reference Fig.12 The bypass write execution table (b) shows that the CPU 15 executes a bypass write starting with LBA=302000 for the data of entry 0 and executes a bypass write starting with LBA=102500 for the data of entry 1.
[0109] The writing of the sequential data of LBA=300000 to LBA=302000 to the disk DK is not bypass writing yet. Therefore, these data are written to the MC via the normal buffer (not the SEQW buffer).
[0110] When the CPU 15 confirms that the number of sequentially written blocks received has reached 2000 (LBA=301999) and the bypass write start condition is satisfied, it registers the bypass write execution table with entry 0 (equivalent to Fig.12 The bypass write is started at TDE0 of (b). Therefore, the start LBA (BLBA) of the bypass write is 302000.
[0111] SB0 receives data for 3000 blocks (3 tracks) starting from LBA 302000. Area SB 01 Indicates that 2000 blocks of data have been saved in the past, of which the writing to disk DK has been completed. In addition, area SB 02 This means that 1000 blocks of unwritten data are currently stored. This is because, at the time when 3000 blocks of data were received, the CPU 15 executed bypass writing to write 2000 blocks (blocks with LBA=302000 to 303999) except for the last track to the disk DK.
[0112] In addition, the CPU 15 also updates the bypass write detection table during the bypass write operation. Therefore, for example, when receiving the area SB 01 and area SB 02 At the time point of 3000 blocks of data, for entry 0 of the bypass write detection table, Blocks is set to 5000 (2000+3000) and NextLBA is set to 305000 (30000+5000) (equivalent to Fig.12 (a) TDD0).
[0113] Fig.13 This is a schematic diagram showing an example of data written to a track by a bypass write process of the magnetic disk device according to the first embodiment, and shows an example of the state of a band BD on a magnetic disk DK.
[0114] The band BD is composed of six tracks TR1 to TR6. Each track starts with LBA=100000, 101000, 102000, 103000, 104000, and 105000 and consists of 1000 blocks.
[0115] Data DTA represents data of 2500 blocks starting from LBA=100000 at the beginning of TR1 written by write command A. Since the bypass write start condition (sequential writing of more than 2000 blocks) is satisfied after writing of data DTA, CPU15 decides to bypass write data DTB of the next write command B. When receiving data DTB, CPU15 starts bypass writing starting from the next LBA=102500 of the last LBA of data DTA. In addition, data DTA in the figure represents the position assumed to be configured on the tape, and data DTA itself is actually written to MC. In addition, in this figure, for simplicity, the track skew is set to 0.
[0116] In this example, the bypass write does not start from LBA=102000 because the start condition is determined in units of commands, and the bypass write targets the data DTB specified by the write command B. Here, for example, the write command processing can be divided into two parts, and the bypass write processing is performed on the second half of the 500 blocks of the data DTA (blocks with LBA=102000 to 102499 of TR3) at the time point when the bypass write start condition (sequential writing of more than 2000 blocks) is satisfied. In this bypass write processing, the data DTB of 800 blocks to be written to TR3 is received after the start, but the data to be written to the front track TR4 has not been received, so the writing to TR3 cannot be performed. The condition for being able to write to the track is that all the data to be written to the front track is ready. In this case, the number of blocks in each track is 1000. Therefore, when receiving the data DTC of more than 700 blocks scheduled to be written to the front track TR4, 500 blocks can be written starting from LBA=102500 of TR3.
[0117] The data of the subsequent tracks is also the same as in Figure 7 , 8 The processing operation shown is similar to that in which, after data for one track ahead is prepared by receiving sequential data, writing of the preceding track is performed.
[0118] When the bypass write is completed, the CPU 15 reads the existing data of the tape starting with EP instead of receiving data from the host system 20. Fig.13 In the example of FIG. 1 , when the subsequent data DTD is not received after the data DTC is received, the CPU 15 determines that the bypass write process is to be terminated. In this case, the CPU 15 reads the existing data related to the data DTD from the tape and writes the SB of the corresponding entry from the position of the EP. Thus, the data can be updated in the same way as the bypass write. In addition, when the data DTD starts from the last track in the tape, there is no data that will be destroyed in the front, so this process is not required.
[0119] After the bypass writing is completed, the CPU 15 deletes the completed entries from both the bypass writing detection table and the bypass writing execution table. The bypass writing execution table does not need to reorder by making the entry number correspond to the SB, but the bypass writing detection table reorders the data as needed to improve the processing efficiency. For example, in addition to the method of reordering in an ascending order of LBA, there is also a method of not performing physical reordering but adding chain information for managing the order to Time, LBA, and Blocks.
[0120] An example of data storage processing using the PLP function of the magnetic disk device 1 is described below.
[0121] The bypass write detection table, bypass write execution table and valid data in SB (hereinafter, these three data are referred to as bypass write related data) need to be maintained normally, including when the power is lost. Usually, these data are appropriately written into a dedicated area in the system area 301 set on the disk DK for storage. Generally speaking, in the regular steps when the power of the disk device is cut off, for example, commands such as standby and flush cache are executed to write unsaved data, and the power is cut off after completion. If the power is cut off according to this step, the bypass write related data will also be saved in the above-mentioned dedicated area as part of the unwritten data.
[0122] However, in reality, there are also cases where the power is cut off without going through the regular steps, such as when the power is lost during operation. In such a case, it is also necessary to avoid data loss. The magnetic disk device 1 of this embodiment saves the unwritten data in the write buffer and the bypass write-related data in the buffer RAM 11 in which the PLP function is effective. As long as the magnetic disk DK rotates stably, the magnetic disk device 1, such as the HDC 10, can use the rotation energy of the magnetic disk DK through the PLP function when the power is lost, and write the unwritten data in the write buffer and the bypass write-related data of the present invention, and the unsaved data on the buffer RAM 11 to the flash ROM 14.
[0123] Fig.14 This is a schematic diagram showing an example of data storage processing performed by the PLP function of the magnetic disk device according to the first embodiment, and shows an example of the state of the buffer RAM 11 including the SEQW buffer during the multiple bypass write processing.
[0124] The bypass write detection table, bypass write execution table, and SB0 to SB n (n is a natural number) or more valid data such as valid data of one or more items.
[0125] When power is lost, the magnetic disk device 1 uses the PLP function to write data in accordance with the bypass write detection table, bypass write execution table, valid data of SB0, SB1 to SB2. n The data written to the flash ROM 14 is written in the order of valid data of SB0 to the dedicated area of the flash ROM 14. The data written to the flash ROM 14 is written in the order of entries (for example, in the ascending order of n from SB0 to SB1). n ) need to be sequential, so the pointer jump function of the buffer RAM11 can also be enabled to connect these scattered data.
[0126] The pointer jump function is a hardware function that can sequentially access discontinuous data by specifying a group of addresses (e.g., A and B) in the buffer RAM 11. The group of addresses is specified by the CPU 15, for example, by executing firmware. In a normal sequential access, after accessing data at a certain address k on the buffer RAM 11, the data at the subsequent address k+1 is accessed in the next access. However, when accessing an address specified by the pointer jump function (e.g., A described above), its group pair (e.g., B described above) is then accessed.
[0127] Here, if Fig.14 As shown, by TP E and FP0, EP0 and FP1, EP n-1 and FP n Set pointers to jump to PJ0, PJ1, PJ n , can continuously write the bypass write detection table, bypass write execution table, and each valid data in SB Fig.14 The flash ROM 14 stores the bypass write detection table MD0, bypass write execution table MD1, and TP E Data FD1 to FP0, data FD2 to EP0 to FP1, and EP n-1 ~FP n Data FD n .
[0128] In addition, if Fig.14 As shown in the buffer RAM 11, the bypass write detection table, the bypass write execution table and SB0 to SB n In this case, although the efficiency will decrease due to the storage of invalid data in SB, it is also possible to save all of them without using the pointer jump function.
[0129] As described above, the data written to the flash ROM 14 when the power is lost is read out the next time the power of the magnetic disk device 1 is turned on, expanded to the original position in the buffer RAM 11, and explicitly stored in the dedicated area in the system area 301. After these processes are completed, the data stored in the flash ROM 14 is invalidated.
[0130] The magnetic disk device 1 of this embodiment can not only achieve the effect of backing up unwritten data when power is off by utilizing the PLP function, but also overwrite the data in the tile recording area and perform bypass writing without using a spare band.
[0131] Fig.15 This is a flowchart showing an operation example of the bypass write process of the magnetic disk device according to the first embodiment.
[0132] In the magnetic disk device 1, when the CPU 15 receives a write command from the host system 20, the CPU 15 starts processing the write command (step 1001). At this point in time, no write data has been received.
[0133] The CPU 15 first checks whether the write range of the received write command can be executed as a follow-up to the bypass write currently being executed, or whether the write range is related to the existing bypass write (step 1002). In step 1002, the CPU 15 searches the bypass write detection table, and when there is an entry in the table having the same NextLBA as the starting LBA of the write command, and the BP value is valid (having link information), the received write command is processed as a follow-up to the bypass write of the entry (step 1002: Yes).
[0134] When the received write command cannot be executed as a follow-up to the bypass write (step 1002: No), CPU15 determines whether to start a new bypass write with the write command (step 1003). In step 1003, CPU15 first searches the bypass write detection table to check whether there is an entry in the table with NextLBA having the same value as the starting LBA of the received write command. If there is such an entry, CPU15 determines that the received command is related to the existing sequential write and confirms the value of Blocks of the entry. This value is the cumulative number of blocks written sequentially, so if the value is greater than the specified value (2000 blocks in this example), it is determined that the condition for starting a new bypass write is met (step 1003: Yes), and checks whether the bypass write execution table is free, that is, whether the upper limit of the bypass write execution number has been reached (step 1004).
[0135] When there is a free entry in the bypass write execution table (when the upper limit of the bypass write execution number has not been reached) (step 1004: No), the CPU 15 performs bypass write start processing (step 1005). In step 1005, initialization processing is first performed. Specifically, the CPU 15 sets the starting LBA, EP, and FP for the free entry, and sets the BP for the entry in the bypass write detection table.
[0136] In the above steps, when a new bypass write is started (step 1005), or when it is determined that the current write command is related to the existing bypass write (step 1002: Yes), the CPU 15 receives data from the host system 20 and writes it to the location on the buffer RAM 11 starting with the EP set for the entry for bypass write (step 1006). In step 1006, the maximum amount of data that can be received is the free capacity of the object SB of the entry. When the number of blocks requested by the write command (the amount of write data) is larger than this amount, the maximum amount that can be received is received.
[0137] As a result, after confirming that there is data of one track (set as TR1) ahead of the write destination track (set as TR0) of the data at the FP position in the object band (step 1007: Yes), the CPU 15 obtains data starting from the block indicated by the FP and ending at the end of the track TR0 to which the block belongs from the buffer RAM 11, and writes the data to the object track of the disk DK (step 1008). In addition, when the CPU 15 confirms that there are data of multiple tracks (set as TR1, TR2) ahead of the write destination track TR0 (step 1007: Yes), the CPU 15 obtains all data except the data of the frontmost track TR2 from the buffer RAM 11, and writes the data to the object track of the disk DK (step 1008). On the other hand, after confirming that there is no data up to the end of TR1 (step 1007: No), the CPU 15 does not perform the write processing of step 1008 and proceeds to step 1009.
[0138] After the writing of data is completed in step 1008, the CPU 15 confirms whether all the request data of the write command has been received (step 1009). In step 1009, if the CPU 15 confirms that all the request data of the write command has been received (step 1009: Yes), it updates the bypass write detection table (step 1010) and performs the command end processing (step 1011). On the other hand, if there is still data to be received (step 1009: No), the CPU 15 returns to step 1006 and repeats the processing.
[0139] In addition, in step 1003, when the received write command does not satisfy the bypass write start condition (step 1003: No), or when the bypass write execution count has reached the upper limit (step 1004: No), the CPU 15 does not perform bypass writing but performs normal write processing. More specifically, the CPU 15 receives the data into a normal write buffer (not shown) (step 1016), and writes the data into the MC (step 1018).
[0140] After the write process in steps 1006 to 1009 or steps 1016 to 1018 is completed, the CPU 15 performs an update process of the bypass write detection table (step 1010). In step 1010, if there is an entry with the same NextLBA as the beginning LBA of the command executed this time, the CPU 15 adds the number of blocks of the command executed this time to the NextLBA and Blocks of the entry.
[0141] On the other hand, in step 1010, if there is no entry with the same starting LBA as the command executed this time, the CPU 15 newly registers the command information of this time in a free entry. In this case, NextLBA is set to (starting LBA of the command + number of blocks), and Blocks is set to the number of blocks. If there is no free entry, an old entry or an entry with a small number of accumulated blocks is selected from existing entries that are not performing bypass writing (there is no link information in the BP of the bypass writing detection table), and the information is deleted to create a free entry.
[0142] After the processing is completed, the CPU 15 terminates the write command (step 1011), and then, if necessary, performs the termination processing of the existing bypass write as background processing (step 1012). In step 1012, it is determined whether the processing needs to be terminated or which entry is deleted if necessary based on the table information. For example, the following methods can be considered: a method of determining whether deletion is required based on the number of bypass writes currently being executed; a method of retrieving entries in the bypass write detection table that are currently executing bypass writes (there is link information in BP), and taking entries with old Time, entries with a small number of accumulated writes, or entries that meet both requirements as the object of termination processing, etc.
[0143] In addition, in step 1012, the number of bypass writes for the end processing can be one or more. The method for the end processing is as described above. In addition, the reason why the processing is performed in the background after the command ends is to reduce the impact on the command responsiveness of the bypass end processing that takes processing time.
[0144] After the CPU 15 completes the bypass writing end processing (including the execution determination), all the writing processing ends (step 1013 ).
[0145] In the bypass write method, in order to protect data when the magnetic disk device is powered off, a common structure is to generate a free band at another location without overwriting the data in the band to be written and write data there.
[0146] However, since a free zone is created by writing all the data of the LBA assigned to the zone to the media cache, the access time increases accordingly and the media cache is consumed. In particular, when multiple bypass writes (multi-stream writes) are performed simultaneously in models for surveillance cameras, it is necessary to create free zones corresponding to the number of bypass writes, which has a significant impact.
[0147] The magnetic disk device 1 of this embodiment utilizes the PLP function to not only achieve the effect of backing up the unwritten data in the buffer RAM 11 (data protection) through the PLP function during power failure, but also overwrite the data in the tile recording area, thereby achieving bypass writing without using a free band.
[0148] In addition, in the above steps, an example of performing the end processing of bypass writing directly related to the execution of the write command in the background is shown, but sometimes CPU15 also executes the end processing in the background after the command (not limited to the write command) of step 1013 is completed. Fig.10 MC flushing processing, ATI refresh processing, etc. described in.
[0149] Although this embodiment is based on the premise that when a track is written by tile recording (band writing), the data of the previous track is destroyed at the same time, for example, in the case where the data of the previous two tracks or more is destroyed, it can also be handled by the same steps as above.
[0150] For example, when m tracks ahead of the target track are destroyed due to shingle recording, the execution of the writing is waited until the data to be written to the m tracks is received in the SB. Fig.15 In order to perform this operation in the example, the processing of step 1007 is set to "whether there is data for the first m tracks" and the processing of step 1008 is set to "write the data from FP to the SMR tape while leaving the data for the first m tracks".
[0151] (Second embodiment)
[0152] The magnetic disk device of this embodiment makes the track skew of the track to be overwritten equal to the track skew of the previous track, so that the amount of data held in the SEQW buffer can be reduced.
[0153] Fig.16 This is a schematic diagram showing an example of a data writing process to a magnetic disk in the magnetic disk device according to the second embodiment.
[0154] In the first embodiment, for example, Figure 7As shown in the figure, due to the presence of track skew (positional deviation of the track beginnings BT0, BT1, and BT2), for example, when writing near the beginning of track TR0, the end of track TR1 (with the same Figure 7 Therefore, in the first embodiment, to write the track TR0, it is necessary to wait until all the data of the track TR1 are ready. Therefore, the magnetic disk device of this embodiment shows an example of writing a band in a manner that aligns the track skew of the track TR0 and the track TR1 in the magnetic disk DK, that is, aligns the beginning BT0 with the beginning BT1 of the track TR1.
[0155] Fig.16 This is a schematic diagram showing an example of a data writing process to a magnetic disk in the magnetic disk device according to the second embodiment.
[0156] When writing is performed at the beginning of track TR0 by aligning the track skew of track TR0 with that of track TR1 in disk DK, the beginning of track TR1 disappears. For example, when writing to track TR0, writing is performed to TR0 in such a manner that the beginning BT0 of track TR0 is aligned with BT1 of TR1. Thereafter, when writing to track TRn, the track skew is repeatedly aligned with the track skew of track TR(n+1).
[0157] Through the above steps, the data that must be kept in the SEQW buffer can be reduced to the amount of one track. In addition, in the first embodiment, it is necessary to write in units of tracks, but in this embodiment, since it is possible to write to the middle of the track according to the amount of received data, it is also possible to perform stream writing using room logic.
[0158] The implementation method of this embodiment is the same as that of the first embodiment including tables and flowcharts, but is different in the following aspects.
[0159] (1) The data held in the SEQW buffer (each SB) is made equal to one track. For example, by changing Fig.15 The determination condition of step 1007 of the flowchart is implemented.
[0160] (2) Always bypass writing from the beginning of the tape. For example, Fig.15 A determination condition is added before step 1005, and when the write command of this embodiment does not involve the beginning of the tape, the process proceeds to step 1016. In step 1005, data up to the beginning of the tape is received from the host system 20 and written to the MC.
[0161] (3) A table is provided for storing the initial value of the skew of each band (the skew value of the leading track of the band).
[0162] A table for storing the initial skew value of each band is prepared, and the CPU 15 refers to the table to obtain the skew value of each track in the band when executing step 1008. After writing one band, the CPU 15 updates the skew value of the band in the table. The table is arranged adjacent to the bypass write detection table and the bypass write execution table, and the reading, writing and storage processing using PLP for the system area 301 are also performed simultaneously with these two tables.
[0163] According to the above-described steps, the magnetic disk device 1 of the present embodiment can reduce the amount of data held in the SEQW buffer.
[0164] The magnetic disk device 1 of the above-described embodiment may include any combination of one or more of the following features.
[0165] (A-1) The magnetic disk device of the embodiment includes: when sequentially writing the tile recording area from the beginning or the middle of the area, the first data (for example Figure 8 Data A, B1) and second data (e.g. Figure 8 The data B2, C1, C2) are all received in the volatile memory (e.g. Fig.14 After the buffer RAM 11 is loaded, the first track of the write object (for example Figure 8 The first data is data to be written to the first track of the write object, and the second data is the following data: the second track (for example, Figure 8 TR1), overwriting the data that disappears due to writing to the first track; and when an unexpected power failure occurs, the data received on the volatile memory that is not written to the tile recording area (for example Figure 8 The data B2, C1, C2) are stored in a non-volatile memory (e.g. Fig.14 Unit of flash ROM14).
[0166] (A-2) In the magnetic disk device of (A-1) above, when an unexpected power failure occurs, the volatile memory (for example, Fig.14 The data in the first data not written into the tile recording area on the buffer RAM 11 (for example Fig.14 Data of FD0, FD1, FD n )Additional information for managing this data (e.g. Fig.14 The data MD0, MD1) is stored in a non-volatile memory (e.g. Fig.14 Flash ROM 14).
[0167] (A-3) In the magnetic disk device of (A-1) above, when an unexpected power failure occurs, the volatile memory (e.g. Fig.14 The data on the buffer RAM 11) is written to the non-volatile memory (eg Fig.14 Flash ROM 14).
[0168] (A-4) In the magnetic disk device of (A-1) above, sequential writing to the tile recording area is to receive data from the host without passing through the medium cache (for example, Figure 3 MC302) and directly writes into the tile recording area (bypass writing).
[0169] (A-5) In the magnetic disk device of (A-1) above, sequential writing of data (for example, data composed of a combination of original recorded data and data in the medium cache) to the tile recording area is performed. Fig.10 SB) to perform (flushing of media cache).
[0170] (A-6) In the magnetic disk device of (A-1) above, sequential writing to the tile recording area is performed using the original recorded data on the magnetic disk (ATI refresh processing).
[0171] (A-7) In the magnetic disk device of (A-1) above, when the write unit of the tile recording area is divided into a certain number of tracks, upon receiving the last track (e.g. Fig.10 TR2) data, all unwritten data (such as Fig.10 D1, C2) are written continuously.
[0172] (A-8) In the magnetic disk device of (A-1) above, when writing is performed from the beginning of the write area of the tile area, the write target track (for example Fig.16 TR0) track deflection and the front track (e.g. Fig.16 The track skew of TR1) is the same.
[0173] (A-9) In the magnetic disk device of (A-1) to (A-8) above, it is characterized in that in the writing target track (for example Figure 4 When writing to TR1 of Figure 4 In the case where data of TR2, TR3) disappears, after receiving all the data of the multiple tracks, writing to the write target track is performed.
[0174] According to the above (A-1), (A-2), and (A-3), when sequential writing is performed on the tile recording area, the received data will not be lost when an unexpected power failure occurs, and the existing data in the tile recording area can be overwritten. As a result, there is no need to generate a free band for sequential writing, and the efficiency of the write process is improved.
[0175] According to the above (A-4), by performing bypass writing using the method described in the above (A-1), command responsiveness is improved when a plurality of bypass writes are performed simultaneously such as multi-stream writing.
[0176] According to the above (A-5), by performing the flushing process of the media cache using the method described in the above (A-1), a free band is not required, so the processing efficiency is improved.
[0177] According to the above (A-6), the effect of the ATI refresh process can be obtained.
[0178] According to the above (A-7), by continuously writing to the last track of the shoe band from the previous track, the required time is shortened.
[0179] According to the above (A-8), by making the track skew consistent with the previous track, the amount of data to be stored in the volatile area can be reduced, thereby increasing the number of sequential writes performed simultaneously using the method described in (A-1).
[0180] According to the above (A-9), even when multiple tracks ahead disappear due to band writing, in addition to the content of the above (A-7), the sequential writing of the above (A-1) to (A-8) can be performed, and therefore, the number of magnetic disk devices to which the method of the implementation method can be applied increases.
[0181] According to the above-described embodiments, it is possible to provide a magnetic disk device and a writing method that perform bypass writing without using a free band.
[0182] In addition, the present invention is not rigidly limited to the above-mentioned embodiments, and 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 appropriate combinations of 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 also within the scope of the present invention if the order of steps is exchanged, steps are deleted, added, etc. within the scope of the main purpose of the present invention.
[0183] The processing shown in the flowchart, timing diagram, etc. can be implemented by hardware such as a CPU, an IC chip, a digital signal processor (Digital Signal Processor or DSP), or software (program, etc.) that enables a computer including a microcomputer to operate, or a combination of hardware and software.
[0184] In addition, when the claims are expressed as control logic, when the claims are expressed as a program containing instructions for causing a computer to execute, and when the claims are expressed as a computer-readable recording medium recording the instructions, the apparatus of the present invention is also applied. In addition, the present invention is not limited to the names and terms used, and even if it is other expressions, if it is substantially the same content and the same meaning, it is also included in the present invention.
Claims
1. A magnetic disk device that records data in a watt recording method, characterized in that: When sequential writing is performed to the tile recording area on the disk, the data to be written to the write target track and the data arranged on the track before the write target track are received in the volatile memory, and then the write to the write target track is performed. When an unexpected power failure occurs, data not written to the tile recording area among the data received in the volatile memory is stored in the non-volatile memory.
2. The magnetic disk device according to claim 1, wherein: When an unexpected power failure occurs, information for managing the data is added to the data not written in the tile recording area among the data received in the volatile memory and the data is stored in the non-volatile memory.
3. The magnetic disk device according to claim 1, wherein: When power failure occurs, the data on the volatile memory is written to the nonvolatile memory using the electromotive force generated by the rotational energy of the magnetic disk.
4. The magnetic disk device according to claim 1, wherein: The sequential writing to the tile recording area is a process of directly writing the data received from the host to the tile recording area without passing through the media cache, that is, bypass writing.
5. The magnetic disk device according to claim 1, wherein: Sequential writing to the tile recording area is performed using data consisting of a combination of recording data on the magnetic disk and data in the medium cache.
6. The magnetic disk device according to claim 1, wherein: Sequential writing to the tile recording area is performed by recording data itself on the disk.
7. The magnetic disk device according to claim 1, wherein: When the writing unit of the tile recording area is divided into a certain number of tracks, When the data of the last track in the write unit is received, all unwritten data is continuously written to the tile recording area.
8. The magnetic disk device according to claim 1, wherein: When writing from the beginning of the write area of the tile area, Writing is performed by making the track skew of the writing target track the same as the track skew of the preceding track.
9. The magnetic disk device according to any one of claims 1 to 8, wherein: When writing to a write target track in a tile area, if data of the previous multiple tracks disappears, writing to the write target track is performed after all data of the previous multiple tracks are received in the volatile memory.
10. A data writing method for a magnetic disk device that records data in a shingle recording mode, characterized in that: When sequential writing is performed to the tile recording area on the disk, the data to be written to the write target track and the data arranged on the track before the write target track are received in the volatile memory, and then the write to the write target track is performed. When an unexpected power failure occurs, data not written to the tile recording area among the data received in the volatile memory is stored in the non-volatile memory.
Citation Information
Patent Citations
Engine
JP2023131952A