Data recording system, storage, and storage control method

The data recording system in SSDs manages data recording to prevent fragmentation and reduce garbage collection frequency, maintaining storage speed by ensuring contiguous data recording within a set area.

JP7752333B2Active Publication Date: 2025-10-10PANASONIC INTELLECTUAL PROPERTY MANAGEMENT CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2024524285
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2022-05-30
Filing Date
2023-05-10
Publication Date
2025-10-10
Estimated Expiration
2043-05-10

AI Technical Summary

Technical Problem

Data fragmentation in solid-state drives (SSDs) leads to increased frequency of garbage collection, slowing down operation speed, as data is often recorded across multiple blocks when fragmentation occurs.

Method used

A data recording system that includes a storage control device to manage data recording in flash memory, ensuring data is recorded contiguously within a set area, and notifying completion or failure of recording in units of recording commands, thereby reducing fragmentation and the need for garbage collection.

Benefits of technology

The system effectively reduces data fragmentation and the frequency of garbage collection, maintaining storage speed by ensuring data is recorded contiguously within a set area, thus preventing slowdowns.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007752333000001
    Figure 0007752333000001
  • Figure 0007752333000002
    Figure 0007752333000002
  • Figure 0007752333000003
    Figure 0007752333000003
Patent Text Reader

Abstract

The present invention suppresses data fragmentation and minimizes execution of garbage collection. This data recording system comprises a storage (5) and a storage control device (3). The storage (5) has a flash memory (53) having a plurality of blocks (BL) that represent units in which data is erased. Each block (BL) includes a plurality of pages (PA) that represent units in which data is recorded. A controller (55) controls recording of data to the flash memory (53). When data to be recorded can be successively recorded in a set area, the storage control device (3) notifies the set area regarding completion of recording in units equal to the number of recording directives that are needed in order to record the data to be recorded in the set area. When the data to be recorded can no longer be successively recorded in the set area, the set area is notified of an error in recording in units equal to the number of recording directives that are needed in order to record the data to be recorded in the set area.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present disclosure relates to a data recording system for recording data in a storage, a storage for recording data, and a method for controlling a storage for recording data. [Background technology]

[0002] A type of storage known as a solid-state drive (SSD) is known as a type of storage for recording data. SSDs use semiconductor devices called NAND flash memory as their data storage area. NAND flash memory is made up of numerous memory elements, and data (bit data) is recorded in each memory element.

[0003] The recording area of ​​a NAND flash memory has multiple blocks, which are data erase units, and each block has multiple pages. Data is recorded in pages to the NAND flash memory. That is, the data to be recorded is divided into multiple fragments, and one fragment is recorded on one page, thereby recording the entire data to the NAND flash memory.

[0004] Furthermore, if recording of a data fragment on a page fails, recording of the fragment on this page is skipped, and the fragment that failed to be recorded is recorded on another page included in the current block or on a page included in another block (see, for example, Patent Document 1).

[0005] In SSDs, pages where deleted data was recorded cannot be overwritten to record other data. Therefore, in SSDs, all pages of the block containing the page where the deleted data was recorded must be made free pages. If this block contains valid data, the valid data must be moved to another block, and all pages of the block must be made free pages (garbage collection). [Prior art documents] [Patent documents]

[0006] [Patent Document 1] Japanese Patent Application Publication No. 2019-215777 Summary of the Invention [Problem to be solved by the invention]

[0007] In the past, when a fragment failed to be recorded on a specific page and the fragment was recorded on another page, the data was recorded in a fragmented state. When data is fragmented, for example, data that could normally be recorded in one block may end up being recorded across multiple blocks.

[0008] In this way, if data fragmentation occurs and one piece of data is frequently recorded across multiple blocks, the frequency with which garbage collection is executed also increases. Since the execution of garbage collection slows down the operation speed of the storage, it is preferable to suppress the execution of garbage collection as much as possible.

[0009] The present disclosure aims to suppress data fragmentation and the execution of garbage collection in a storage device having a flash memory. [Means for solving the problem]

[0010] The data recording system disclosed herein includes a storage and a storage control device. The storage includes a flash memory and a controller. The flash memory has multiple blocks, which are units for erasing data. Each block includes multiple pages, which are units for recording data. The controller controls the recording of data in the flash memory. The storage control device controls the storage.

[0011] In the data recording system, the controller receives a plurality of recording commands from the storage control device to record data to be recorded in the flash memory, and records the data to be recorded in the flash memory in accordance with the received recording commands.

[0012] Furthermore, the storage control device determines that the data has been successfully recorded in the set area if the data to be recorded can be continuously recorded in the set area. The set area is an area in the flash memory having a predetermined number of pages. If it determines that the data has been successfully recorded in the set area, the storage control device notifies the completion of the recording of the data in the set area, in units of the number of recording commands required to record the data to be recorded in the set area.

[0013] On the other hand, when the storage control device is unable to continuously record the data to be recorded in the set area, it determines that the data recording in the set area has failed.When it determines that the data recording in the set area has failed, the storage control device notifies the error in recording the data in the set area in units of the number of recording commands required to record the data to be recorded in the set area. [Effects of the Invention]

[0014] In the data recording system disclosed herein, if the storage control device is able to continuously record data to be recorded within a set area of ​​the storage, it determines that data recording to this set area has been successful and notifies the completion of data recording to the set area in units of the number of recording commands required to record the data to be recorded within this set area. On the other hand, if the storage control device is no longer able to continuously record data to be recorded within the set area of ​​the storage, it determines that data recording to this set area has failed and notifies the completion of data recording to the set area in units of the number of recording commands required to record the data to be recorded within this set area. In other words, if the recording of data to be recorded within a specific set area fails for any recording command, it is determined that the recording of data has failed for all recording commands to record data to be recorded within this specific set area, not just for the failed recording command. This reduces data fragmentation in the storage and the need for garbage collection. As a result, a decrease in the operating speed of the storage can be suppressed. [Brief explanation of the drawings]

[0015] [Figure 1] FIG. 1 is a diagram showing the configuration of a data recording system. [Figure 2] FIG. 2 is a diagram illustrating a configuration of the information processing device. [Figure 3] FIG. 3 is a diagram illustrating the configuration of the storage control device. [Figure 4] FIG. 4 is a diagram illustrating the configuration of storage. [Figure 5] FIG. 5 is a diagram showing the configuration of the recording area. [Figure 6] FIG. 6 is a flowchart showing the operation of the information processing device. [Figure 7] FIG. 7 is a flowchart showing the operation of the storage control device. [Figure 8] FIG. 8 is a diagram illustrating the operation of the storage. [Figure 9] FIG. 9 is a diagram showing signal transmission and reception during a data recording operation. [Figure 10] FIG. 10 is a diagram showing an example of a case where data has been successfully recorded in the set area (that is, the completion condition is met). [Figure 11] FIG. 11 is a diagram showing an example of a case where data recording in a set area has failed. [Figure 12] FIG. 12 is a diagram showing an example of re-recording of data that has failed to be recorded. [Figure 13] FIG. 13 is a diagram showing a schematic diagram of data recording in a data recording system. [Figure 14] FIG. 14 is a diagram schematically showing data recording in a comparative example. DETAILED DESCRIPTION OF THE INVENTION

[0016] Hereinafter, embodiments will be described in detail with reference to the drawings as appropriate. However, more detailed description than necessary may be omitted. For example, detailed description of already well-known matters or redundant description of substantially identical configurations may be omitted. This is to avoid unnecessary redundancy in the following description and to facilitate understanding by those skilled in the art. Note that the inventors provide the accompanying drawings and the following description to enable those skilled in the art to fully understand the present disclosure, and do not intend for them to limit the subject matter described in the claims.

[0017] In this disclosure, "recording" data means writing data, and "recording data contiguously" means that data is recorded without any free pages between fragments of data.

[0018] [1. Data recording system] A data recording system 100 according to the present disclosure will be described below with reference to the drawings. The data recording system 100 is a system that stores predetermined data in a storage 5. The configuration of the data recording system 100 will be described with reference to FIG. 1. FIG. 1 is a diagram showing the configuration of the data recording system 100. The data recording system 100 includes an information processing device 1, a storage control device 3, and a storage 5.

[0019] The information processing device 1 is a device that acquires data to be stored in the storage 5. The information processing device 1 is connected to a video output device 7. The video output device 7 is a device that outputs video to the outside. In other words, the information processing device 1 acquires the video output by the video output device 7 as data to be recorded in the storage 5.

[0020] The video output device 7 is, for example, a video capture device equipped with a camera for capturing predetermined video, a microphone for capturing audio of the predetermined video, etc. Alternatively, the video output device 7 may be, for example, a media server that records a large number of videos, or a video receiving device that captures video carried by a signal such as radio waves. The video captured by the video output device 7 is, for example, high-quality video such as uncompressed 4K video.

[0021] The information processing device 1 is connected to a storage control device 3. Data to be recorded in the storage 5 is first transmitted from the information processing device 1 to the storage control device 3, and then recorded in the storage 5 by the storage control device 3.

[0022] The storage control device 3 is connected to the information processing device 1 and the storage 5 via a network, and controls the transmission and reception of data and commands between the information processing device 1 and the storage 5. When the recording of data to the storage 5 is completed, the storage control device 3 notifies the information processing device 1 of the completion of the data recording. On the other hand, when the recording of data to the storage 5 fails, the storage control device 3 notifies the information processing device 1 of the data recording error.

[0023] The storage 5 is a device for recording data. The storage 5 has a flash memory, which is a semiconductor non-volatile memory, as a data recording area. The storage 5 is a solid state drive (SSD).

[0024] In the example of the data recording system 100 shown in Fig. 1, the storage control device 3 and the storage 5 are configured as separate devices. However, this is not limiting, and the storage control device 3 and the storage 5 may be arranged in a single housing to configure a single device. In other words, the storage 5 may be included in the storage control device 3. Furthermore, the information processing device 1 and the video output device 7 may be arranged in a single housing to configure a single device.

[0025] [2. Information processing device] The configuration of the information processing device 1 will be described with reference to Fig. 2. Fig. 2 is a diagram showing the configuration of the information processing device 1. The information processing device 1 has a CPU 11, a RAM 13, a storage device 15, a video interface 17, and a network interface 19.

[0026] The CPU 11 executes various processes in the information processing device 1. In detail, the CPU 11 executes processes related to recording data in the storage 5, etc. The CPU 11 executes various processes according to instructions indicated in a program stored in the storage device 15. Note that part of the processes may be realized by hardware implemented in the CPU 11. The CPU 11 generates instructions for executing various processes. The RAM 13 temporarily stores data, etc. The instructions generated by the CPU 11 and data to be sent and received from the storage control device 3 are temporarily stored in the RAM 13.

[0027] The storage device 15 is composed of a ROM, a hard disk (HDD), a solid state drive (SSD), etc. The storage device 15 stores programs executed by the CPU 11, settings related to the processing of the information processing device 1, parameters used for the processing, etc.

[0028] The video interface 17 is an interface for connecting the information processing device 1 and the video output device 7. The video interface 17 is an interface for connecting video-related devices such as an interface conforming to the Serial Digital Interface (SDI) standard, for example.

[0029] The network interface 19 connects the information processing device 1 to other devices via a network such as a WAN or LAN. As shown in Fig. 2, the network interface 19 is connected to a storage control device 3.

[0030] The network interface 19 uses remote direct memory access (RDMA) to directly transmit and receive data between the RAM 13 of the information processing device 1 and RAM of other devices. This enables high-speed data transmission and reception between the information processing device 1 and other devices. The network interface 19 is, for example, a Gigabit Ethernet (registered trademark) interface.

[0031] In the information processing device 1, the video output device 7 may be connected to the network interface 19 instead of the video interface 17.

[0032] [3. Storage control device] The configuration of the storage control device 3 will be described with reference to Fig. 3. Fig. 3 is a diagram showing the configuration of the storage control device 3. The storage control device 3 has a CPU 31, a RAM 33, a storage device 35, a storage interface 37, and a network interface 39.

[0033] The CPU 31 executes various processes in the storage control device 3. The CPU 31 executes commands indicated in a program stored in the storage device 35, thereby executing various processes in the storage control device 3. Note that part of the processes in the storage control device 3 may be realized by hardware implemented in the CPU 31. The RAM 33 temporarily stores data, etc. The RAM 33 temporarily stores commands for the storage 5, data transmitted and received between the information processing device 1 and the storage 5, etc.

[0034] The storage device 35 is composed of a ROM, a hard disk (HDD), a solid state drive (SSD), etc. The storage device 35 stores programs executed by the CPU 31, settings related to the processing of the storage control device 3, parameters used for the processing, etc.

[0035] The storage interface 37 connects the storage control device 3 and the storage 5. The storage interface 37 is, for example, a PCIe interface compliant with the PCI-SIG PCI express standard. This allows the storage control device 3 and the storage 5 to exchange data at high speed using a protocol dedicated to non-volatile memory (NVMe (Non-Volatile Memory Express)) using a PCI-Express bus. In NVMe, a controller acquires data from the NAND memory using the NAND protocol, converts it to the PCIe protocol, and transfers it to the host side. In contrast, in the case of conventional SATA (Serial ATA), a DMA controller that transfers data directly to the host side converts data from the NAND memory to the SATA protocol, acquires it, and then converts the data to the PCIe protocol and transfers it to the host. In other words, NVMe processing directly converts data from the NAND protocol to the PCIe protocol, resulting in high data transfer processing speed.

[0036] The network interface 39 connects the storage control device 3 to other devices via a network such as a WAN or LAN. As shown in FIG. 3, the information processing device 1 is connected to the network interface 39. The network interface 39 uses RDMA to directly transmit and receive data between the RAM 33 of the storage control device 3 and the RAM of other devices. The network interface 39 also enables high-speed data transmission and reception with other devices using a protocol (NVMe-oF (NVMe over Fabric)) for communication via a network dedicated to solid-state drives. The network interface 39 is, for example, a Gigabit Ethernet (registered trademark) interface.

[0037] [4. Storage] The configuration of the storage 5 will be described with reference to FIG. 4. FIG. 4 is a diagram showing the configuration of the storage 5. The storage 5 has an access port 51, a flash memory 53, a controller 55, and a storage unit 57. The access port 51 connects the storage control device 3 and the storage 5. Note that a plurality of access ports 51 may be provided, and the storage control device 3 may be connected to one of the plurality of access ports 51. Alternatively, all of the plurality of access ports 51 may be connected to the storage control device 3.

[0038] The flash memory 53 is made up of multiple NAND flash memories. The flash memory 53 has a recording area RA for recording video. As shown in Fig. 5, the recording area RA is divided into multiple blocks BL. Fig. 5 is a diagram showing the configuration of the recording area RA.

[0039] A block BL is also called an erase block, and is the unit of data erasure. A block BL is further divided into multiple pages PA. A page PA is the unit of data recording. When data in a block BL is erased in the flash memory 53, the data contained in this block BL is moved to another block BL and then erased (garbage collection). This makes this block BL a "free block" to which data can be written.

[0040] The recording area RA is composed of an available area UA and a spare area SA. The available area UA includes blocks BL in which data can be recorded. The spare area SA is used for the purpose of saving data included in the available area UA through wear leveling processing, garbage collection, etc. Recording of data from the information processing device 1 to blocks BL included in the spare area SA is prohibited.

[0041] The controller 55 executes control related to the storage 5. In particular, the controller 55 controls the recording of data to the flash memory 53 and the reading of data from the flash memory 53. The controller 55 also executes other processes required for a solid state drive, such as garbage collection and wear leveling. The controller 55 executes the above processes by executing a program stored in the storage unit 57. The controller 55 may also implement the above processes using its own hardware.

[0042] The storage unit 57 is provided as a memory separate from the flash memory 53, or is part of the recording area RA, and stores various parameters and the like related to the control of the storage 5. The storage unit 57 stores, for example, the number of times data in each block BL is recorded, a table associating addresses (logical addresses) designated by an external device with addresses (physical addresses) of blocks BL corresponding to the logical addresses, thresholds indicating the conditions for executing wear leveling, and the like.

[0043] [5. Recording operation in data recording system] [5-1. Operation of information processing device] The data recording operation in the data recording system 100 will be described using Fig. 6 to Fig. 9. Fig. 6 is a flowchart showing the operation of the information processing device 1. Fig. 7 is a flowchart showing the operation of the storage control device 3. Fig. 8 is a diagram showing the operation of the storage 5. Fig. 9 is a diagram showing the transmission and reception of signals during the data recording operation. First, the operation in the information processing device 1 will be described using Fig. 6 and Fig. 9.

[0044] First, the information processing device 1 transmits a completion condition to the storage control device 3 (step S11 in FIG. 6, step S101 in FIG. 9). The completion condition is a condition for determining that data recording is complete. In detail, the completion condition is a condition that data has been continuously recorded in a set area having a predetermined number of pages PA of the storage 5.

[0045] The setting area for the completion condition can be set, for example, in units of block BL of the storage 5. If the setting area is one block BL, the completion condition is that data has been recorded continuously within one block BL. Setting the completion condition in this way makes it possible to suppress data fragmentation within the block BL. As a result, it is possible to prevent the number of blocks BL required to record the data to be recorded (hereinafter referred to as the data to be recorded) from increasing from the initial number (the number of blocks BL required when the data to be recorded continuously). Furthermore, the setting area may be expressed in units of the amount of data that can be recorded in a block BL. This makes it possible to realize a setting area that does not require consideration of the boundary positions of block BL.

[0046] Next, the CPU 11 acquires the data to be recorded (step S12). In particular, the CPU 11 of the information processing device 1 acquires video to be the data to be recorded from the video output device 7. Thereafter, the CPU 11 divides the data to be recorded into small data pieces having a predetermined size as needed, and stores the generated small data pieces in the RAM 13. The small data pieces have a size, for example, of about an integer fraction of the size of the block BL. In the following description, it is assumed that the data to be output is divided into eight small data pieces (small data pieces #0 to #7). Note that if the data to be recorded is equal to or smaller than the size of the small data pieces, the division is omitted.

[0047] Thereafter, a recording command for recording the data to be recorded is generated for each small data piece and transmitted to the storage control device 3 (step S13, steps S102 to S104). Specifically, the CPU 11 generates a recording command for each small data piece generated in step S12 and stores the command in the RAM 13. That is, the CPU 11 generates a recording command for each small data piece divided from the data to be recorded. This recording command includes information indicating the position (address) in the RAM 13 where the small data piece is stored and the start position (address) of the page PA where the small data piece is to be recorded. The addresses of the page PA included in the multiple recording commands are consecutive address values. That is, the multiple recording commands are commands for consecutively recording the multiple small data pieces divided from the data to be recorded on the page PA.

[0048] For example, if the output target data is divided into eight small data pieces (small data pieces #0 to #7), eight recording commands (recording command #0 to #7) corresponding to the respective small data pieces are generated.

[0049] After generating the recording command, the CPU 11 transmits a trigger to the storage control device 3 to prompt acquisition of the recording command (step S102). In response to this trigger, the storage control device 3 acquires the recording command stored in the RAM 13 (steps S103 to S104). The recording command acquired by the storage control device 3 is transmitted to the storage 5 (steps S105 to S107).

[0050] After the recording command is sent, the small data recorded in RAM 13 is sequentially sent to storage 5 via storage control device 3 (steps S14 and S108). Storage 5 stores the received small data in page PA specified by the recording command. The fragment recording operation by storage 5 will be explained later.

[0051] While transmitting the small data to the storage 5, the CPU 11 of the information processing device 1 determines whether or not an error has been notified from the storage control device 3 (step S15). If an error has been notified ("Yes" in step S15, step S111), the CPU 11 determines to execute the following process.

[0052] As will be described later, in the data recording system 100, an error from the storage control device 3 is notified in units of the number of recording commands required to record data in a specific set area of ​​the storage 5. Therefore, when an error is notified from the storage control device 3, the CPU 11 regenerates the same recording commands as the multiple recording commands for which the error was notified, starting from the beginning (for example, from recording command #0), and transmits them to the storage control device 3 (steps S13, S102 to S104). Thereafter, the small data stored in the RAM 13 are retransmitted to the storage 5 sequentially from the beginning (for example, from small data #0) (steps S14, S108). As a result, the storage 5 re-records the recording target data (small data) that failed to be recorded in another set area.

[0053] On the other hand, if no error has been notified ("No" in step S15), the CPU 11 determines whether or not the storage control device 3 has notified the completion of recording of data in the current setting area (step S16). If the completion has not been notified ("No" in step S16), the CPU 11 determines that recording of the data to be recorded in the current setting area is still ongoing, and continues transmitting the small data stored in the RAM 13 (step S14).

[0054] On the other hand, if completion is notified ("Yes" in step S16), the CPU 11 determines that recording of the data to be recorded (small data) in the current set area has been completed. Thereafter, the CPU 11 determines whether recording of the data to be recorded (i.e., all small data) in the storage 5 has been completed (step S17). If recording of the data to be recorded in the storage 5 has not been completed ("No" in step S17), the operation of the information processing device 1 returns to step S14. That is, the information processing device 1 continues transmitting the remaining small data to be recorded in the current set area.

[0055] On the other hand, when the recording of the record target data in the current set area is completed ("Yes" in step S17), the CPU 11 determines whether or not a stop operation has been performed on the information processing device 1 (step S18). Unless a stop operation has been performed ("No" in step S18), the above steps S12 to S17 are repeatedly executed. On the other hand, when a stop operation has been performed ("Yes" in step S18), the information processing device 1 stops operating.

[0056] [5-2. Operation of storage control device] Next, the operation of the storage control device 3 will be described with reference to Figures 7 and 9. First, the storage control device 3 receives a completion condition from the information processing device 1 (step S21). In detail, the network interface 39 of the storage control device 3 records the completion condition stored in the RAM 13 of the information processing device 1 in the RAM 33 of the storage control device 3 by RDMA.

[0057] Thereafter, the storage control device 3 determines whether or not the above-mentioned trigger has been received from the information processing device 1 (step S22). If the trigger has not been received ("No" in step S22), the storage control device 3 determines that there is no recording command to be received, and continues to wait.

[0058] On the other hand, if a trigger is received ("Yes" in step S22, step S102 in FIG. 9), the storage control device 3 determines that there is a recording command to be received, receives the recording command from the information processing device 1, and transmits it to the storage 5 (step S23, steps S103 to S107). In detail, the following process is executed.

[0059] When the storage control device 3 receives the trigger, the CPU 31 transmits a request to acquire a recording command (recording command acquisition request) to the information processing device 1 (step S103). When the recording command acquisition request is received by the information processing device 1, the network interface 19 of the information processing device 1 and the network interface 39 of the storage control device 3 transmit the recording command recorded in the RAM 13 of the information processing device 1 to the RAM 33 of the storage control device 3 by RDMA (step S104).

[0060] Thereafter, the CPU 31 transmits a trigger prompting acquisition of a recording command to the storage 5 (step S105). The storage 5 that receives this trigger receives the recording command stored in the RAM 33 (steps S106 to S107).

[0061] The above-described process of transmitting and receiving a recording command is repeatedly executed the number of times corresponding to the number of recording commands generated by the information processing device 1, that is, the number of times corresponding to the number of received triggers.

[0062] After the recording command is transmitted and received, small pieces of data generated by dividing the data to be recorded are sequentially transmitted from the information processing device 1 to the storage 5 via the storage control device 3 (step S108). The storage 5 records the received small pieces of data in a specified page PA of the flash memory 53. While the data to be recorded is being recorded, the storage 5 transmits a notification to the storage control device 3 that the recording of the small pieces of data was successful or unsuccessful (steps S109 and S110). As shown in FIG. 9, the storage 5 performs the above notification for each of the multiple recording commands (recording commands #0 to #7 in the example of FIG. 9) generated for the data to be recorded.

[0063] When the CPU 31 of the storage control device 3 receives the above notification, it determines whether the notification is a notification that data recording has failed (step S24). In detail, the CPU 31 determines whether the notification is a notification that data recording has failed for an intermediate recording command among a plurality of consecutive recording commands for recording small data in a specific set area.

[0064] When the storage 5 notifies the CPU 31 that data recording has failed ("Yes" in step S24, step S110), the CPU 31 determines that it is no longer possible to continuously record the data to be recorded in the current setting area. In this case, the CPU 31 determines that data recording in the current setting area has failed, and notifies the CPU 31 of an error (steps S25, S111). In notifying the error in step S25, the CPU 31 notifies the CPU 31 of the error in units of the number of recording commands required to record the data to be recorded in the current setting area. In other words, the CPU 31 notifies the CPU 31 of the error not only for the recording command for which the error was notified, but also for all recording commands generated to record data in the current setting area.

[0065] For example, as shown in FIG. 10, when eight small data #0 to #7 are continuously recorded in one set area (e.g., one block BL), the data is successfully recorded in the set area. However, if the recording of small data #3 fails during recording command #3 generated for recording small data #3 as shown in FIGS. 9 and 11, the CPU 31 notifies an error not only to recording command #3 but also to all eight recording commands #0 to #7 generated for recording small data #0 to #7 in one recording area. Note that in FIGS. 10 and 11, pages PA marked with a circle indicate pages PA in which data (fragments, described later) are successfully recorded. On the other hand, pages PA marked with a cross indicate pages PA in which data recording failed. FIG. 10 is a diagram showing an example of a case where data recording in the set area is successful (i.e., the completion condition is met). FIG. 11 is a diagram showing an example of a case where data recording in the set area fails.

[0066] After notifying the error as described above, the operation of the storage control device 3 returns to step S22. That is, the storage control device 3 receives a plurality of recording commands generated by the information processing device 1 in order to re-record the small data that failed to be recorded in the current recording area in another recording area (steps S102 to S104), and transmits the received plurality of recording commands to the storage 5 (steps S105 to S107). The storage control device 3 also sequentially receives the small data that failed to be recorded from the information processing device 1, and sequentially transmits the received small data to the storage 5 (step S108). As a result, the storage 5 re-records the small data that failed to be recorded in another recording area.

[0067] On the other hand, if the storage 5 notifies the CPU 31 that the data has been successfully recorded (step S24: "Yes", step S109), the CPU 31 of the storage control device 3 determines whether the state of data recorded in the current set area matches the completion condition received in step S21 (step S26). As described above, the completion condition is that data has been continuously recorded in the set area. In detail, the CPU 31 determines that the completion condition has been met when the storage 5 notifies the CPU 31 that data has been successfully recorded in response to all of the consecutive recording commands for recording small data in the current set area.

[0068] If the state of data recording in the current set area does not meet the completion condition, i.e., if data recording in the current set area has not yet been completed ("No" in step S26), the operation of the storage control device 3 returns to step S24. That is, the storage control device 3 sequentially receives the remaining small data to be recorded in the current set area from the information processing device 1 (steps S102 to S104), and sequentially transmits the received small data to the storage 5 (steps S105 to S107). As a result, the storage 5 continues recording the small data in the current set area.

[0069] On the other hand, if the state of data recording in the current set area meets the completion condition, i.e., if the data to be recorded (small data) can be continuously recorded in the current set area ("No" in step S26), CPU 31 determines that the data recording in the current set area has been successful, and notifies that the recording of data in the current set area has been completed (steps S27 and S112). In notifying the completion in step S27, CPU 31 notifies the completion in units of the number of recording commands required to record the data to be recorded in the current set area. In other words, the completion is notified for all recording commands generated to record the data to be recorded in the current set area.

[0070] After notifying the completion of recording of data in the current setting area, the CPU 31 determines whether or not recording of the data to be recorded (i.e., all small data) in the storage 5 is complete (step S28). If recording of the data to be recorded in the storage 5 is not complete ("No" in step S28), the operation of the information processing device 1 returns to step S24. That is, the storage control device 3 receives the remaining small data from the information processing device 1 and transmits the received remaining small data to the storage 5.

[0071] On the other hand, when the recording of the record target data in the storage 5 is completed ("Yes" in step S28), the CPU 31 determines whether or not a stop operation has been performed for the storage control device 3 (step S29). As long as a stop operation has not been performed ("No" in step S29), the above steps S22 to S28 are repeatedly executed. On the other hand, when a stop operation has been performed ("Yes" in step S29), the storage control device 3 stops operating.

[0072] [5-3. Data recording in storage] 8 and 9, the data recording operation in the storage 5 will be described. First, the storage 5 determines whether or not a trigger has been received from the storage control device 3 (step S31 in FIG. 8). If a trigger has not been received ("No" in step S31), the storage 5 determines that there is no recording command to be received, and continues to wait.

[0073] On the other hand, if a trigger is received ("Yes" in step S31, step S105 in FIG. 9), the storage 5 determines that there is a recording command to be received, and receives the recording command from the storage control device 3 (step S32, steps S106 to S107). In detail, the following process is executed: When the trigger is received in the storage 5, the controller 55 of the storage 5 transmits a command acquisition request to the storage control device 3 (step S106).

[0074] When the command acquisition request is received by the storage control device 3, a recording command is sent from the RAM 33 of the storage control device 3 to the controller 55 via the storage interface 37 of the storage control device 3 (step S107). The controller 55 records (queues) the received recording command in a buffer memory or the like. This recording command reception process is repeatedly executed the number of times equal to the number of recording commands stored in the RAM 33, i.e., the number of received triggers.

[0075] After receiving the recording command, the storage 5 receives the small data generated by dividing the data to be recorded (step S33). In detail, the following process is executed. The controller 55 analyzes the queued recording command and determines at which position (address) in the RAM 13 of the information processing device 1 the small data to be received is stored. The controller 55 receives the small data to be received from the identified position in the RAM 13 via the storage control device 3 (step S108). For example, the small data to be received is temporarily stored in the RAM 33 of the storage control device 3, and the controller 55 receives the small data stored in the RAM 33.

[0076] Thereafter, the controller 55 attempts to record the received small data on the page PA specified by the recording command (step S34). At this time, the controller 55 divides the received small data into fragments of the same size as the page PA, and sequentially records the fragments on the page PA.

[0077] If the recording of the small data is successful, i.e., if all fragments of the small data can be recorded continuously on page PA ("Yes" in step S35), the controller 55 notifies the storage control device 3 that the data recording was successful (steps S36, S109).

[0078] Thereafter, the controller 55 determines whether or not recording of all the small data corresponding to the plurality of received recording commands has been completed (step S37). That is, it determines whether or not there is any small data remaining to be recorded in the flash memory 53. If there is any small data remaining to be recorded ("No" in step S37), the data recording operation of the storage 5 returns to step S33. That is, the controller 55 continues recording the remaining small data.

[0079] When recording of all small data has been completed ("No" in step S37), the controller 55 determines whether or not a stop operation has been performed on the storage 5 (step S38). Unless a stop operation has been performed ("No" in step S38), steps S31 to S39 in Fig. 8 are repeatedly executed. On the other hand, when a stop operation has been performed ("Yes" in step S38), the storage 5 stops operating.

[0080] On the other hand, if the recording of the small data fails, that is, if an intermediate fragment among the fragments divided from the small data cannot be recorded to page PA ("No" in step S35), the controller 55 notifies the storage control device 3 that the data recording has failed (steps S39, S110). The controller 55 notifies the storage control device 3 that the recording of the small data has failed for one recording command to record the small data. That is, the storage 5 is notified that the data recording has succeeded or failed for each recording command. After notifying the fact that the data recording has failed, the controller 55 stops recording the small data in the current setting area.

[0081] As described above, if the recording of small data in the current set area fails halfway through (i.e., at a stage where the recording of data has not yet been completed up to the last page PA in the set area), the storage control device 3 notifies the fact that the recording of data in the current set area has failed, in units of the number of recording commands required to record the data to be recorded in the current set area. After that, the recording of the small data that was to be recorded in the current set area is resumed.

[0082] Therefore, after the recording of the small data in the current set area is stopped, the data recording operation of the storage 5 returns to step S31. That is, the recording of the small data in the current set area is resumed. In detail, a plurality of recording commands for which the storage control device 3 has notified an error are sent from the information processing device 1 to the storage 5 via the storage control device 3, and the controller 55 receives and queues these recording commands (steps S105 to S107). Thereafter, the small data to be recorded in accordance with these recording commands is sequentially sent from the information processing device 1 to the storage 5 via the storage control device 3 (step S108).

[0083] The controller 55 records the small data to be recorded in accordance with the received recording command (i.e., the small data that failed to be recorded in the current set area) in the flash memory 53 in accordance with the recording command that has been retransmitted and queued from the storage control device 3. At this time, the controller 55 re-records the small data to be recorded in accordance with the received recording command in another set area that is different from the set area in which the recording of the small data failed (i.e., the current set area) (i.e., resumes recording the small data from the first page PA of the other set area).

[0084] For example, as shown in Fig. 12, if the recording of small data #3 fails during the recording command #3 generated for recording small data #3, the controller 55 records new small data #0 to #7 in a set area different from the set area where the data recording failed, in accordance with the retransmitted recording commands #0 to #7. Fig. 12 is a diagram showing an example of re-recording of data that failed to be recorded.

[0085] This prevents data fragmentation within the set area (for example, one block BL), thereby suppressing subsequent execution of garbage collection, thereby preventing a decrease in the operating speed of the storage 5.

[0086] [6. Summary of recording operations] Below, we will explain in detail how the data to be recorded is recorded by the recording operation described above. In the following explanation, we will assume that the data to be recorded is divided into eight small data pieces (F0, F1, F2, ... F7). We will also assume that the size of the setting area that determines the completion condition is one block BL. In other words, we will assume that the completion condition is that small data pieces have been recorded consecutively within one block BL. We will also assume that one block BL has a size equivalent to eight small data pieces.

[0087] Here, assume that the data to be recorded, which has been divided into eight small data pieces, is to be recorded in the order of small data F0, F1, F2, ..., F7, starting from the first page PA of block BL, as shown in Figure 13. In this case, for example, if recording of small data piece F3 fails ((A) of Figure 13), other fragments cannot be recorded on page PA where recording of the fragment of small data piece F3 failed. Therefore, if this page PA is skipped and the next fragment is recorded on another page PA, data continuity will be lost. Figure 10 is a diagram schematically showing data recording in data recording system 100.

[0088] Therefore, in the data recording system 100, if the recording of (a fragment of) a small piece of data to a page PA fails while the data is being recorded in one block BL, it is determined that the recording of the small piece of data to this block BL has failed, and the recording of the data to this block BL is stopped at that point. Then, for example, the data is re-recorded to a new empty block BL.

[0089] On the other hand, if the data to be recorded can be recorded continuously in one block BL ((B) of Figure 13), it is determined that the recording state of the data to be recorded meets the completion condition, i.e., the data has been successfully recorded in that block BL, and the recording of the data to be recorded in that block BL is completed.

[0090] As described above, in the data recording system 100, when data continuity within the set area is ensured, that is, when the data to be recorded can be recorded continuously in the set area (when all small data that were to be recorded in this set area have been successfully recorded), it is determined that the recording of data in this set area has been successful, and that the recording of data in this set area has been completed.

[0091] On the other hand, if the continuity of data within the set area cannot be ensured, i.e., if the recording of specific small data fails while recording the data to be recorded in the set area, it is determined that the recording of data has failed for all of the small data that were to be recorded in this set area. In other words, if the recording of data fails for any of the recording commands for recording the data to be recorded in the specific set area, it is determined that the recording of data has failed for not only the recording command that failed to be recorded, but all of the recording commands generated for recording the data to be recorded in the specific set area.

[0092] Furthermore, when the continuity of data within a specific set area can no longer be ensured, the small data that was intended to be recorded in the specific set area is recorded in a set area other than the specific set area.

[0093] As a result, fragmentation of data in the storage 5 is suppressed, and hence the execution of garbage collection is suppressed. As a result, a decrease in the operating speed of the storage 5 can be suppressed.

[0094] On the other hand, as a comparative example, when recording of small data F3 in one block BL fails, the page PA where the small data F3 was to be recorded is skipped, the remaining small data is recorded in the specified page PA, and the small data F3 that failed to be recorded is recorded last, as shown in Figure 14, the small data F0 to F2 and F4 to F7 are recorded in a state that they fit into one block BL, while the small data F3 that was recorded last is recorded in another block BL (for example, the next block BL). Figure 14 is a diagram showing a schematic diagram of data recording in the comparative example.

[0095] As shown in Figure 14, if data to be recorded that could normally be recorded to fit into one block BL is recorded across two blocks BL, garbage collection will occur when this data to be recorded is erased to make the two blocks BL free blocks.

[0096] [7. Variation 1] As a modification of the data recording system 100, the controller 55 of the storage 5 may have the functions of the storage control device 3. That is, the controller 55 of the storage 5 may determine whether the completion conditions are met and notify the completion of recording of data in the set area or an error in recording data in the set area.

[0097] [8. Variation 2] Data that can be handled by the data recording system 100 is not limited to video. Even when other data is recorded, the same effects as those described above can be obtained.

[0098] 9. Features of the Disclosure (1) A data recording system disclosed herein includes a storage and a storage control device. The storage includes a flash memory and a controller. The flash memory has multiple blocks, which are units for erasing data. Each block includes multiple pages, which are units for recording data. The controller controls the recording of data in the flash memory. The storage control device controls the storage.

[0099] In this data recording system, the controller receives a plurality of recording commands for recording target data in the flash memory from the storage control device, and records the target data in the flash memory in accordance with the received plurality of recording commands.

[0100] Furthermore, the storage control device determines that the data has been successfully recorded in the set area if the data to be recorded can be continuously recorded in the set area. The set area is an area in the flash memory having a predetermined number of pages. If it determines that the data has been successfully recorded in the set area, the storage control device notifies the completion of the recording of the data in the set area, in units of the number of recording commands required to record the data to be recorded in the set area.

[0101] On the other hand, when the storage control device is unable to continuously record the data to be recorded in the set area, it determines that the data recording in the set area has failed.When it determines that the data recording in the set area has failed, the storage control device notifies the error in recording the data in the set area in units of the number of recording commands required to record the data to be recorded in the set area.

[0102] In the data recording system disclosed herein, if the storage control device is able to continuously record data to be recorded within a set area of ​​the storage, it determines that data recording to this set area has been successful and notifies the completion of data recording to the set area in units of the number of recording commands required to record the data to be recorded within this set area. On the other hand, if the storage control device is no longer able to continuously record data to be recorded within the set area of ​​the storage, it determines that data recording to this set area has failed and notifies the completion of data recording to the set area in units of the number of recording commands required to record the data to be recorded within this set area. In other words, if the recording of data to be recorded within a specific set area fails for any recording command, it is determined that the recording of data has failed for all recording commands to record data to be recorded within this specific set area, not just for the failed recording command. This reduces data fragmentation in the storage and the need for garbage collection. As a result, a decrease in the operating speed of the storage can be suppressed.

[0103] (2) In the data recording system described in (1) above, the set area may be set in units of blocks. This can prevent data fragmentation within a block. As a result, the number of blocks required to record data can be prevented from increasing from the initial number.

[0104] (3) In the data recording system of (1) or (2) above, the set area may be determined in units of the amount of data that can be recorded in a block. This allows for a set area to be determined without having to consider the block boundary positions.

[0105] (4) In the data recording systems described in (1) to (3) above, when an error is notified, the storage control device may retransmit the plurality of recording commands for which the error was notified to the storage. In this case, the controller records the data to be recorded according to the plurality of recording commands received from the storage control device in a set area other than the set area in which the attempt to record the data failed. This prevents the data that failed to be recorded from being forgotten and also prevents the data from being recorded in fragments.

[0106] (5) In the data recording systems described in (1) to (4) above, the controller may notify the storage control device whether or not the data recording was successful for each of a plurality of recording commands. This allows the storage control device 3 to grasp the success or failure of data recording for each recording command.

[0107] (6) In the data recording systems described above in (1) to (5), the storage may be included in a storage control device, thereby realizing an integrated data recording system.

[0108] (7) In the data recording systems described above in (1) to (6), the storage may be connected to a storage control device via a network, thereby realizing a data recording system that remotely controls the storage.

[0109] (8) A storage according to the present disclosure includes a flash memory and a controller. The flash memory has a plurality of blocks. Each block includes a plurality of pages, which are units of data recording. The controller controls recording of data in the flash memory. In this storage, the controller receives a plurality of recording commands for recording data to be recorded in the flash memory, and records the data to be recorded in the flash memory in accordance with the received recording commands.

[0110] In the above storage, completion of data recording is notified in units of the number of recording commands required to record the data to be recorded in the set area when it is determined that the data to be recorded has been successfully recorded in the set area because the data to be recorded has been recorded continuously in the set area.

[0111] On the other hand, when it is determined that the recording of data into the set area has failed because the data to be recorded can no longer be recorded continuously within the set area, a data recording error is notified in units of the number of recording commands required to record the data to be recorded within the set area.

[0112] In the storage disclosed herein, if the storage is able to continuously record target data within a set area of ​​the storage, it determines that the data has been successfully recorded in this set area, and notifies the completion of data recording in the set area in units of the number of recording commands required to record the target data in this set area. On the other hand, if the storage is no longer able to continuously record target data within the set area, it determines that the data has been unsuccessfully recorded in this set area, and notifies an error in the data recording in the set area in units of the number of recording commands required to record the target data in this set area. In other words, if the recording of target data fails for any recording command for recording target data within a specific set area, it is determined that the data recording has failed for all recording commands for recording target data within the specific set area, not just the failed recording command. This reduces data fragmentation in the storage and the need for garbage collection. As a result, it is possible to prevent a decrease in the operating speed of the storage.

[0113] (9) A control method disclosed herein is a control method for a storage device having a flash memory having a plurality of blocks, which are units for erasing data. Each block includes a plurality of pages, which are units for recording data. The control method includes the following steps: (i) receiving a plurality of recording commands for recording data to be recorded in a flash memory; (ii) recording the data to be recorded in the flash memory in accordance with the plurality of received recording commands; (iii) A step of determining that the recording of data into the set area has been successful if the data to be recorded can be recorded continuously within the set area, and notifying the completion of recording of data into the set area, based on the number of recording commands required to record the data to be recorded within the set area. (iv) A step of determining that the recording of data into the set area has failed when the data to be recorded cannot be recorded continuously within the set area, and notifying an error in recording data into the set area, in units of the number of recording commands required to record the data to be recorded within the set area.

[0114] In the storage control method disclosed herein, if the target data can be continuously recorded in a set area of ​​the storage, it is determined that the data has been successfully recorded in the set area, and a notification of the completion of data recording in the set area is sent in units of the number of recording commands required to record the target data in the set area. On the other hand, if the target data cannot be continuously recorded in the set area, it is determined that the data has not been successfully recorded in the set area, and a notification of an error in the data recording in the set area is sent in units of the number of recording commands required to record the target data in the set area. In other words, if the recording of the target data fails for any recording command for recording the target data in a specific set area, it is determined that the data recording has failed for all recording commands for recording the target data in the specific set area, not just the failed recording command. This reduces data fragmentation in the storage and the need for garbage collection. As a result, a decrease in the operating speed of the storage can be prevented. [Industrial Applicability]

[0115] The present disclosure is applicable to a data recording system for recording data in a storage. [Explanation of symbols]

[0116] 100: Data recording system 1: Information processing equipment 11: CPU 13: RAM 15: Storage device 17: Video interface 19: Network Interface 3: Storage control device 31: CPU 33: RAM 35: Storage device 37: Storage interface 39: Network Interface 5: Storage 51: Access port 53: Flash memory 55: Controller 57: Storage section 7: Video output device RA: Recording area SA: Spare area UA: Available area BL: Block F0~F7: Small data

Claims

1. a flash memory having a plurality of pages, each of which is a data recording unit, and a plurality of blocks, each of which is a data erasure unit; a controller for controlling the recording of data into said flash memory; a storage having a storage control device that controls the storage; Equipped with The controller receiving a plurality of recording commands from the storage control device for recording target data in the flash memory; Recording the data to be recorded in the flash memory in accordance with the received recording commands; The storage control device When the data to be recorded can be continuously recorded in a set area having a predetermined number of pages, it is determined that the data recording in the set area has been successful, and a notification is given of the completion of the recording of the data in the set area in units of the number of recording commands required to record the data to be recorded in the set area; when the data to be recorded cannot be continuously recorded in the set area, it is determined that the data recording in the set area has failed, and an error in the recording of data in the set area is notified in units of the number of recording commands required to record the data to be recorded in the set area. Data recording system.

2. 2. The data recording system according to claim 1, wherein the set area is in units of blocks.

3. 3. The data recording system according to claim 2, wherein the set area is determined in units of an amount of data that can be recorded in a block.

4. If the error is reported, the storage control device retransmits the plurality of recording commands for which the error was notified to the storage; 2. The data recording system of claim 1, wherein the controller records the data to be recorded according to the received recording commands in another set area different from the set area in which the attempt to record the data failed, in accordance with the multiple recording commands retransmitted from the storage control device.

5. 2. The data recording system according to claim 1, wherein the controller notifies the storage control device whether or not the data has been successfully recorded in response to each of a plurality of recording commands.

6. The data recording system according to claim 1 , wherein the storage is included in the storage control device.

7. 2. The data recording system according to claim 1, wherein the storage is connected to the storage control device via a network.

8. a flash memory having a plurality of pages, each of which is a data recording unit, and a plurality of blocks, each of which is a data erasure unit; a controller for controlling the recording of data into said flash memory; Equipped with The controller receiving a plurality of recording commands for recording data to be recorded in the flash memory; Recording the data to be recorded in the flash memory in accordance with the received recording commands; When it is determined that the data to be recorded has been successfully recorded in a set area having a predetermined number of pages, the completion of the data recording is notified in units of the number of recording commands necessary to record the data to be recorded in the set area, When it is determined that the data to be recorded has failed to be recorded in the set area because the data to be recorded cannot be continuously recorded in the set area, the data recording error is notified in units of the number of recording commands necessary to record the data to be recorded in the set area. Storage.

9. 1. A method for controlling a storage device having a flash memory, each of which includes a plurality of pages as a data recording unit and a plurality of blocks as a data erasure unit, comprising: receiving a plurality of recording commands for recording data to be recorded in the flash memory; recording the data to be recorded in the flash memory in accordance with the received recording commands; a step of determining that the data has been successfully recorded in the set area when the data to be recorded can be continuously recorded in the set area having a predetermined number of pages, and notifying the completion of the recording of the data in the set area in units of recording commands required to record the data to be recorded in the set area; a step of determining that the recording of data into the set area has failed when the data to be recorded cannot be continuously recorded in the set area, and notifying an error in the recording of data into the set area in units of recording commands necessary to record the data to be recorded in the set area; A control method comprising:

Citation Information

Patent Citations

  • Disk controlling method

    JP1995325669A

  • Program, control method, storage device, and system

    JP2013210749A

  • Memory system

    JP2019215777A

  • Semiconductor device, control method, and program

    JP2020119329A