Information processing apparatus

By managing the association between data and logical addresses, the information processing device can stop writing upon receiving write and pruning requests, thus solving the wear and tear problem caused by invalid data in the storage system and extending the lifespan of the memory.

CN116775504BActive Publication Date: 2026-11-20KIOXIA CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211107056.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2022-03-15
Filing Date
2022-09-09
Publication Date
2026-11-20
Estimated Expiration
2042-09-09

AI Technical Summary

Technical Problem

In a storage system, when write and prune requests for the same logical address are sent at short intervals, data in non-volatile memory becomes invalid, causing wear and tear.

Method used

The information processing device manages the association between data and logical addresses, sends write commands and receives responses, deletes data, terminates write requests, updates management data, and reduces the writing of invalid data.

Benefits of technology

It reduces wear and tear on non-volatile memory within the storage system, thus extending the lifespan of the memory.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116775504B_ABST
    Figure CN116775504B_ABST
Patent Text Reader

Abstract

Embodiments of the present invention relate to a technique of controlling a nonvolatile memory. The present invention provides an information processing apparatus capable of mitigating wear of a nonvolatile memory in a storage system. The information processing apparatus according to an embodiment has a CPU. The CPU sends a write instruction associated with first data and specifying a first LBA range to the storage system. The CPU sends an instruction to at least suspend writing to a second LBA range to the storage system in a case where either of a request to write second data to a third LBA range and a request to deallocate the third LBA range is made before a second response to the write instruction is received, the third LBA range including the second LBA range as at least a part of the first LBA range.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Citation of relevant applications

[0002] This application claims priority based on Japanese Patent Application No. 2022-040562, filed on March 15, 2022, the entire contents of which are incorporated herein by reference. Technical Field

[0003] Embodiments of the present invention relate to techniques for controlling non-volatile memory. Background Technology

[0004] In recent years, storage systems with non-volatile memory have become widely used. Solid-state drives (SSDs) with NAND flash memory are one such storage system. SSDs are used as main storage in various computing devices.

[0005] For example, when a write request is received from the host, the storage system writes the user data received from the host along with the write request to the non-volatile memory and returns a response to the host.

[0006] Alternatively, the storage system may sometimes write a specific data unit of user data to non-volatile memory after the total amount of user data requested to be written by multiple write requests received from the host has reached a specific data unit, and then return responses corresponding to each of the multiple write requests to the host. A specific data unit is, for example, the amount of data that can be written to non-volatile memory in a single write operation. That is, the storage system can use a mechanism that does not immediately execute the write corresponding to a single accepted write request, but instead executes the write corresponding to these multiple write requests after the total amount of user data requested to be written by multiple write requests has reached a specific data unit. This mechanism is also referred to below as delayed write completion.

[0007] In delayed write completion, for example, user data comprising multiple write units corresponding to multiple write requests is written to non-volatile memory, thus enabling efficient utilization of the non-volatile memory's storage area. Delayed write completion also allows for the delay of writing and responding to each write request before accepting multiple write requests corresponding to the user data in the write unit.

[0008] Furthermore, when multiple write requests specifying the same logical address are sent to the storage system with a short interval, for that logical address, the data corresponding to the earlier write request is written to non-volatile memory, and the data corresponding to the later write request is also written to non-volatile memory. That is, because the data corresponding to the later write request is written to non-volatile memory, the data written to non-volatile memory corresponding to the earlier write request becomes invalid.

[0009] Alternatively, if write requests and trim requests specifying the same logical address are issued at short intervals, for that logical address, the data corresponding to the earlier write request is written to non-volatile memory, and the data corresponding to the later trim request is released from the allocation of that logical address. That is, because the allocation of that logical address is released due to the later trim request, the data written to non-volatile memory corresponding to the earlier write request becomes invalid.

[0010] In this situation, the non-volatile memory becomes worn out because data that immediately becomes invalid is written to it. Summary of the Invention

[0011] Embodiments of the present invention provide an information processing apparatus capable of reducing wear and tear on non-volatile memory within a storage system.

[0012] According to an embodiment, the information processing apparatus is capable of being connected to a storage system. The information processing apparatus includes non-volatile memory and a processor. The processor stores first data in the non-volatile memory. The processor stores first management data in the non-volatile memory, the first management data being associated with the first data and containing information corresponding to a first write instruction specifying a first logical address range. The processor performs a first transmission of the first write instruction to the storage system. Based on receiving a first response from the storage system for the first transmitted first write instruction, the processor appends information indicating that a first response to the first transmitted first write instruction has been received to the first management data. After receiving the first response, based on receiving a second response from the storage system for the first write instruction, the processor deletes the first data and the first management data from the non-volatile memory. Before receiving the second response to the first write instruction, if requested to write second data into a third logical address range containing at least a portion of the first logical address range, or to release the allocation of the third logical address range, the processor sends an instruction to the storage system to at least abort the writing of first data into the second logical address range corresponding to the first write instruction. If the processor successfully aborts the write to the second logical address range, it updates or deletes the first management data.

[0013] The information processing device with the above structure can reduce wear and tear on non-volatile memory in the storage system. Attached Figure Description

[0014] Figure 1 This is a block diagram illustrating a structural example of an information processing system that includes the information processing apparatus and storage system of the first embodiment.

[0015] Figure 2 This is a diagram illustrating an example of the structure of a locked data list used in the information processing apparatus of the first embodiment.

[0016] Figure 3 This is a diagram illustrating an example of the mapping between logical address space and physical address space used in the information processing apparatus of the first embodiment.

[0017] Figure 4 This is a diagram illustrating an example of the structure of a Physical Region Page (PRP) entry used in the information processing apparatus of the first embodiment.

[0018] Figure 5 This is a diagram showing an example of a list of PRP entries used in the information processing apparatus of the first embodiment.

[0019] Figure 6 This is a diagram illustrating an example of a Scatter Gather List (SGL) used in the information processing apparatus of the first embodiment.

[0020] Figure 7 This is a diagram illustrating a structural example of range information used in an information processing system that includes the information processing apparatus of the first embodiment.

[0021] Figure 8 This is a diagram illustrating an example of the structure of correction instruction data used in an information processing system including the information processing apparatus of the first embodiment.

[0022] Figure 9 This is a diagram illustrating an example of the structure of a logical-physical address translation table used in a storage system that communicates with the information processing apparatus of the first embodiment.

[0023] Figure 10 This is a diagram illustrating an example of the structure of a write management table used in a storage system that communicates with the information processing apparatus of the first embodiment.

[0024] Figure 11 This is a block diagram illustrating an example of a write operation in an information processing system including the information processing apparatus of the first embodiment.

[0025] Figure 12 This diagram illustrates an example of the state of the logical address space and physical address space at the point in time when a write request was made in the information processing apparatus of the first embodiment.

[0026] Figure 13 This diagram illustrates an example of an action performed in the information processing apparatus of the first embodiment before the notification to the write request source has finished writing.

[0027] Figure 14 This is a diagram showing a first example of an updated lock data list in the information processing apparatus of the first embodiment.

[0028] Figure 15 This is a diagram showing a second example of the updated lock data list in the information processing apparatus of the first embodiment.

[0029] Figure 16 This is a block diagram illustrating another example of a write operation in an information processing system including the information processing apparatus of the first embodiment.

[0030] Figure 17 This is a diagram showing a third example of the updated lock data list in the information processing apparatus of the first embodiment.

[0031] Figure 18 This diagram illustrates an example of an action performed after an application attempts to write to a write-prohibited storage area in the information processing apparatus of the first embodiment.

[0032] Figure 19 This is a block diagram illustrating yet another example of a write operation in an information processing system including the information processing apparatus of the first embodiment.

[0033] Figure 20 This is a diagram illustrating an example of a write request or trim request (write / trimming request) in the information processing apparatus of the first embodiment.

[0034] Figure 21 This is a block diagram illustrating yet another example of a write operation in an information processing system including the information processing apparatus of the first embodiment.

[0035] Figure 22 This is a block diagram illustrating an example of an abort operation in an information processing system including the information processing apparatus of the first embodiment.

[0036] Figure 23 This is a diagram showing a fourth example of an updated locked data list in an information processing system including the information processing apparatus of the first embodiment.

[0037] Figure 24 This is a block diagram illustrating an example of a trimming operation in an information processing system including the information processing apparatus of the first embodiment.

[0038] Figure 25 This is a block diagram illustrating another example of a trimming operation in an information processing system that includes the information processing apparatus of the first embodiment.

[0039] Figure 26This is a diagram illustrating another example of a write / trim request in the information processing apparatus of the first embodiment.

[0040] Figure 27 This is a diagram illustrating yet another example of a write / prune request in the information processing apparatus of the first embodiment.

[0041] Figure 28 This is a diagram illustrating yet another example of a write / prune request in the information processing apparatus of the first embodiment.

[0042] Figure 29 This is a block diagram illustrating an example of a correction operation in an information processing system including the information processing apparatus of the first embodiment.

[0043] Figure 30 This diagram illustrates an example of correction instruction data generated in an information processing system including the information processing apparatus of the first embodiment.

[0044] Figure 31 This is a diagram showing a fifth example of an updated locked data list in an information processing system including the information processing apparatus of the first embodiment.

[0045] Figure 32 This is a diagram illustrating yet another example of a write / prune request in the information processing apparatus of the first embodiment.

[0046] Figure 33 This is a diagram illustrating an example of a write command issued in the information processing apparatus of the first embodiment.

[0047] Figure 34 This is a diagram illustrating another example of a write command issued in the information processing apparatus of the first embodiment.

[0048] Figure 35 This is a block diagram illustrating yet another example of a write operation in an information processing system including the information processing apparatus of the first embodiment.

[0049] Figure 36 This is a diagram representing a sixth example of an updated locked data list in an information processing system including the information processing apparatus of the first embodiment.

[0050] Figure 37 This is a block diagram illustrating an example of a recovery operation in an information processing system including the information processing apparatus of the first embodiment.

[0051] Figure 38 This is a flowchart illustrating an example of the steps of write request control processing performed in the information processing apparatus of the first embodiment.

[0052] Figure 39This is a flowchart illustrating an example of the write request processing steps performed in the information processing apparatus of the first embodiment.

[0053] Figure 40 This is a flowchart illustrating an example of write control processing steps performed in a storage system that communicates with the information processing apparatus of the first embodiment.

[0054] Figure 41 This is a flowchart illustrating an example of the steps of abnormal termination control processing performed in a storage system that communicates with the information processing apparatus of the first embodiment.

[0055] Figure 42 This is a flowchart illustrating an example of the steps of correction control processing performed in a storage system that communicates with the information processing apparatus of the first embodiment.

[0056] Figure 43 This is a flowchart illustrating an example of the write response receiving process performed in the information processing apparatus of the first embodiment.

[0057] Figure 44 This is a flowchart illustrating an example of the steps involved in receiving and processing an abnormal termination response performed in the information processing apparatus of the first embodiment.

[0058] Figure 45 This is a flowchart illustrating an example of the steps of the correction response receiving process performed in the information processing apparatus of the first embodiment.

[0059] Figure 46 This is a flowchart illustrating another step of the write request control process performed in the information processing apparatus of the first embodiment.

[0060] Figure 47 This is a flowchart illustrating an example of the steps combined with write request processing performed in the information processing apparatus of the first embodiment.

[0061] Figure 48 This is a flowchart illustrating an example of the steps of the trimming request control processing performed in the information processing apparatus of the first embodiment.

[0062] Figure 49 This is a flowchart illustrating an example of the steps involved in trimming request processing performed in the information processing apparatus of the first embodiment.

[0063] Figure 50 This is a flowchart illustrating an example of the steps of trimming control processing performed in a storage system that communicates with the information processing apparatus of the first embodiment.

[0064] Figure 51This is a flowchart illustrating an example of the trimming response receiving process performed in the information processing apparatus of the first embodiment.

[0065] Figure 52 This is a flowchart illustrating an example of the steps for resuming write request processing performed in the information processing apparatus of the first embodiment.

[0066] Figure 53 This is a flowchart illustrating an example of the steps involved in the duplicate exclusion process performed in the information processing apparatus of the first embodiment.

[0067] Figure 54 This is a flowchart illustrating an example of the steps of the entry control processing performed in the information processing apparatus of the first embodiment.

[0068] Figure 55 This is a block diagram illustrating a structural example of an information processing system that includes the information processing apparatus and storage system of the second embodiment.

[0069] Figure 56 This is a diagram illustrating an example of rewriting a memory-mapped file in the information processing apparatus of the second embodiment.

[0070] Figure 57 This is a block diagram illustrating an example of a write operation in an information processing system including the information processing apparatus of the second embodiment.

[0071] Figure 58 This is a block diagram illustrating another example of a write operation in an information processing system including the information processing apparatus of the second embodiment.

[0072] Figure 59 This is a diagram illustrating a first example of a memory-mapped file in the information processing apparatus of the second embodiment.

[0073] Figure 60 This is a block diagram illustrating an example of an abnormal termination operation in an information processing system including the information processing apparatus of the second embodiment.

[0074] Figure 61 This is a diagram illustrating a second example of a memory-mapped file in the information processing apparatus of the second embodiment.

[0075] Figure 62 This is a diagram illustrating a third example of a memory-mapped file in the information processing apparatus of the second embodiment.

[0076] Figure 63 This is a block diagram illustrating an example of a correction operation in an information processing system including the information processing apparatus of the second embodiment.

[0077] Figure 64 This is a flowchart illustrating an example of the write request processing steps performed in the information processing apparatus of the second embodiment.

[0078] Figure 65 This is a flowchart illustrating an example of the steps of write request control processing performed in the information processing apparatus of the second embodiment. Detailed Implementation

[0079] The embodiments will now be described with reference to the accompanying drawings.

[0080] According to an embodiment, the information processing apparatus is capable of being connected to a storage system. The information processing apparatus includes non-volatile memory and a processor. The processor stores first data in the non-volatile memory. The processor stores first management data in the non-volatile memory, the first management data being associated with the first data and containing information corresponding to a first write instruction specifying a first logical address range. The processor performs a first transmission of the first write instruction to the storage system. Based on receiving a first response from the storage system for the first transmitted first write instruction, the processor appends information indicating that a first response to the first transmitted first write instruction has been received to the first management data. After receiving the first response, based on receiving a second response from the storage system for the first write instruction, the processor deletes the first data and the first management data from the non-volatile memory. Before receiving the second response to the first write instruction, if requested to write second data into a third logical address range containing at least a portion of the first logical address range, or to release the allocation of the third logical address range, the processor sends an instruction to the storage system to at least abort the writing of first data into the second logical address range corresponding to the first write instruction. If the processor successfully aborts the write to the second logical address range, it updates or deletes the first management data.

[0081] First, refer to Figure 1 The structure of the information processing system 1, which includes the information processing apparatus of the first embodiment, will be described. The information processing system 1 includes an information processing apparatus 2 and a storage system 3.

[0082] The information processing device 2 can be a storage server that stores large amounts of diverse data in the storage system 3, or it can be a server or a personal computer. Hereinafter, the information processing device 2 will also be referred to as host 2.

[0083] Storage system 3 is a semiconductor storage device configured to write data to and read data from non-volatile memory such as NAND flash memory. Storage system 3 is also called a storage device. Storage system 3 is implemented, for example, as a solid-state drive (SSD).

[0084] Storage system 3 can be used as a storage device for host 2. Storage system 3 can be built into host 2 or connected to host 2 via cable or network.

[0085] The interface used to connect host 2 to storage system 3 is based on standards such as PCI Express (PCIe, Peripheral Component Interconnect Bus) (registered trademark), Ethernet (registered trademark), Fibre Channel, and NVM Express (NVMe, Non-Volatile Memory Bus) (registered trademark).

[0086] The following describes the structural examples of host 2 and storage system 3.

[0087] (Example of host 2's structure)

[0088] Host 2 may include, for example, a CPU 21, random access memory (RAM) 22, a storage device interface (storage device I / F) 23, non-volatile random access memory (NVRAM) 24, RAM interface (RAM I / F) 25, and NVRAM interface (NVRAM I / F) 26. The CPU 21, storage device I / F 23, RAM I / F 25, and NVRAM I / F 26 may be connected via bus 20.

[0089] CPU 21 is, for example, at least one processor. CPU 21 controls the operation of various components within host 2.

[0090] RAM 22 is volatile memory. RAM 22 is implemented, for example, as dynamic random access memory (DRAM) or static random access memory (SRAM). The storage area of ​​RAM 22 is allocated, for example, as a storage area for the operating system (OS) 221, drivers 222, and various application programs 223. Hereinafter, application programs 223 will also be referred to as application 223.

[0091] Storage device I / F 23 functions as a control circuit for communication between the control host 2 and the storage system 3. Storage device I / F 23 sends various instructions to the storage system 3, such as input / output (I / O) instructions and various control instructions. I / O instructions include, for example, write instructions and read instructions. Control instructions include, for example, trim instructions (unmapping instructions), abort instructions, correction instructions, and flush instructions.

[0092] A pruning command is used to deallocate a region of flash memory allocated to a specified logical address range. Examples of pruning commands include, for instance, the DatasetManagement command specified in the NVMe standard.

[0093] The logical address range includes one or more logical addresses. These logical addresses are used by host 2 to assign addresses to storage system 3. The logical address range provided by storage system 3 to host 2 can be divided into multiple namespaces. Namespaces are identified by namespace IDs, and each namespace has an independent logical address space. A logical address is, for example, a logical block address (LBA). The following primarily illustrates the use of LBAs as logical addresses. User data within a namespace is logically stored in sectors of a certain size. The sector size is determined by the LBA. The sector size does not need to be the same across namespaces.

[0094] A pruning instruction may include, for example, a data pointer representing a location within host 2, a specified value for the allocation and release process (pruning process) of LBA ranges, and the number of LBA ranges to be released. The location within host 2, indicated by the data pointer, stores information representing the LBA ranges to be released. This information representing LBA ranges is also called range information. The range information associated with the pruning instruction is information representing the LBA ranges that should be released according to the pruning instruction.

[0095] An abnormal termination instruction is used to abort the execution of instructions issued to storage system 3. Abnormal termination instructions are defined, for example, by the NVMe standard. An abnormal termination instruction contains information that uniquely identifies the instruction that should be aborted. This uniquely identifying information includes, for example, the instruction's identification information (instruction ID). An abnormal termination instruction, for example, is used to abort the execution of a write instruction issued to storage system 3.

[0096] A correction instruction is used to cancel (abort) a portion of a write operation to an LBA range specified by an issued write instruction. When canceling a portion of a write operation to an LBA range specified by an issued write instruction, the correction instruction includes, for example, information that uniquely identifies the write instruction and information indicating the LBA range to be canceled (range information). The correction instruction may include information about a location within host 2 that stores information indicating the LBA range to be canceled. The information indicating the LBA range to be canceled may represent multiple LBA ranges within the LBA range specified by the corresponding write instruction. The range information associated with the correction instruction is information indicating the LBA range to which the write operation should be canceled according to the correction instruction.

[0097] Refresh commands include special refresh commands and general refresh commands.

[0098] The special refresh instruction, for incomplete write and trim instructions, returns the first completed instruction (described later) to storage system 3, causing storage system 3 to return to the second completed instruction. More specifically, the special refresh instruction is used to complete the write instruction processing by writing the user data that has not yet been written to the non-volatile memory of storage system 3 from the storage area of ​​host 2 to the non-volatile memory of storage system 3. Additionally, the special refresh instruction is used to complete the trim instruction processing.

[0099] A general refresh instruction is as follows: it is used to write user data written to a volatile write cache in volatile memory such as DRAM within storage system 3 to non-volatile memory in storage system 3. As described later, the I / O handling unit 210 of host 2 provides a virtual power loss protection function (virtual PLP function) to application 223 and OS 221. Therefore, when application 223 or OS 221 makes an I / O request to I / O handling unit 210, it does not need to consider whether the non-volatile write cache exists in I / O handling unit 210 or the destination (e.g., storage system 3) to which I / O handling unit 210 transmits the I / O request. Therefore, even if I / O handling unit 210 receives a request to issue a general refresh instruction from application 223 or OS 221, it does not perform any action, but always replies to application 223 or OS 221 that it is successfully completed.

[0100] When a write command is received from the host, a storage system with PLP functionality writes user data to the volatile write cache and returns a completion response to the host before writing the user data to non-volatile memory. Thus, the storage system demonstrates high-speed write capability relative to the host. In the event of a power outage, the storage system uses the PLP function to write user data from the volatile write cache that has not yet been written to non-volatile memory to non-volatile memory. Thus, the storage system appears to exist relative to the host as if the volatile write cache did not exist. Hereinafter, the volatile write cache of a storage system with such PLP functionality will be referred to as a write cache with PLP. Furthermore, in many cases, the energy stored in capacitors within the storage system is utilized in the PLP function.

[0101] The I / O processing unit 210 provides virtual PLP functionality to application 223 or OS 221. The virtual PLP functionality is as follows: it recovers writes of user data to storage system 3 (more specifically, the non-volatile memory of storage system 3) that failed due to abnormal termination of host 2, abnormal power failure of storage system 3, or unintentional restart of storage system 3, by using data stored in NVRAM 24. In other words, the I / O processing unit 210 uses NVRAM 24 and storage system 3 to provide application 223 or OS 221 with a virtual storage system featuring PLP functionality.

[0102] NVRAM 24 is a non-volatile memory. NVRAM 24 is also called storage-class memory (SCM). For example, MRAM (Magnetoresistive Random Access Memory), PRAM (Phase Change Random Access Memory), ReRAM (Resistive Random Access Memory), or FeRAM (Ferroelectric Random Access Memory) can be used as NVRAM 24. The storage area of ​​NVRAM 24 is allocated as a buffer area for data buffer 241, an area for submit queue (SQ) 242, an area for completion queue (CQ) 243, a storage area for pointer list 244, and a storage area for various data used for processing by host 2. The various data used for processing by host 2 includes, for example, a locked data list 245 and correction instruction data 246.

[0103] Data buffer 241 is a storage area that temporarily stores user data to be written to the non-volatile memory of storage system 3, as well as information (range information) indicating the LBA range to be deallocated.

[0104] Submission queue 242 is a queue that stores instructions for sending from host 2 to storage system 3. Submission queue 242 is logically circular; that is, the same area is reused.

[0105] Completion queue 243 is a queue that holds responses (completions) returned from storage system 3 to host 2. Storage system 3 can respond to multiple completions for a single write instruction. Storage system 3 can respond to multiple completions for a single prune instruction. Completion queue 243 is also logically circular.

[0106] Additionally, host 2 may implement additional commit queues 242 or completion queues 243 for a single memory system 3 for each type of instruction, such as for management instructions and for input / output (I / O) instructions like read or write instructions. Furthermore, host 2 may also implement a group of multiple commit queues 242 / completion queues 243 for I / O instructions for a single memory system 3. In this embodiment, although the commit queues 242 / completion queues 243 are configured in NVRAM 24, commit queues 242 / completion queues 243 other than those for write and trim instructions may also be configured in RAM 22.

[0107] Pointer list 244 is a list of pointers representing the locations of user data associated with write or read instructions on data buffer 241. In this embodiment, although pointer list 244 is stored in NVRAM 24, it can also be stored in RAM 22.

[0108] Lock data list 245 is a list used to manage the processing status of write and prune commands issued from host 2 to storage system 3. One lock data list 245 corresponds to, for example, one storage system 3. More specifically, one lock data list 245 is associated with, for example, the identification information (driver ID) of the corresponding storage system 3.

[0109] Correction instruction data 246 is data used to manage information related to correction instructions issued from host 2 to storage system 3. One correction instruction data 246 corresponds, for example, to one LBA range where a write has been cancelled.

[0110] RAM I / F 25 functions as a RAM control circuit configured to control access to RAM 22.

[0111] NVRAM I / F 26 functions as an NVRAM control circuit configured to control access to NVRAM 24.

[0112] Figure 2 This illustrates a structure example of a lock data list 245 used by host 2. The lock data list 245 may contain one or more entries corresponding to one or more write commands and pruning commands sent from host 2 to storage system 3, respectively. In the lock data list 245, the one or more entries are stored in the order in which the write request or pruning request is received by application 223 or OS 221. Therefore, the area storing one or more entries is managed in the form of a ring buffer, a list structure linked by pointers, or other forms that allow for the reuse of freed areas.

[0113] Each entry includes, for example, an SQ entry information field, a completion order field, a data area management information field, a completion status field, and a pointer field to the correction instruction data.

[0114] The SQ entry information field displays the information (SQ entry information) representing the corresponding write or trim command. The SQ entry information includes the type of command, its content, and the parameters required for execution. The SQ entry information fields corresponding to write commands and trim commands will be explained in detail below.

[0115] (Corresponding to the SQ entry information field of the write command)

[0116] The SQ entry information fields corresponding to the write instruction include, for example, the instruction opcode, data pointer, instruction ID, namespace ID, LBA, and data length.

[0117] An instruction opcode is a code that indicates the type of the corresponding instruction (in this case, a write instruction). For example, an opcode defined by the NVMe standard can be used as an instruction opcode.

[0118] A data pointer indicates information about a location on host 2 where user data to be written according to the corresponding write command is stored. Data pointers can be, for example, Physical RegionPage (PRP) entries or lists thereof as defined by the NVMe standard, or Scatter Gather Lists (SGLs). When using PRPs, pointers to the list of PRP entries are stored in the SQ entry information field. When using SGLs, the address of the first SGL segment is stored in the SQ entry information field; this segment contains only the second segment and a descriptor indicating its size. Additionally, the list of PRP entries and subsequent SGL segments are stored in pointer list 244.

[0119] First, let's explain PRP in detail. PRP maps the storage area of ​​user data corresponding to a contiguous range of logical addresses in the logical address space to a range of physical addresses in the physical address space.

[0120] Figure 3This example illustrates the mapping between logical address space 91 and physical address space 92. Logical address space 91 is the space used by host 2 to specify logical addresses (e.g., LBAs, as described above) for the storage system 3. In this example, physical address space 92 is the physical address space used to specify addresses for the storage area of ​​data buffer 241. Logical address space 91 and physical address space 92 are divided, for example, in page-size units. Pages in logical address space 91 (hereinafter also referred to as logical pages) and pages in physical address space 92 (hereinafter also referred to as physical pages) are mapped one-to-one. Furthermore, physical address space 92 is typically smaller than logical address space 91. Consecutive logical addresses in logical address space 91 can be mapped to non-consecutive physical addresses in physical address space 92. Storage system 3 uses physical addresses to access host 2's data buffer 241. Therefore, host 2 needs to convert the range of logical addresses in logical address space 91, represented only by the initial logical address and data length, into the range of physical addresses in physical address space 92 in write instructions and hand it over to storage system 3. This physical address is data called a PRP entry.

[0121] Figure 4 Here's an example of the structure of a PRP entry. A PRP entry represents a single physical address. The data size of a PRP entry is, for example, 8 bytes (64 bits). A PRP entry contains two areas: a base address and an offset. The base address area represents the physical address at the beginning of a physical page. The size of the base address area is, for example, 52 bits. The offset area represents the offset from the beginning of that physical page. The size of the offset area is, for example, 12 bits.

[0122] Hereinafter, a physical page whose base address is physical address N will also be referred to as physical page N. Furthermore, for example, if the data size of a single PRP entry is 8 bytes, in order to ensure that the last PRP entry in a physical page does not cross the physical page boundary, the offset needs to match the 8-byte boundary (i.e., the lower 3 bits of the offset are zero).

[0123] Figure 5 Presented as a PRP item list Figure 3 An example of a user data area is shown. Figure 5 As shown in (a), the area of ​​the data pointer for one I / O instruction (write instruction) can contain fields 921 and 922 of two PRP entries.

[0124] Field 921 of the first PRP entry contains the base address of the original physical page containing the user data and an offset indicating the starting position of the user data within that physical page.

[0125] Field 922 of the second PRP entry is used when the size of the user data is greater than the size of the storage area of ​​the data buffer 241 shown in the first PRP entry. When the size of the user data is less than the sum of the size of the storage area shown in the first PRP entry and the capacity of another physical page, field 922 of the second PRP entry contains the base address of the second physical page. In this case, since the user data is saved from the beginning of the second physical page, the offset is zero.

[0126] When user data spans more than three pages, field 922 of the second PRP entry contains the physical address of a list of PRP entries, which includes subsequent PRP entries. The PRP entry list is a list of pointers 244.

[0127] exist Figure 3 and Figure 5 In the example shown in (a), field 921 of the first PRP entry indicates the position of the offset α of the physical page D, that is, the beginning of the user data is stored at the physical address D+α.

[0128] exist Figure 3 and Figure 5 In the example shown in (a), field 922 of the second PRP entry indicates the location of the second and subsequent PRP entries starting from the physical address X+λ at the offset λ of the physical page X (not shown).

[0129] like Figure 5 As shown in (b), the subsequent PRP entry lists stored at physical address X+λ indicate that user data is stored in physical pages A, B, C, (C+1), ..., and (C+n-1), respectively. When physical page X cannot completely store the PRP entry list, the last PRP entry stored in physical page X does not represent the physical address where the user data is stored, but rather the physical page where the next PRP entry list is stored (in...). Figure 5 In the example shown in (b), the physical address of page Y is given. With a PRP entry data size of 8 bytes and a physical page size of 4 KiB, 512 PRP entries can be stored in one physical page. Figure 5In the example shown in (b), since the PRP entry is saved from the beginning of physical page Y, the offset of the PRP entry is zero. The region where the PRP entry list is saved is also a contiguous region in logical address space 91. Therefore, in logical pages that store the PRP list, sometimes in the first logical page, the PRP list is saved from the middle. Furthermore, sometimes in the last logical page, the PRP list is saved up to the middle. On the other hand, in the middle logical pages, the PRP list is always saved from the beginning to the end. Therefore, even if the physical pages that store the PRP entry list are not contiguous in physical address space 92, the second and subsequent PRP entry lists must be saved from the beginning of the physical page.

[0130] Specifically, such as Figure 5 As shown in (c), the last part of the list of PRP entries stored in physical address Y indicates that user data is stored in physical pages (C+n), (C+q), and E, respectively. The number of PRP entries representing the user data area is determined by the quantity of one or more physical pages containing data forwarded by I / O instructions. Because the size of a physical page is larger than the sector size, sometimes user data is only stored up to the middle in the physical page indicated by the last PRP entry.

[0131] Next, SGL will be explained in detail. SGL is also known as Vectored I / O. SGL is a data structure that enables the following: writing user data stored in multiple non-contiguous logical address ranges in the logical address space into a contiguous LBA range using a single I / O instruction, or reading the data from a contiguous LBA range into the non-contiguous logical address range using a single I / O instruction.

[0132] Figure 6 An example representing an SGL. An SGL contains one or more SGL segments (pointer list 244). Each SGL segment is a contiguous region bounded by an 8-byte unit and contains one or more SGL descriptors.

[0133] The SGL descriptors within each SGL segment, excluding the last SGL descriptor, are SGL data block descriptors. The SGL data block descriptor represents the size and starting physical address of the region in the data buffer 241 that stores user data. The size of a region storing user data does not need to be an integer multiple of the sector size.

[0134] The last SGL descriptor within each SGL segment is either the SGL segment descriptor or the SGL end segment descriptor. The SGL segment descriptor indicates the size and starting physical address of the next region containing the SGL segment. The SGL end segment descriptor (in...) Figure 6In the example shown, the last SGL descriptor within SGL segment N-1 indicates the next SGL segment (in... Figure 6 In the example shown, SGL segment N) is the last SGL segment.

[0135] When using SGL, the write instruction contains the address of the initial SGL segment. A write instruction can only save one SGL descriptor. If it is not possible to specify all areas of the data buffer 241 containing user data within the initial SGL segment, the SGL segment descriptor or the last SGL segment descriptor is saved at the end of the SGL segment.

[0136] Back Figure 2 Returns a description of the SQ entry information field corresponding to the write command.

[0137] The instruction ID is the identification information for the corresponding write instruction.

[0138] A namespace ID is the identification information for the namespace from which the corresponding write instruction should be executed. Multiple logical address spaces (LBA spaces) may exist for host 2 to access storage system 3. These logical address spaces are sometimes referred to as namespaces. One of these namespaces can be identified by its namespace ID.

[0139] The LBA is the LBA specified by the corresponding write instruction. This LBA represents the beginning of the LBA range to which user data should be written according to the write instruction.

[0140] The data length is the length specified by the corresponding write instruction. This data length represents the length (i.e., the number of sectors) of user data in logical block units that should be written according to the write instruction. Therefore, by specifying the LBA and data length with the write instruction, the range of LBAs that should be written according to that write instruction can be determined.

[0141] (SQ entry information field corresponding to the trimming command)

[0142] The SQ entry information fields corresponding to the trimming command include, for example, the command opcode, data pointer, range number, command ID, and namespace ID.

[0143] The instruction opcode is a code that indicates the type of the corresponding instruction (in this case, the trim instruction).

[0144] A data pointer indicates a location on host 2 where range information associated with the corresponding trimming command is stored. A specific example of the structure of the range information associated with the trimming command will be provided in [reference needed]. Figure 7 To be discussed later.

[0145] The instruction ID is the identification information of the corresponding pruning instruction.

[0146] The namespace ID is the identification information for the namespace from which the corresponding pruning command should be executed.

[0147] Figure 7 This is a structure example representing the range information associated with the trimming command. Range information, for example, is defined in the NVMe standard as a list of ranges (i.e., LBA ranges). In the range information, a range is represented, for example, by a group of the initial LBA and the logical block unit length (i.e., the number of sectors). The range information contains the number of ranges specified in the command.

[0148] exist Figure 7 In the example shown, the range information can contain 256 ranges from Range 0 to Range 255. Within the range information, context attributes, the length of the logical block unit, and the fields of the initial LBA are set for each range. Furthermore, the fields of the context attributes are not used in the range information associated with the trimming command.

[0149] Return to Figure 2 Description of each field in the locked data list 245 shown.

[0150] The completion order field indicates the order in which the first completions for the corresponding write or trim command are received. For more than one completion received by host 2, sequence numbers are assigned according to the order of receipt. The completion order field indicates the sequence number assigned to the first completion for the corresponding write or trim command.

[0151] The data area management information field indicates information that can identify a storage area within NVRAM 24 that holds user data to be written according to the corresponding write command, or information that can identify a storage area within NVRAM 24 that holds range information associated with the corresponding trim command. For example, this information can be used to lock or unlock the identified storage area (e.g., a page) using the functions of OS 221.

[0152] The completion status field indicates whether the first completion for the corresponding write or prune command has been received. Alternatively, the completion status field can be omitted, and the completion order field can store a sequence number, indicating that the first completion for the corresponding write or prune command has been received.

[0153] In entries corresponding to write instructions, the pointer field to correction instruction data indicates a pointer to correction instruction data 246 associated with the write instruction. Correction instruction data 246 associated with the write instruction represents information related to the LBA range specified by the write instruction, specifically the LBA range where the write was cancelled. The pointer to correction instruction data 246 associated with the write instruction indicates the location in NVRAM 24 where the correction instruction data 246 is stored. If the write to the LBA range specified by the write instruction is not cancelled, the pointer field to correction instruction data is, for example, set to NULL. Furthermore, in entries corresponding to trim instructions, the pointer field to correction instruction data is, for example, set to NULL.

[0154] In the following description relating to Locked Data List 245, the values ​​shown in the SQ Entry Information field will also be referred to simply as SQ Entry Information. The same applies to the values ​​shown in the other fields of Locked Data List 245, as well as the values ​​shown in fields of other tables.

[0155] Figure 8 This is an example of the structure for correction instruction data 246. Correction instruction data 246 includes the LBA at the beginning of the cancelled write, the number of sectors that were cancelled, and a pointer to the next correction instruction data.

[0156] Based on the LBA at the beginning of the cancelled write and the number of sectors where the write was cancelled, the range of LBAs where the write was cancelled within the LBA range specified by the associated write instruction (hereinafter referred to as the first cancelled LBA range) can be determined. Furthermore, the pointer to the next correction instruction data indicates a pointer to another correction instruction data 246 associated with the same write instruction. This other correction instruction data 246 represents information related to another LBA range where the write was cancelled within the LBA range specified by the write instruction (hereinafter referred to as the second cancelled LBA range). That is, this other correction instruction data 246 represents information related to the second cancelled LBA range, which is a range within the LBA range specified by the write instruction that is different from the first cancelled LBA range. Furthermore, if there is no other correction instruction data 246 associated with the same write instruction, the pointer to the next correction instruction data is, for example, set to NULL.

[0157] The correction instruction data 246, which corresponds to one or more correction instructions that correct the corresponding write instruction, can be managed in a linked list structure by using pointers to correction instruction data in entries of the locked data list 245 and pointers to the next correction instruction data in the correction instruction data 246. That is, each entry of the locked data list 245 and each entry of the correction instruction data 246 can be considered as constituting the correction instruction data list. Therefore, it is easy to perform (1) appending, (2) correcting, (3) inserting, and (4) deleting within the LBA range.

[0158] More specifically, when initially adding or removing an LBA range, a pointer to correction instruction data 246 indicating the added LBA range is written to the pointer to correction instruction data of the corresponding entry in the locked data list 245. When further adding or removing an LBA range, a pointer to another correction instruction data 246 indicating the added LBA range is written to the pointer to the next correction instruction data of the corresponding entry in the correction instruction data 246.

[0159] When adding a continuous LBA region to the cancellation LBA range already included in the cancellation and correction instruction data list, the length of the cancelled data (number of sectors) increases, or only the length of the cancelled data (number of sectors) increases, along with the decrease of the starting LBA corresponding to the existing cancellation LBA range.

[0160] In the case where multiple LBA cancellation ranges are rearranged in ascending or descending order, the pointer (let's call it pointer A) to the pointer to the next correction instruction data in the correction instruction data list for the corresponding entry is overwritten by the pointer to the newly generated correction instruction data 246. Then, the pointer to the next correction instruction data for the newly generated correction instruction data 246 is written to pointer A.

[0161] If the two existing entries of correction instruction data 246 can be merged into one, only one entry is corrected. Specifically, in order to delete an entry of correction instruction data 246 that is no longer needed (assuming that a pointer B is stored in the pointer to the next correction instruction data), pointer B is written to the pointer to the next correction instruction data of another correction instruction data 246 that has been written to that entry. Therefore, the area storing the entry of correction instruction data 246 that is no longer needed can be released.

[0162] From now on, operations such as (1) appending, (2) correcting, (3) inserting, and (4) deleting from the LBA range will be called registering the correction instruction data 246 into the correction instruction data list.

[0163] By pre-sorting the entries in the correction instruction data list in ascending or descending order of the canceled LBA range, when a new canceled LBA range is added to the correction instruction data list, its continuity with existing canceled LBA ranges can be easily retrieved. Therefore, for example, the size of the correction instruction data list can be easily kept to a minimum. That is, operations on the correction instruction data list can be simplified.

[0164] return Figure 1 Here, we will describe the program executed by CPU 21.

[0165] CPU 21 executes various programs, such as those loaded from NVRAM 24 into RAM 22. The programs executed by CPU 21 include OS 221, drivers 222, and various applications 223.

[0166] OS 221 is a program used to control the basic operations of various components within host 2. The CPU 21, which executes OS 221, performs functions such as input / output control, file management, memory management, and communication.

[0167] Driver 222 is a program used to control devices connected to host 2. For example, CPU 21 executing driver 222 sends instructions or data to storage system 3 via storage device I / F 23. CPU 21 executing driver 222 receives responses or data to instructions from storage system 3 via storage device I / F 23.

[0168] The CPU 21 functions by executing drivers 222, for example, as an I / O handling unit 210, an instruction issuing unit 211, a write / prune management unit 212, and a recovery control unit 213. (See reference...) Figures 11 to 37 The specific operations of the I / O receiving unit 210, instruction issuing unit 211, write / trimming management unit 212, and recovery control unit 213 are described below. The I / O receiving unit 210, instruction issuing unit 211, write / trimming management unit 212, and recovery control unit 213 can be implemented using dedicated hardware within the host 2.

[0169] (Example of storage system 3)

[0170] The storage system 3 includes, for example, a controller 4, non-volatile memory 5, and DRAM 6. The controller 4 can be implemented using circuitry such as a system-on-a-chip (SoC). The controller 4 can also incorporate SRAM. Additionally, the DRAM 6 can also be incorporated into the controller 4. The non-volatile memory 5 is, for example, NAND flash memory; hereinafter, the non-volatile memory 5 will be referred to as NAND flash memory 5.

[0171] DRAM 6 is volatile memory. In RAM such as DRAM 6, there are areas for storing firmware (FW) 61, cache areas for logical-physical address translation tables 62, write management tables 63, and correction instruction data 64.

[0172] FW 61 is a program used to control the operation of controller 4. FW 61, for example, loads data from NAND flash memory 5 into DRAM 6.

[0173] The logical physical address translation table 62 manages the mapping between each logical address and each physical address of the NAND flash memory 5.

[0174] Write management table 63 manages information related to received write and trim commands.

[0175] The correction instruction data 64 is data used to manage information related to correction instructions issued from the host 2 to the storage system 3. The structure of the correction instruction data 64 is, for example, referenced in [reference needed]. Figure 8 The structure of the correction instruction data 246 in the aforementioned host 2 is the same.

[0176] NAND flash memory consists of multiple blocks. Each block contains multiple pages. A block functions as the smallest unit for data erasure operations. Blocks are sometimes also called "erasure blocks" or "physical blocks." Each page contains multiple memory cells connected to a single word line. Pages function as the unit for data write and read operations. Additionally, word lines can also function as the unit for data write and read operations.

[0177] There is an upper limit to the number of program / erase cycles (P / E cycles) for each block, called the maximum number of P / E cycles. One P / E cycle for a block includes an erase operation to put all memory cells in the block into an erased state, and a write operation (programming operation) to write data to each page of the block.

[0178] NAND flash memory 5 can be used to write user data and management data, for example. User data is data that should be written to NAND flash memory 5 and is associated with write commands received from host 2. Management data is data used to manage the operation of storage system 3. Management data includes, for example, information used in the flash translation layer (FTL) and command log 51. Management data may also include host 2 identification information (host ID) and information related to the operating mode of storage system 3.

[0179] Instruction log 51 represents the instruction ID of the corresponding completed instruction. Instruction log 51 is used for debugging system 3. Controller 4 stores instruction IDs in instruction log 51 in a manner that allows it to manage the order in which the processing of instructions is completed.

[0180] Controller 4 functions as a memory controller that controls NAND flash memory 5.

[0181] Controller 4 can also function as a Flash Translation Layer (FTL) to perform data management and block management of NAND flash memory 5. Data management performed by this FTL includes: (1) management of mapping information representing the correspondence between each LBA and each physical address of the NAND flash memory 5; and (2) processing to hide the differences between page-level data read / write operations and block-level data erase operations. Block management includes faulty block management, wear leveling, and garbage collection.

[0182] The management of the mapping between each LBA and each physical address is performed using a logical physical address translation table 62. The controller 4 uses the logical physical address translation table 62 to manage the mapping between each LBA and each physical address in specific management units. The physical address corresponding to a certain LBA represents the physical storage location within the NAND flash memory 5 where data is written to that LBA. The controller 4 uses the logical physical address translation table 62 to manage multiple storage regions logically divided into the storage areas of the NAND flash memory 5. These multiple storage regions each correspond to multiple LBAs. That is, each of these multiple storage regions is determined by one LBA. The logical physical address translation table 62 can also be loaded from the NAND flash memory 5 into the DRAM 6 when the storage system 3 is powered on.

[0183] Writing data to a single page can only be performed once per P / E cycle. Therefore, instead of writing the updated data corresponding to a certain LBA to the physical storage location that stores the previous data corresponding to that LBA, controller 4 writes it to another physical storage location. Then, controller 4 invalidates the previous data by updating the logical physical address translation table 62 in a way that associates the LBA with that other physical storage location. Data referenced from the logical physical address translation table 62 (i.e., data associated with an LBA) is called valid data. Data not associated with any LBA is called invalid data. Valid data is data that may be read from host 2 later. Invalid data is data that has no possibility of being read from host 2.

[0184] The logical physical address translation table 62 on DRAM 6 functions as a write-back cache. That is, if the contents of the logical physical address translation table 62 on DRAM 6 change, the logical physical address translation table 62 is made non-volatile in the NAND flash memory 5 at an appropriate timing. Furthermore, when user data is written to the NAND flash memory 5, the mapping between the LBA and physical address of that user data is also made non-volatile in the NAND flash memory 5. Therefore, even if the logical physical address translation table 62 is lost from DRAM 6, it can be reconstructed based on the non-volatile information in the NAND flash memory 5. In other words, at the point when the writing of user data to the NAND flash memory 5 is complete, even if the power supply to the storage system 3 is cut off, the non-volatile logical physical address translation table 62 and the written user data are preserved.

[0185] Upon receiving a pruning instruction specifying a particular LBA from the host 2, the controller 4 releases the allocation of that LBA. Specifically, the controller 4 updates the logical physical address translation table 62 to remove the association between the LBA and the physical storage location. This invalidates the data associated with that LBA.

[0186] The controller 4 may also include a host interface (host I / F) 11, a CPU 12, a NAND interface (NAND I / F) 13, a DRAM interface (DRAM I / F) 14, and a timer 15. These host I / F 11, CPU 12, NAND I / F 13, DRAM I / F 14, and timer 15 may be connected via bus 10.

[0187] The host I / F 11 functions as a circuit that receives various instructions, such as I / O instructions, various control instructions, or data, from the host 2. Additionally, the host I / F 11 functions as a circuit that sends responses or data to the host 2 in response to instructions.

[0188] NAND I / F 13 electrically connects controller 4 to NAND flash memory 5. NAND I / F 13 corresponds to interface standards such as Toggle DDR and OpenNAND Flash Interface (ONFI).

[0189] NAND I / F 13 functions as a NAND control circuit that controls the NAND flash memory 5. NAND I / F 13 can be connected to multiple memory chips within the NAND flash memory 5 via multiple channels (Ch). By driving multiple memory chips in parallel, wide access bandwidth to the entire NAND flash memory 5 can be achieved.

[0190] DRAM I / F 14 functions as a DRAM control circuit that controls access to DRAM 6.

[0191] Timer 15 measures time. Timer 15 can provide the measured time to various parts within controller 4.

[0192] CPU 12 is a processor configured to control host I / F 11, NAND I / F 13, DRAM I / F 14, and timer 15. CPU 12 performs various processes by executing FW 61, which loads data from NAND flash memory 5 into DRAM 6. FW 61 is a control program containing a set of commands for causing CPU 12 to perform various processes. CPU 12 is capable of executing instruction processing, etc., to process various instructions from host 2. The operation of CPU 12 is controlled by FW 61 executed by CPU 12.

[0193] The functions of each part within controller 4 can be implemented through dedicated hardware within controller 4, or through CPU 12 executing FW 61.

[0194] The CPU 12 functions, for example, as an instruction receiving unit 121 and a write / trim control unit 122. The CPU 12 functions as these units, for example, by executing FW 61. For details regarding the specific operation of the instruction receiving unit 121 and the write / trim control unit 122, please refer to... Figures 11 to 37 To be described later.

[0195] Next, refer to Figure 9 as well as Figure 10 The following section describes the two tables used in storage system 3.

[0196] Figure 9 This illustrates the structure of the Logical Physical Address Translation Table 62. The Logical Physical Address Translation Table 62 manages the mapping between each LBA and each physical address of the NAND flash memory 5. The controller 4 can use the Logical Physical Address Translation Table 62 to translate LBAs into physical addresses. Additionally, the controller 4 can use the Logical Physical Address Translation Table 62 to translate physical addresses into LBAs.

[0197] exist Figure 9 In the example shown, physical address "A" is mapped to LBA "0", physical address "B" is mapped to LBA "1", and physical address "C" is mapped to LBA "2".

[0198] Figure 10This represents a structure example of write management table 63. Write management table 63 may include one or more entries corresponding to one or more write commands. Each entry includes, for example, a command ID field, an LBA field, a data length field, a data pointer field, and a pointer field pointing to the correction command data.

[0199] The instruction ID field represents the instruction ID of the corresponding write instruction.

[0200] The LBA field represents the LBA specified by the corresponding write instruction. This LBA represents the first LBA in the range of LBAs from which user data should be written according to the write instruction.

[0201] The data length field indicates the data length specified by the corresponding write instruction. This data length represents the length of user data to be written according to the write instruction. Using the LBA specified by the write instruction and the data length, the range of LBAs to be written according to the write instruction can be determined.

[0202] The data pointer field represents a data pointer specified by the corresponding write instruction. This data pointer indicates a location within the host 2 that stores user data to be written to the NAND flash memory 5 according to the write instruction, or a location that stores a pointer list 244, which represents locations within the host 2 that store user data. That is, the controller 4 obtains user data from the location within the host 2 directly or indirectly represented by the data pointer.

[0203] The pointer field to correction instruction data indicates a pointer to correction instruction data 64 associated with the corresponding write instruction. Correction instruction data 64 associated with the write instruction represents information related to the LBA range specified by the write instruction, specifically the LBA range where the write was cancelled. The pointer to correction instruction data 64 associated with the write instruction indicates the location in DRAM 6 where this correction instruction data 64 is stored. If the write to the LBA range specified by the write instruction is not cancelled, the pointer field to correction instruction data is, for example, set to NULL.

[0204] Next, refer to Figures 11 to 37 Examples of several actions performed in information processing system 1 will be explained.

[0205] (The first example of a write operation)

[0206] First, refer to Figures 11 to 18 The first example of a write operation in information processing system 1 will be described. A write operation is an action used to send a write command from host 2 to storage system 3 and write the user data associated with the write command to NAND flash memory 5.

[0207] Here, the commit queue 242 and the completion queue 243 set in the NVRAM 24 of the host 2 will be described. The host 2 sends instructions to the storage system 3 via the commit queue 242. In addition, the storage system 3 returns completion of the instructions to the host 2 via the completion queue 243.

[0208] Submission queue 242 includes multiple slots for host 2 to store instructions issued from host 2 to storage system 3. The position (i.e., slot) within submission queue 242 where host 2 should store instructions is indicated by the SQ Tail pointer. The position within submission queue 242 where storage system 3 should fetch instructions is indicated by the SQ Head pointer.

[0209] The completion queue 243 includes multiple slots for the storage system 3 to store responses to instructions. The position within the completion queue 243 where the storage system 3 should store a response is indicated by a CQ Tail pointer. The position within the completion queue 243 where the host 2 should retrieve a response is indicated by a CQ Head pointer.

[0210] The following describes specific write operations in host 2 and storage system 3. Figures 11 to 18 In the example shown, for ease of understanding, the instruction written to the submission queue 242 is only a write instruction.

[0211] Figure 11 This illustrates an example of a write operation in information processing system 1. Here, we exemplify a scenario where the I / O handling unit 210 of host 2 receives a write request to write user data 71 to NAND flash memory 5. This write request is, for example, a write request from application 223 executed by CPU 21.

[0212] First, in host 2, the IO processing unit 210 accepts the write request from application 223. Figure 11 (1)). The IO receiving unit 210 sends the received write request to the write / pruning management unit 212. Figure 11 (2)). The write / trimming management unit 212 uses the function of application 223 or OS 221 to lock the user data 71 that is stored in data buffer 241 and has requested to be written ( Figure 11 (3)). More specifically, the write / trim management unit 212 uses the functions of OS 221 to lock the storage area (e.g., a page) where user data 71 is stored. This prevents the storage area where user data 71 is stored from being unintentionally released or paged out. In addition, the write / trim management unit 212 uses the functions of OS 221 to prevent writing to the storage area where user data 71 is stored.

[0213] As described later, before the writing of user data 71 to the NAND flash memory 5 is complete, a completion message for the write request is sent to application 223. After the completion message for the write request is sent, application 223 recognizes that the write is complete. Therefore, the storage area containing user data 71 may be used for other purposes or overwritten by other data. Therefore, in order to prevent the loss of user data 71 from the data buffer 241 before the actual writing to the NAND flash memory 5 is completed, the storage area containing user data 71 is locked, and write operations are further disabled.

[0214] Here, the memory management mechanism of OS 221 will be explained.

[0215] The CPU 21 of host 2 sometimes has a Memory Management Unit (MMU). The MMU manages the mapping between logical addresses and physical addresses (physical addresses) used by application 223 executed by CPU 21 to access physical memory. Physical memory is, for example, RAM 221 or NVRAM 24. Access to physical memory includes, for example, reading data from or writing data to physical memory. When application 223 requests access to physical memory using a logical address, the MMU translates that logical address into a physical address. Access to physical memory is then performed based on the translated physical address.

[0216] The unit for mapping logical addresses to physical addresses is, for example, a page. For pages accessed using logical addresses (i.e., refer to...) Figure 3 The logical pages mentioned above can be allocated to pages in memory accessed using physical addresses (i.e., refer to...). Figure 3 (The aforementioned physical page).

[0217] The MMU can manage multiple logical pages. The storage capacity of the virtual memory corresponding to the multiple logical pages can be greater than the storage capacity of the physical memory. The OS 221, executed by the CPU 21, allocates physical pages only for logical pages within the multiple logical pages, such as those currently in actual use. Thus, the application 223 can operate as if there were a memory with a storage capacity larger than the physical memory.

[0218] The MMU manages the attribute information of multiple logical pages. This attribute information includes, for example, information indicating whether a physical page has been mapped, information indicating whether a physical page is writable, bits set according to access status, dirty bits set according to write status, bits that prevent unmapping physical pages (i.e., bits that prevent page swapping), or information indicating the address of the corresponding physical page. If application 223 requests access to a logical page that is not mapped, or requests a write to a logical page that cannot be written to, an interrupt is generated for CPU 21 based on the attribute information. OS 221 can then handle the interrupt appropriately.

[0219] Figure 12 This diagram illustrates an example of the state of logical address space 95 and physical address space 98 at the point in time when application 223 makes a write request. Logical address space 95 is the space of logical addresses managed by the MMU. Physical address space 98 is the space of physical addresses managed by the MMU. Logical address space 95 includes kernel memory space 96 and user memory space 97. Application 223 accesses physical memory via user memory space 97.

[0220] exist Figure 12 In this diagram, units in logical address space 95 and physical address space 98 represent logical pages and physical pages, respectively. Logical page 971 logically stores user data 71. Physical page 981 physically stores user data 71. Physical page 981 is mapped to logical page 971. Although in... Figure 12 The diagram shows one mapping between logical page 971 and physical page 981, but multiple physical pages can be mapped to multiple logical pages. Additionally, although omitted in the diagram, logical pages in user memory space 97, which does not include user data 71 used by application 223, are also physically page-mapped. Furthermore, logical pages in kernel memory space 96 are also physically page-mapped.

[0221] User memory space 97 is independent in each process. On the other hand, the I / O handling unit 210, operating in kernel mode, can access not only user memory space 97 but also the virtual kernel memory space 96. This kernel memory space 96 is shared by all applications 223, but cannot be directly accessed by applications 223. Instead, after application 223 invokes a system call and switches to kernel mode, the invoked system call accesses kernel memory space 96. Additionally, parts of OS 221 operating in kernel mode also access kernel memory space 96.

[0222] Figure 13This describes an example of the actions performed by the write / pruning management unit 212 before the I / O receiving unit 210 notifies the write request source (e.g., application 223) of the completion of the write request. For example, before the I / O receiving unit 210 notifies the write request source of the completion of the write request, the write / pruning management unit 212 uses the function of OS 221 to disable write access to the logical page 971 containing user data 71. The pointer list 244 records the location of user data 71 in the physical address (physical page 981). Furthermore, this write-disabling operation can be performed before the I / O receiving unit 210 notifies the write request source of the completion of the write request. For example, the write / pruning management unit 212 can receive the first completion of the write instruction corresponding to the write request from the storage system 3, and perform the write-disabling operation when it is a normal response. Furthermore, in Figure 13 The example illustrates the case where user data 71 exists in only one logical page, but user data 71 can exist in multiple logical pages. In this case, each logical page is mapped to a different physical page.

[0223] Furthermore, user data 71 can be stored in RAM 22 using the functions of application 223 or OS 221. When user data 71 is stored in RAM 22, the I / O handling unit 210 copies user data 71 from RAM 22 to the data buffer 241 of NVRAM 24, and then sends a write request to the write / pruning management unit 212. In this case, since the area in NVRAM 24 where user data 71 has been copied is unlikely to be written to later from application 223 or the like, which is the source of the write request, writing may not be prohibited.

[0224] return Figure 11 The write / trimming management department 212 entrusts the instruction issuance department 211 to issue a write instruction corresponding to the write request. Figure 11 (4)). The instruction issuing unit 211, upon request from the write / trimming management unit 212, issues a write instruction for writing user data 71. That is, the instruction issuing unit 211 generates SQ entry information corresponding to the write instruction for writing user data 71. The instruction issuing unit 211 sends the generated SQ entry information to the write / trimming management unit 212. Figure 11 (5) in the middle.

[0225] The write / trimming management unit 212 uses the SQ entry information sent by the instruction issuing unit 211 to generate entries for the locked data list 245. The generated entries include, for example, the SQ entry information corresponding to the issued write instruction and data area management information. This data area management information is information that can determine the storage area within the data buffer 241 where user data 71 is stored. The write / trimming management unit 212 appends the generated entries to the locked data list 245. Figure 11(6) in the middle.

[0226] Figure 14 Indicates in Figure 11 The example in action (6) is a lock data list 245 that adds an entry. Lock data list 245 includes the added entry 81.

[0227] exist Figure 14 In the example shown, entry 81 includes SQ entry information "sqentry_info1" corresponding to the issued write command and data region management information "region_info1" indicating the storage area within the data buffer 241 that stores the user data 71 associated with the write command. Furthermore, entry 81 does not include completion order or completion status.

[0228] return Figure 11 Next, the instruction issuing unit 211 stores the issued write instruction (SQ entry information) in the commit queue 242. Figure 11 (7) The action of saving the instruction to the submission queue 242 will be explained more specifically. First, the instruction issuing unit 211 writes the instruction (in this case, a write instruction) to the slot in the submission queue 242 indicated by the SQ Tail pointer. The instruction issuing unit 211 increments the SQ Tail pointer by 1. Furthermore, if the value obtained by incrementing the SQ Tail pointer by 1 reaches the number of slots in the submission queue 242 (i.e., the queue size), the instruction issuing unit 211 sets the SQ Tail pointer to 0. Then, the instruction issuing unit 211 writes the updated value of the SQ Tail pointer into the SQ Tail doorbell register of the storage system 3. Thus, the action of saving the instruction to the submission queue 242 includes the action of writing the instruction to the submission queue 242 and the action of updating the SQ Tail pointer.

[0229] When the SQ Tail doorbell register is updated, the instruction receiving unit 121 of the storage system 3 accepts the update and retrieves the write instruction from the submission queue 242. Figure 11 (8)). Then, the instruction receiving unit 121 sends the obtained write instruction to the write / trimming control unit 122 ( Figure 11(9) Here, the operation of retrieving instructions from the submission queue 242 will be explained in more detail. First, if there is a difference between the SQ Head pointer and the SQ Tail pointer, the instruction receiving unit 121 retrieves the instruction (in this case, a write instruction) from the slot indicated by the SQ Head pointer in the submission queue 242. The instruction receiving unit 121 increments the SQ Head pointer by 1. Furthermore, if the value obtained by incrementing the SQ Head pointer by 1 reaches the number of slots in the submission queue 242, the instruction receiving unit 121 sets the SQ Head pointer to 0. Thus, the operation of retrieving instructions from the submission queue 242 includes the operation of retrieving instructions from the submission queue 242 and the operation of updating the SQ Head pointer.

[0230] Next, the write / trimming control unit 122 uses the write command sent by the command receiving unit 121 to update the write management table 63. Figure 11 (10)). Specifically, the write / trimming control unit 122 appends an entry to the write management table 63, including the instruction ID, LBA, data length, and data pointer specified by the write instruction. Furthermore, after confirming that the LBA specified by the write instruction is valid, that data can be written to that LBA, and that the data pointer is valid, the write / trimming control unit 122 appends the corresponding entry to the write management table 63. The data pointer is considered valid, for example, if it represents an accessible area within the host 2 and represents an area commensurate with the data length. Then, the write / trimming control unit 122 notifies the instruction receiving unit 121 that the update of the write management table 63 based on the write instruction is complete. Figure 11 (11) in the middle.

[0231] According to the notification from the write / trim control unit 122, the instruction receiving unit 121 saves the first completion (indicating normal completion) of the write instruction to the completion queue 243. Figure 11 (12)). The first completion includes the instruction ID of the write instruction. In addition, the first completion may include the updated SQ Head pointer.

[0232] The action of saving the completed task to the completion queue 243 will be explained in more detail. First, the instruction receiving unit 121 writes the completed task to the slot indicated by the CQ Tail pointer in the completion queue 243. At this time, the writing of the completed task is completed by inverting the value of the Phase Tag field of that slot. The host 2 can know the position in the completion queue 243 indicated by the CQ Tail pointer by reading the value of the Phase Tag field. The instruction receiving unit 121 increments the CQ Tail pointer by 1. Furthermore, if the value obtained by incrementing the CQ Tail pointer by 1 reaches the number of slots in the completion queue 243, the instruction receiving unit 121 sets the CQ Tail pointer to 0. The instruction receiving unit 121 issues an interrupt. In addition, the instruction receiving unit 121 can also issue an interrupt after writing multiple completed tasks to the completion queue 243. By issuing an interrupt, the instruction receiving unit 121 notifies the host 2 that a new completed task should be processed in the completion queue 243. Thus, the actions of saving the completed data to the completion queue 243 include: writing the completed data to the completion queue 243, updating the CQ Tail pointer, and issuing an interrupt. As mentioned above, updating the CQ Tail pointer can also include notifying host 2 of the updated SQ Head pointer. Hereinafter, the situation of performing this series of actions will also be referred to as notifying host 2 of completion.

[0233] In addition, if the write instruction obtained from the submission queue 242 is an unexecutable instruction, the instruction receiving unit 121 may save the completion indicating abnormal termination as the first completion in the completion queue 243.

[0234] Next, the instruction issuing unit 211 of host 2 retrieves the first completion (or completion) for the write instruction from the completion queue 243. Figure 11 (13)). Then, the instruction issuing unit 211 sends the obtained first completion () to the write / trimming management unit 212. Figure 11 (14) in the middle.

[0235] Here, the process of retrieving completions from the completion queue 243 will be explained in more detail. First, the instruction issuing unit 211 retrieves a completion from the slot indicated by the CQ Head pointer in the completion queue 243 based on an interrupt issued by the instruction receiving unit 121 of the storage system 3. The instruction issuing unit 211 increments the CQ Head pointer by 1. Furthermore, if the value obtained by incrementing the CQ Head pointer by 1 reaches the number of slots in the completion queue 243, the instruction issuing unit 211 sets the CQ Head pointer to 0. Then, if the Phase Tag value of the slot where completions were retrieved is the same as the Phase Tag value of the slot indicated by the updated CQ Head pointer (also called the next slot) (or the inverted value if the CQ Head pointer becomes 0), the instruction issuing unit 211 retrieves a completion from the next slot and updates the CQ Head pointer again. Similarly, after retrieving all completions from slots with the same Phase Tag value, the instruction issuing unit 211 writes the updated CQ Head pointer value into the CQ Head doorbell register of the storage system 3. Then, the instruction issuing unit 211 clears the interrupt received from the storage system 3. As described above, the action of retrieving completion from the completion queue 243 includes retrieving completion from the completion queue 243, updating the CQ Head pointer, and clearing the interrupt.

[0236] If the first completion indicates a normal end, the write / prune management unit 212 updates the entry in the locked data list 245 corresponding to the first completion received from the instruction issuing unit 211. Figure 11 (15) Specifically, the write / trim management unit 212 assigns a sequence number indicating the order in which the first completion is received. For example, the sequence number is incremented by 1 each time the first completion for a write instruction is received from the storage system 3. In addition, the write / trim management unit 212 obtains the instruction ID included in the first completion received. The write / trim management unit 212 determines an entry in the locked data list 245 that includes SQ entry information corresponding to the obtained instruction ID. The write / trim management unit 212 appends the assigned sequence number (i.e., information indicating the order in which the first completion is received) and information indicating that the first completion has been received to the determined entry.

[0237] In the case where the first completion indicates an abnormal termination, the write / prune management unit 212 releases the lock on the user data 71 in the data buffer 241 corresponding to the received first completion. Figure 11 (16)). Then, the write / trimming management unit 212 deletes the entry corresponding to the first completion received from the locked data list 245. Figure 11 (17) in the middle.

[0238] More specifically, the write / trim management unit 212 acquires the instruction ID included in the first completion received. The write / trim management unit 212 determines, in the locked data list 245, an entry containing SQ entry information corresponding to the acquired instruction ID. Using the data area management information within the determined entry, the write / trim management unit 212 unlocks the user data 71 associated with the abnormally terminated write instruction. Furthermore, if the write / trim management unit 212 has created a list of PRP entries and the second and subsequent segments of the SGL, it also releases the area in the pointer list 244 that stores them. Then, the write / trim management unit 212 deletes the determined entry from the locked data list 245 (i.e., from the NVRAM 24). Additionally, if the storage area storing user data 71 is locked or write-prohibited, the write / trim management unit 212 unlocks or prohibits write access.

[0239] Furthermore, if the user data 71 stored in the unlocked or write-prohibited storage area is data copied by the I / O handling unit 210, it is deleted from the data buffer 241 by the I / O handling unit 210. Specifically, other data can be stored in this storage area. If the user data 71 is not data copied by the I / O handling unit 210, the application 223 or the OS 221 decides whether to reuse or release the storage area.

[0240] The following describes a series of operations for a write instruction, including unlocking the associated user data 71, deleting the corresponding entry in the locked data list 245, releasing the area of ​​the corresponding pointer list 244, unlocking or disabling writing to the storage area containing the user data 71, and deleting the user data 71. These operations are also referred to as the entry deletion operation for the write instruction.

[0241] Figure 15 Indicates in Figure 11 Example of an updated lock data list 245 in action (15). Lock data list 245 includes the updated entry 81.

[0242] exist Figure 15 In the example shown, entry 81 includes a completion order "cseq1" indicating the receiving order of the first completed message and a completion status "completed" indicating that the first completed message has been received. That is, entry 81 uses the completion order "cseq1" to indicate that the first completed message has been received.

[0243] When the update of the locked data list 245 is complete, the write / pruning management unit 212 returns a response to the write request generated by the application 223 or the OS 221. Specifically, if the first completion indicates a normal end, the write / pruning management unit 212 notifies the IO receiving unit 210 of the completion of the write (normal end). Figure 11 (18)). Then, the IO handling unit 210 notifies the application 223 or OS 221 that the write is complete. Figure 11 (19)). Through this write completion notification, application 223 or OS 221 can advance the process even though the write to NAND flash memory 5 is not actually complete. Thus, although there is no write cache with PLP in storage system 3, from the perspective of application 223 or OS 221, it is as if storage system 3 has a write cache with PLP.

[0244] On the other hand, in the event of an abnormal termination (error termination) during the first completion, the Write / Prune Management Department 212 notifies the IO Acceptance Department 210 of the abnormal termination. Figure 11 (20)). Then, the IO handling unit 210 notifies the application 223 or OS 221 of the abnormal termination ( Figure 11 (21)). As described above, sometimes application 223 or OS 221 stores user data 71 in RAM 22, and I / O processing unit 210 copies user data 71 from RAM 22 to NVRAM 24. In this case, application 223 or OS 221 can release the area of ​​RAM 22 storing user data 71 and use it for other purposes in response to receiving the first completion indicating abnormal termination. In addition, I / O processing unit 210 can release the area of ​​NVRAM 24 storing user data 71 and use it for storing other data.

[0245] Figure 16 express Figure 11 Examples of subsequent write operations. Here, we illustrate a case where the total amount of user data 71 written to storage system 3 by multiple write command requests received from host 2 reaches a specific data unit. A specific data unit is, for example, the amount of data that can be written to NAND flash memory 5 in a single write operation.

[0246] In storage system 3, after the total amount of user data 71 requested to be written by multiple write commands received from host 2 reaches a specific data unit, the instruction receiving unit 121 and the write / trimming control unit 122 write the specific data unit of user data 71 to NAND flash memory 5, and return the second completion corresponding to each of the multiple write commands to host 2. That is, the instruction receiving unit 121 and the write / trimming control unit 122 do not immediately execute the write corresponding to the one write command received, but operate in a mechanism that executes the write corresponding to the multiple write commands after the total amount of user data 71 requested to be written by multiple write commands reaches a specific data unit (Delayed Write Completion).

[0247] Specifically, the write / trim control unit 122 forwards the user data 71 of the write unit from the data buffer 241 to the NAND flash memory 5, and writes the forwarded user data 71 of the write unit to the NAND flash memory 5 (programming). Figure 16 (1)). Then, if there is a write command that can read all the corresponding user data 71 from the NAND flash memory 5, the write / trim control unit 122 notifies the instruction receiving unit 121 of the completion of the processing corresponding to the write command. Figure 16 (2)). The write / trimming control unit 122 notifies the instruction receiving unit 121 of the completion of processing corresponding to the multiple write instructions for the user data 71 corresponding to the write unit. The write / trimming control unit 122 deletes the entries corresponding to the multiple write instructions from the write management table 63. Figure 16 (3)). The write / trim control unit 122 updates the logical physical address translation table 62 based on the processing corresponding to multiple write instructions respectively. Figure 16 (4)). Specifically, the write / prune control unit 122 updates the logical physical address translation table 62 to associate the LBAs specified by multiple write instructions with the physical storage locations where the corresponding user data 71 has been written. In addition, the write / prune control unit 122 appends the instruction IDs of the multiple write instructions to the instruction log 51. Figure 16 (5) in the middle.

[0248] Each time the instruction receiving unit 121 receives a notification from the write / trim control unit 122, it sends a second completion message to the host 2 indicating that the processing corresponding to the write instruction has been completed. Figure 16 (6)). More specifically, in accordance with the notification from the instruction receiving unit 121 and the write / trim control unit 122, the second completion of the corresponding write instruction is stored in the completion queue 243. The notification from the write / trim control unit 122 includes, for example, the instruction ID of the completed write instruction.

[0249] Furthermore, if an error occurs in the processing corresponding to the write instruction, the instruction receiving unit 121 will send the completion indicating the error to the host 2 as a second completion.

[0250] Next, the instruction issuing unit 211 of host 2 retrieves the second completion (completion) from the completion queue 243. Figure 16 (7)). Then, the instruction issuing unit 211 sends the obtained second completion ( ) to the write / trimming management unit 212. Figure 16 (8) in the middle.

[0251] The write / trimming management unit 212 receives the second completion notification from the instruction issuing unit 211 and unlocks the user data 71 in the data buffer 241 corresponding to the received second completion notification. Figure 16 (9)). Then, the write / trimming management unit 212 deletes the entry corresponding to the received second completion from the locked data list 245. Figure 16 (10) in the middle.

[0252] More specifically, the write / trim management unit 212 obtains the instruction ID included in the received second completion. The write / trim management unit 212 determines, in the locked data list 245, an entry containing SQ entry information corresponding to the obtained instruction ID. The write / trim management unit 212 uses the data area management information within the determined entry to unlock the user data 71 that has been written. Additionally, if the write / trim management unit 212 has created a list of PRP entries and the second and subsequent segments of the SGL, it also releases the area in the pointer list 244 that stores them. Then, the write / trim management unit 212 removes the determined entry from the locked data list 245 (i.e., from the NVRAM 24). Furthermore, if the storage area containing user data 71 is locked or write-prohibited, the write / trim management unit 212 unlocks the lock or write-prohibition. Furthermore, if the user data 71 stored in the unlocked or write-prohibited storage area is data copied by the IO handling unit 210, the IO handling unit 210 deletes it from the data buffer 241. Specifically, this storage area can store other data. If the user data 71 is not data copied by the IO handling unit 210, the application 223 or the OS 221 decides whether to reuse or release the storage area. That is, the write / prune management unit 212 and the IO handling unit 210 perform entry deletion operations for the corresponding write command based on the second completion.

[0253] Furthermore, in the event of a second completion indication error, host 2 (specifically, instruction issuing unit 211, write / prune management unit 212, and IO receiving unit 210) considers the storage system 3 to be faulty. Host 2 suspends processing for the storage system 3 and performs exception handling as required by information processing system 1. For example, write / prune management unit 212 deletes all data associated with the storage system 3. The deleted data includes user data 71 in the data buffer 241 corresponding to the storage system 3 and the locked data list 245 corresponding to the storage system 3. Additionally, if the storage area containing user data 71 is locked or write-prohibited, write / prune management unit 212 unlocks the lock or prohibits writes. Furthermore, instruction issuing unit 211 at least stops sending write and prune instructions to the storage system 3, which is considered faulty. Furthermore, IO receiving unit 210 responds with errors to all write and prune requests from application 223 or OS 221.

[0254] Furthermore, even if reading is possible from storage system 3 despite the inability to write to it, host 2 can protect data before deleting all data associated with storage system 3. For example, host 2 can copy data for all addresses of storage system 3 to another storage system, and then overwrite the copied data with user data 71 stored in data buffer 241. Thus, host 2 can protect all non-volatile user data in the non-volatile memory (NVRAM 24) within host 2 and in the non-volatile memory (NAND flash memory 5) within storage system 3 in the event of a storage system 3 failure.

[0255] Figure 17 Indicates in Figure 16 Example of deleting an entry from the lock data list 245 in action (10). The lock data list 245 includes entry 81 corresponding to the received second completion.

[0256] exist Figure 17 In the example shown, entry 81 includes SQ entry information "sqentry_info1", completion order "cseq1", data region management information "region_info1", and completion status "completed". That is, entry 81 indicates that the first completion has been received. Entry 81 is deleted when the second completion is received from storage system 3 for the corresponding write instruction (i.e., the write instruction equivalent to SQ entry information "sqentry_info1").

[0257] Additionally, for slots in the commit queue 242 that store write commands (SQ entry information), if the SQ Head pointer advances beyond the slot corresponding to the first completion of receiving a write command, it can be overwritten to allow for issuing new commands. In this case, to manage the processing status corresponding to write commands issued by host 2, SQ entry information corresponding to the write command is stored in the entries of the locked data list 245.

[0258] Furthermore, the write commands stored in the commit queue 242 can be maintained until a second completion of that write command is received. That is, the host 2 can advance the SQ Head pointer to a position further ahead of the slot where the write command is stored in response to the second completion received. In this case, the entry in the locked data list 245 stores a pointer to the entry in the commit queue 242 instead of SQ entry information. Moreover, the write command itself stored in the commit queue 242 is used as SQ entry information. In addition, since the SQ Head pointer is not updated because the write command is not cleared from the commit queue 242, the commit queue 242 is prone to becoming full, and it may be impossible to issue other commands such as read commands. Therefore, the commit queue 242 can be set as a dedicated commit queue for issuing write commands.

[0259] Through the above writing operations, during the period when the storage system 3 writes user data based on the write command received from the host 2 and the write is completed with a delay, the host 2 can use the locked data list 245 to manage the processing status corresponding to the issued write command.

[0260] Specifically, when host 2 sends a write command to storage system 3, it appends the entry corresponding to the write command to lock data list 245. The appended entry does not include, for example, completion order or completion status. Therefore, host 2 can manage situations where the first completion and second completion for the corresponding write command have not been received through the appended entry. In other words, host 2 can issue (send) the corresponding write command to storage system 3 through the appended entry and manage situations where the first completion has not been received.

[0261] When storage system 3 receives a write command from host 2 and appends the corresponding entry to the write management table 63, it returns the first completion of the write command to host 2. Host 2 updates the corresponding entry in the locked data list 245 based on the first completion received from storage system 3. The updated entry includes, for example, the completion order and completion status. Therefore, host 2 can manage the situation where the first completion of the corresponding write command has been received, but the second completion has not yet been received, using the updated entry. In other words, host 2 can manage the situation where storage system 3 has received the corresponding write command using the updated entry.

[0262] Furthermore, if storage system 3 completes the writing of user data corresponding to a write command with a delayed write completion, it returns a second completion notification for that write command to host 2. Based on the second completion notification received from storage system 3, host 2 deletes the corresponding entry from the locked data list 245. By deleting the entry, host 2 can terminate the management related to the corresponding write command.

[0263] Furthermore, the write / pinch control unit 122 of the storage system 3 can write the user data padding corresponding to the accepted write command to the NAND flash memory 5 if the time elapsed since accepting the write command exceeds a threshold. Here, writing the user data padding means writing data consisting of user data and padding data in write units. This threshold is, for example, based on an upper limit of the time expected by the host 2 until the second completion of the write command is obtained. The time elapsed since accepting the write command is measured, for example, using a timer 15. More specifically, if the time elapsed since accepting the write command exceeds the threshold, the write / pinch control unit 122 forwards the user data corresponding to the accepted write command from the host 2's data buffer 241 to the NAND flash memory 5. Then, the write / pinch control unit 122 writes the forwarded user data padding to the NAND flash memory 5. Thus, the command acceptance unit 121 can notify the host 2 of the second completion of the write command within the time expected by the host 2.

[0264] This section describes the actions taken when application 233 attempts to write to the storage area of ​​the data buffer 241 that is locked or write-prohibited. The locked or write-prohibited storage area can store data other than user data 71 used by application 223, etc. Furthermore, after the I / O handling unit 210 notifies application 223 or OS 221 of the completion of the write request, the storage area storing user data 71 may itself be overwritten. When application 233 or OS 221 attempts to write to the locked or write-prohibited storage area, OS 221 notifies the write / prune control unit 122 that a write operation has been performed.

[0265] Figure 18 This represents an example of the action taken after application 223 attempts to write to a locked or write-prohibited memory area. (Compared to...) Figure 12 and Figure 13 Similarly, in the example shown, each unit of logical address space 95 and physical address space 98 represents a logical page and a physical page, respectively. Furthermore, user data 71 is logically stored in logical page 971. User data 71 is physically stored in physical page 981. Since physical page 981 is mapped to logical page 971, the user data 71 physically stored in physical page 981 is logically stored in logical page 971. Here, it is assumed that application 233 or OS 221 attempts to write to logical page 971, which is locked or write-prohibited, and the write operation is notified to write / trim control unit 122.

[0266] The write / prune control unit 122 receives the notification and maps the physical page 981 to the free logical page 961 in the kernel memory space 96. Figure 18 (1)). The write / trim control unit 122 itself does not need to read or write the logical page 961 containing the user data 71. However, if this mapping is not performed, the mapping between physical page 981 and logical page 971 will be released in subsequent operations, so the OS 221 (more specifically, the MMU) cannot know that physical page 981 is in use. The reason for mapping physical page 981 to the free logical page 961 in the kernel memory space 96 is to let the OS 221 know that physical page 981 is in use, so that the OS 221 will not use physical page 981 for other purposes. Therefore, if it can be achieved by other methods, this mapping can also be omitted.

[0267] Through this mapping, the location of user data 71 on logical address space 95 is moved from logical page 971 to logical page 961.

[0268] The write / trimming control unit 122 copies the user data 71 stored in physical page 981 to the unused physical page 982 in NVRAM 24. Figure 18 (2)). The write / trimming control unit 122 changes the mapping destination of logical page 971 to the physical page 982 of the copy destination. Figure 18 (3)). The logical page 971 mapped to the physical page 982 of the copied destination is set to writable ( Figure 18 (4) in the middle.

[0269] After the interruption is handled, when the write / trim control unit 122 returns control to the application 223 or OS 221, which is the source of the write request, the interrupted write operation continues normally. That is, a new write is performed in the physical page 982 of the copy destination. Therefore, the application 223 or OS 221 can continue operating. The application 223 or OS 221, which is the source of the write request, is unaware that an interruption has occurred. Therefore, the application 223 or OS 221, which is the source of the write request, only perceives a delay in responding to the write request.

[0270] Furthermore, since the lock data list 245 also uses a logical address for access within host 2, the lock data list 245 needs to be modified accordingly because the logical page containing user data 71 has changed from logical page 971 to logical page 961. Without mapping physical page 981 to logical page 961, the lock data list 245 needs to be modified appropriately.

[0271] On the other hand, storage system 3 uses only addresses in physical address space 98 to access the memory of host 2. The physical address containing user data 71 remains unchanged, so storage system 3 can continue to access user data 71 within physical page 981 of the copy source.

[0272] After receiving the second completion, the physical page 981 of the copy source disconnected from the user memory space 97 is released from the mapping with the logical page 961 of the kernel memory space 96.

[0273] When multiple entities share a common storage area, and a write request is made from one entity to that storage area, the data stored in that storage area is copied to other storage areas. This method of executing write requests to the destination storage area is generally called copy-on-write. Copy-on-write minimizes the occurrence of replication and the increase in the amount of storage area used.

[0274] In existing copy-on-write architectures, multiple applications, each with its own independent virtual memory space, share a physical storage area containing the same data. When a write request arises from one application to this physical storage area, another physical storage area is allocated to that application, and the data from the shared physical storage area is copied to the newly allocated physical storage area. Then, this other physical storage area is mapped to the virtual memory space of that application.

[0275] In this copy-on-write implementation, a storage area on a data buffer 241 is shared between the storage system 3 (an external device serving as host 2) and applications such as 223. The storage system 3 accesses the storage area on the data buffer 241 using physical addresses instead of logical addresses. The storage system 3 does not write to this storage area, while applications such as 223 do. Then, a copy-on-write operation is performed on this storage area based on write requests from applications such as 223. This differs from conventional copy-on-write implementations.

[0276] (Second example of a write operation)

[0277] In the first example of the aforementioned write operation, upon receiving a request to write user data 71 to NAND flash memory 5, host 2 issues one write command, and storage system 3 responds with two completions to the write command. In contrast, in the second example of the write operation, upon receiving a request to write user data 71 to NAND flash memory 5, host 2 sends two write commands, and storage system 3 responds with two completions for each of the two write commands.

[0278] Specifically, upon receiving a write request to write user data 71 to NAND flash memory 5, the instruction issuing unit 211 of host 2 issues a first write instruction. Storage system 3 accepts the first write instruction and returns a completion message to host 2. Host 2 receives the completion message and issues a second write instruction. Then, after accepting the second write instruction and completing the process of writing user data 71 to NAND flash memory 5, storage system 3 returns a completion message to host 2. Both the first and second write instructions are instructions for writing user data 71 to NAND flash memory 5. After accepting the first and second write instructions, storage system 3 performs the process of writing user data 71 to NAND flash memory 5.

[0279] In the second example of the write operation, the action from when host 2 issues the first write command to when storage system 3 returns the completion of the first write command to host 2 is compared with the reference. Figure 11 The first example of the aforementioned write operation is the same.

[0280] Figure 19 The second example representing the write action Figure 11 The subsequent write operations.

[0281] After receiving the first completion notification of the first write instruction from the storage system 3 and updating the corresponding lock data list 245, the instruction issuing unit 211 of host 2 issues a second write instruction and stores it in the commit queue 242. Figure 19(1)). The second write instruction is, for example, a write instruction requesting to write the same content as the first write instruction. The second write instruction contains information indicating the corresponding first write instruction (e.g., instruction ID).

[0282] The instruction receiving unit 121 of storage system 3 retrieves the second write instruction from the submission queue 242. Figure 19 (2)). Then, the instruction receiving unit 121 sends the obtained second write instruction to the write / trimming control unit 122 ( Figure 19 (3) in the middle.

[0283] The write / trimming control unit 122 updates the write management table 63 using the second write command sent through the command receiving unit 121. Figure 19 (4)). Specifically, the write / trimming control unit 122 determines the entry in the write management table 63 corresponding to the first write instruction. In determining the entry, for example, information indicating the first write instruction included in the second write instruction is used. The write / trimming control unit 122 updates the determined entry to indicate that the second write instruction has been accepted. In each entry of the write management table 63, in addition to referring to Figure 10 In addition to the aforementioned structure, a field is also provided to indicate whether the first write command has been accepted or the second write command has been accepted. Furthermore, the write / trimming control unit 122 updates the command ID in the write management table 63 to the value of the command ID of the second write command. It can also be considered that the entry indicating that the second write command has been accepted corresponds to the group of the first and second write commands. Hereinafter, the group of the first and second write commands will also be referred to simply as the write command group.

[0284] Here, assuming that based on multiple entries in the write management table 63 that respectively indicate the acceptance of a second write instruction, the total amount of user data 71 requested to be written by the group of multiple write instructions corresponding to these multiple entries has reached a specific data unit. The specific data unit is, for example, the amount of data that can be written to the NAND flash memory 5 in a single data write operation.

[0285] After the total amount of user data 71 requested to be written by multiple write commands received from host 2 reaches a specific data unit, the instruction receiving unit 121 and the write / trimming control unit 122 write the specific data unit of user data 71 into the NAND flash memory 5, and return the second completion of each group of multiple write commands (more specifically, multiple second write commands) to host 2. That is, the instruction receiving unit 121 and the write / trimming control unit 122 do not immediately execute the write corresponding to the group of one accepted write command, but instead operate with the following mechanism (Delayed Write Completion): after the total amount of user data 71 requested to be written by multiple write commands reaches a specific data unit, the write corresponding to these multiple write commands is executed.

[0286] Specifically, the write / trimming control unit 122 forwards the user data 71 of the write unit from the data buffer 241 to the NAND flash memory 5, and writes the forwarded user data 71 of the write unit into the NAND flash memory 5. Figure 19 (5)). Then, if there is a group of write commands that can be read from the NAND flash memory 5, the write / trimming control unit 122 notifies the command receiving unit 121 that the processing corresponding to the group of write commands is complete. Figure 19 (6)). The write / trimming control unit 122 notifies the instruction receiving unit 121 that the processing of each group of multiple write instructions corresponding to the user data 71 to be written has been completed. The write / trimming control unit 122 deletes the entries corresponding to each group of multiple write instructions from the write management table 63. Figure 19 (7)). The write / trim control unit 122 updates the logical physical address translation table 62 based on the processing corresponding to groups of multiple write instructions respectively. Figure 19 (8)). Specifically, the write / prune control unit 122 updates the logical physical address translation table 62 by associating the LBAs specified by the groups of multiple write instructions with the physical storage locations where the corresponding user data 71 has been written. Furthermore, the write / prune control unit 122 appends the instruction IDs corresponding to the groups of multiple write instructions to the instruction log 51. Figure 19 (9) in the middle.

[0287] Each time a notification is received from the write / trim control unit 122, the instruction receiving unit 121 sends a second completion message to the host 2 indicating that the processing corresponding to the group of the write instruction has been completed. Figure 19(10)). More specifically, in response to a notification from the write / trim control unit 122, the instruction receiving unit 121 stores the completion (second completion) of the second write instruction for the group constituting the corresponding write instruction in the completion queue 243. The notification from the write / trim control unit 122 includes, for example, the instruction ID of the group of write instructions that has been processed.

[0288] Furthermore, if an error occurs in the processing corresponding to the write instruction group, the instruction receiving unit 121 sends the completion indicating the error to the host 2 as a second completion.

[0289] Next, the instruction issuing unit 211 of host 2 retrieves the second completion from the completion queue 243. Figure 19 (11)). Then, the instruction issuing unit 211 sends the obtained second completion to the write / prune management unit 212 ( Figure 19 (12) in the middle.

[0290] The write / trimming management unit 212 receives the second completion notification from the instruction issuing unit 211 and unlocks the user data 71 in the data buffer 241 corresponding to the received second completion notification. Figure 19 (13)). Then, the write / prune management unit 212 deletes the entry corresponding to the second completion received from the locked data list 245. Figure 19 (14)). That is, the write / trimming management unit 212 and the IO receiving unit 210 perform the entry deletion operation for the corresponding write command based on the completion of the second time.

[0291] Furthermore, in the event of a second completion indication error, host 2 (specifically, instruction issuing unit 211, write / prune management unit 212, and IO receiving unit 210) considers it a failure of storage system 3. Write / prune management unit 212 suspends processing of storage system 3 and performs exception handling as required by information processing system 1.

[0292] Furthermore, in the above description, only the user data for which the second write command was accepted is considered as the object to be written to the NAND flash memory 5. However, the command acceptance unit 121 and the write / trimming control unit 122 can also write user data for which only the first write command was accepted to the NAND flash memory 5. Therefore, the command acceptance unit 121 and the write / trimming control unit 122 can write user data to the NAND flash memory 5 before accepting the second write command. In this case, corresponding to the acceptance of the second write command, the command acceptance unit 121 sends a second completion message to the host 2. Therefore, in the write management table 63, in addition to the field indicating whether the second write command was accepted, a field indicating that the writing of user data to the NAND flash memory 5 has been completed is also required. The command acceptance unit 121 and the write / trimming control unit 122 refer to the entry in the write management table 63 corresponding to the received second write command. If the user data has been written to the NAND flash memory 5, they immediately return a completion message to the host 2 and delete the entry from the write management table 63.

[0293] As in the second example of the write operation described above, the information processing system 1 can also be configured such that, upon receiving a request to write user data 71 to the NAND flash memory 5, the host 2 issues two write commands, and the storage system 3 responds with two completions for each of these two write commands. The storage system 3 receives a group of write commands consisting of the two write commands. During the period when the storage system 3 is writing user data based on the group of write commands received from the host 2 and performing delayed write completion, the host 2 can use the lock data list 245 to manage the processing status corresponding to the issued write commands.

[0294] The following example illustrates the operation of an information processing system 1 configured as follows: Upon receiving a request to write user data 71 to NAND flash memory 5, the host 2 issues one write command, and the storage system 3 responds with a first completion and a second completion for that write command. Furthermore, the same operation can also be achieved in an information processing system 1 configured as follows: Upon receiving a request to write user data 71 to NAND flash memory 5, the host 2 issues two write commands, and the storage system 3 responds with two completions for each of these two write commands.

[0295] As described above, host 2 issues a write command to storage system 3 corresponding to a write request from application 223 or OS 221. Hereinafter, it will be explained that before the processing corresponding to the issued write command is completed (i.e., before the non-volatile conversion of the user data corresponding to the write command is completed), application 223 or OS 221 further generates other write requests or pruning requests for the LBA specified by the write command. Furthermore, write requests or pruning requests are also referred to as write / pruning requests.

[0296] For example, in storage system 3, when a write instruction corresponding to a further generated write request is issued, for one LBA, after user data is written according to the previously issued write instruction, user data is written according to the subsequently issued write instruction. That is, the user data written according to the previously issued write instruction is invalidated. In other words, although immediately invalidated, a write operation corresponding to the previous write instruction for that LBA is performed. This causes wear on the NAND flash memory 5 of storage system 3.

[0297] Furthermore, for example, in the case of issuing a trimming instruction corresponding to a further generated trimming request, in storage system 3, for one LBA, after user data is written according to a previously issued write instruction, the subsequently issued trimming instruction releases the allocation of that LBA. That is, the user data written according to the previously issued write instruction is invalidated. In other words, although it is immediately invalidated, a write operation corresponding to the previous write instruction for that LBA is performed. This causes wear on the NAND flash memory 5 of storage system 3.

[0298] Therefore, in this embodiment, if a write request for the LBA specified by the write command is further generated from application 223 or OS 221 before the processing corresponding to the issued write command is completed, the write for the LBA that is duplicated in the further generated write request within the write operation corresponding to the write command is cancelled. As a result, since overwriting of duplicated LBAs does not occur, wear and tear on the NAND flash memory 5 can be reduced.

[0299] Furthermore, in this embodiment, if a trimming request for the LBA specified by the write command is further generated from application 223 or OS 221 before the processing corresponding to the issued write command is completed, the write to the LBA that is duplicated in the further generated trimming request within the write operation corresponding to the write command is cancelled. Therefore, since overwriting of duplicated LBAs does not occur, wear on the NAND flash memory 5 can be reduced.

[0300] Hereinafter, the following write instruction will also be referred to as a "written instruction that has been issued but not completed": a write instruction issued from host 2 to storage system 3, and the corresponding processing in storage system 3 has not yet been completed.

[0301] Before the processing corresponding to the issued write instruction is completed, if a write / prune request for the LBA specified by the write instruction is further generated from application 223 or OS 221, the following cases are included: (1) the LBA range specified by the subsequently generated write / prune request completely includes the LBA range specified by the issued and incomplete write instruction; and (2) the LBA range specified by the subsequently generated write / prune request includes a portion of the LBA range specified by the issued and incomplete write instruction.

[0302] The write / trim management unit 212 of host 2 uses the locked data list 245 to determine whether there is an issued but incomplete write instruction (hereinafter also referred to as a duplicate write instruction) that specifies an LBA range that overlaps with at least a portion of the LBA range specified by the subsequently generated write / trim request. If a duplicate write instruction exists, the write / trim management unit 212 further determines the overlap relationship between the LBA range specified by the subsequently generated write / trim request and the LBA range specified by the duplicate write instruction. The overlap relationship is, for example, that the LBA range specified by the subsequently generated write / trim request completely includes the LBA range specified by the duplicate write instruction, or that the LBA range specified by the subsequently generated write / trim request includes a portion of the LBA range specified by the duplicate write instruction.

[0303] Furthermore, to efficiently retrieve entries for repeated write instructions from the lock data list 245, the lock data list 245 can also have other data structures that are not simply table structures. For example, the lock data list 245 can be generated for multiple local spaces obtained by dividing the entire LBA space used to access the storage system 3. By using the lock data list 245 corresponding to the local spaces containing the LBA range specified by the subsequently generated write / pruning requests, the retrieval of entries for repeated write instructions can be accelerated.

[0304] The actions of host 2 and storage system 3 are described below, respectively, in the cases where (1) the LBA range specified by the subsequently generated write / prune request completely includes the LBA range specified by the issued but not yet completed write instruction, and (2) the LBA range specified by the subsequently generated write / prune request includes a portion of the LBA range specified by the issued but not yet completed write instruction.

[0305] ((1) The case where the LBA range specified by a subsequently generated write / prune request completely includes the LBA range specified by an issued but not yet completed write instruction)

[0306] Figure 20 Examples of write / prune requests #2a to #2d are provided, where the write / prune requests #2a to #2d specify an LBA range that fully includes the LBA range specified by the issued but not yet completed write instruction #1. Figure 20 The “X” shown indicates the LBA specified by the corresponding write instruction #1. Figure 20 The “W” shown indicates the LBA specified by the corresponding write / prune requests #2a to #2d. The LBA specified by the write instruction indicates the sector where user data should be written. The LBA specified by the write request indicates the sector where user data should be written. The LBA specified by the prune request indicates the sector whose allocation should be released. The LBA ranges specified by write / prune requests #2a, #2b, #2c, and #2d are the LBA ranges for writing or pruning corresponding to these write / prune requests (more specifically, the corresponding write instructions or prune instructions).

[0307] Specifically, write instruction #1 specifies an LBA range from LBAx+1 to LBAx+2. The LBA range specified by write instruction #1 is the LBA range for which the non-volatile conversion of the user data corresponding to write instruction #1 is not yet complete.

[0308] Write / prune request #2a specifies an LBA range from LBA x+1 to LBA x+2. Write / prune request #2b specifies an LBA range from LBA x to LBA x+2. Write / prune request #2c specifies an LBA range from LBA x+1 to LBA x+3. Write / prune request #2d specifies an LBA range from LBA x to LBA x+3.

[0309] Thus, the LBA ranges specified by write / trim requests #2a, #2b, #2c, and #2d respectively completely encompass the LBA range specified by write instruction #1. Therefore, the user data written corresponding to write instruction #1 becomes invalid data, corresponding to either the write instructions or trim instructions corresponding to write / trim requests #2a, #2b, #2c, and #2d respectively. By aborting such writes corresponding to write instruction #1, wear and tear on the NAND flash memory 5 within the storage system 3 can be reduced. A write instruction (here, write instruction #1) that writes user data that becomes invalid due to a subsequently generated write / trim request (more specifically, the corresponding write instruction or trim instruction) is a duplicate write instruction.

[0310] (Actions corresponding to write requests that fully encompass the LBA range specified by the issued but not yet completed write command)

[0311] Reference Figure 21 and Figure 22 This describes the action where the LBA range specified by a subsequently generated write request completely includes the LBA range specified by a written instruction that has been issued but not yet completed.

[0312] Figure 21 This represents an example of an action corresponding to a write request that specifies an LBA range that fully includes the LBA range specified by the issued but not yet completed write instruction. Figure 21 The actions shown are, for example, in reference Figure 11 The aforementioned write operation is performed afterward. The issued but incomplete write instruction is referred to as the first write instruction. The write request specifying an LBA range that completely includes the LBA range specified by the first write instruction is referred to as the second write request. The user data to be written corresponding to the first write instruction is designated as first user data 711. Furthermore, the user data requested to be written via the second write request is designated as second user data 712. First user data 711 and second user data 712 are stored in data buffer 241.

[0313] First, in host 2, the IO processing unit 210 accepts the second write request from application 223 or OS 221. Figure 21 (1)). The IO receiving unit 210 sends the received second write request to the write / prune management unit 212. Figure 21 (2) in the middle.

[0314] If the write / trim management unit 212 does not receive the first completion of the first write instruction, it waits to receive the first completion of the first write instruction. In the storage system 3, the accepted write and trim instructions can be executed out of order. Therefore, when performing multiple writes or trims on one LBA, the host 2 needs to control the storage system 3 according to the order in which the write requests or trim requests are generated by the application 223 or the OS 221. Specifically, the host 2 needs to control the storage system 3 so that the content corresponding to the later-generated write or trim request is ultimately reflected in the NAND flash memory 5 of the storage system 3. Therefore, the instruction issuing unit 211 and the write / trim management unit 212 wait to receive the first completion of the first write instruction and perform actions corresponding to the second write request. Furthermore, the following example illustrates the case where the first completion of the first write instruction is a normal response (i.e., a completion indicating normal completion). In the case where the first completion of the first write instruction is an abnormal response (i.e., a completion indicating abnormal completion), a reference is made for the second write request. Figures 11 to 18 The aforementioned write operation.

[0315] In parallel with the action of waiting for the first completion of the first write command, the write / trimming management unit 212 locks the second user data 712. Figure 21 (3) in the middle.

[0316] After receiving a normal response to the first write instruction, the write / prune management unit 212 instructs the instruction issuance unit 211 to issue a write instruction corresponding to the second write request (hereinafter referred to as the second write instruction). Figure 21 (4)). The instruction issuing unit 211, in response to the request made by the write / trim management unit 212, issues a second write instruction for writing the second user data 712. That is, the instruction issuing unit 211 generates SQ entry information corresponding to the second write instruction for writing the second user data 712. The instruction issuing unit 211 sends the generated SQ entry information to the write / trim management unit 212. Figure 21 (5) in the middle.

[0317] The write / trimming management unit 212 uses the SQ entry information sent by the instruction issuing unit 211 to generate an entry for the locked data list 245. This generated entry is referred to as the second entry. The second entry contains, for example, SQ entry information equivalent to a second write instruction and data area management information. This data area management information is information that can determine the storage area within the data buffer 241 where the second user data 712 is stored. The write / trimming management unit 212 appends the second entry to the locked data list 245. Figure 21 (6) in the middle.

[0318] Then, the instruction issuing unit 211 saves the second write instruction (SQ entry information) in the commit queue 242. Figure 21 (7) in the middle.

[0319] The subsequent actions in memory system 3 corresponding to the second write instruction ( Figure 21 (8) to (12) in the reference Figure 11 The actions in the aforementioned storage system 3 ( Figure 11 (8) to (12) are the same. Additionally, the actions in host 2 corresponding to the first completion of the second write instruction are the same. Figure 21 (13) to (17) in the reference Figure 11 The actions in host 2 mentioned above ( Figure 11 (13) to (15), (18) and (19) are the same.

[0320] Next, if the first completion of the second write instruction is a normal response, the information processing system 1 performs an action to abort the first write instruction (abnormal termination action).

[0321] Figure 22 Indicates in Figure 21 Subsequent abnormal termination actions.

[0322] First, the instruction issuing unit 211 issues an abnormal termination instruction to abort the first write instruction. That is, the instruction issuing unit 211 generates SQ entry information corresponding to the abnormal termination instruction for aborting the first write instruction. The issued abnormal termination instruction contains information identifying the first write instruction as the object of abort (e.g., instruction ID). Then, the instruction issuing unit 211 stores the issued abnormal termination instruction (SQ entry information) in the submission queue 242. Figure 22 (1) in the middle.

[0323] Next, the instruction receiving unit 121 of the storage system 3 obtains an abnormal termination instruction from the submission queue 242. Figure 22 (2)). Then, the instruction receiving unit 121 sends the acquired abnormal termination instruction to the write / trim control unit 122. Figure 22 (3) in the middle.

[0324] The write / trimming control unit 122 uses an abnormal termination command sent by the instruction receiving unit 121 to update the write management table 63. Figure 22 (4)). Specifically, the write / trimming control unit 122 uses the instruction ID of the first write instruction specified by the abnormal termination instruction to determine the corresponding entry in the write management table 63. If the write operation based on the determined entry has not started, the write / trimming control unit 122 deletes the entry from the write management table 63. Thus, the write corresponding to the first write instruction is aborted. The write / trimming control unit 122 notifies the instruction receiving unit 121 that the abort of the first write instruction corresponding to the abnormal termination instruction has been successful (abnormal termination successful). Figure 22 (5) in the middle.

[0325] Furthermore, if a write operation based on a determined entry has already begun, the write / prune control unit 122 notifies the instruction receiving unit 121 that the abort of the first write instruction corresponding to the abnormal termination instruction has failed (abnormal termination failure). Figure 22 (5)). That is, the write / trim control unit 122 refuses to abort the first write instruction corresponding to the abnormal termination instruction. In addition, if there is no entry in the write management table 63 corresponding to the instruction ID of the first write instruction, the write / trim control unit 122 also notifies the instruction receiving unit 121 of the abnormal termination failure. Figure 22 (5) in the middle.

[0326] In response to the notification from the write / trim control unit 122, the instruction receiving unit 121 saves the completion of the abnormal termination instruction in the completion queue 243. Figure 22(6)). Specifically, if the write / trim control unit 122 notifies the abnormal termination as successful, the instruction receiving unit 121 saves the completion indicating the abnormal termination as successful (i.e., normal termination) in the completion queue 243. Conversely, if the write / trim control unit 122 notifies the abnormal termination as unsuccessful, the instruction receiving unit 121 saves the completion indicating the abnormal termination as unsuccessful (i.e., abnormal termination) in the completion queue 243.

[0327] Next, the instruction issuing unit 211 of host 2 retrieves the completion (or completion) of the abnormal termination instruction from the completion queue 243. Figure 22 (7)). Then, the instruction issuing unit 211 sends the obtained completion information to the write / prune management unit 212 ( Figure 22 (8) in the middle.

[0328] In the case of successful completion indicating abnormal termination, since the first write instruction was aborted, the write / trimming management unit 212 releases the lock on the first user data 711 in the data buffer 241 corresponding to the first write instruction. Figure 22 (9)). Furthermore, in the case of creating a list of PRP entries or a second or subsequent SGL segment, the write / trimming management unit 212 also releases the area containing the pointer list 244. Then, the write / trimming management unit 212 deletes the first entry corresponding to the first write instruction from the locked data list 245. Figure 22 (10)). That is, the write / trimming management unit 212 and the IO receiving unit 210 perform the entry deletion operation for the first write command.

[0329] In the case of completion indicating abnormal termination failure, since the first write instruction was not aborted, the write operation corresponding to the first write instruction continues. That is, the write / trimming management unit 212 does not unlock the first user data 711 in the data buffer 241, nor does it delete the first entry from the locked data list 245.

[0330] Figure 23 Indicates passage Figure 22 The example of deleting an entry from the locked data list 245 by the action of (10) is shown. The locked data list 245 contains an entry 81 corresponding to the first write instruction and an entry 82 corresponding to the second write instruction.

[0331] Item 81 and Figure 17 Similarly, entry 81 indicates that the first completion of the first write instruction has been received. Entry 81 is deleted when a completion indicating an abnormal termination of the first write instruction is received from storage system 3.

[0332] Entry 82 contains SQ entry information "sqentry_info2", completion order "cseq2", data region management information "region_info2", and completion status "completed". Entry 82 indicates that the first completion of the second write instruction has been received.

[0333] Through the above writing and interrupt actions, if the LBA range specified by the subsequently generated second write request completely includes the LBA range specified by the issued but not yet completed first write instruction, the write corresponding to the first write instruction in the storage system 3 can be aborted.

[0334] Specifically, host 2 sends a second write instruction corresponding to the second write request to storage system 3. Upon receiving a completion notification from storage system 3 indicating normal termination of the first write instruction, host 2 sends an abnormal termination instruction to storage system 3 to abort the first write instruction.

[0335] Storage system 3 receives an abnormal termination command from host 2. If the write operation corresponding to the first write command has not yet started, the first write command is aborted. Then, storage system 3 returns a completion message indicating successful abnormal termination of the first write command to host 2. Host 2 performs the entry deletion operation for the first write command based on the completion message indicating successful abnormal termination.

[0336] Therefore, in storage system 3, no write operation is performed to the NAND flash memory 5 corresponding to the first write instruction. That is, no write operation is performed to the LBA range covered by the second write request. As a result, wear and tear on the NAND flash memory 5 can be reduced.

[0337] Here, a second example of using the aforementioned write operation will be explained, specifically, the case where the following operation is used: Upon receiving a request to write user data 71 to NAND flash memory 5, the instruction issuing unit 211 of host 2 sends two write instructions, and storage system 3 responds with two completions for each of these two write instructions. In this case, if host 2 does not receive the first completion for the first write instruction, or if it receives the first completion for the first write instruction but has not yet sent the second write instruction to storage system 3, it will not send the second write instruction to storage system 3. Furthermore, host 2 may also send an abnormal termination instruction to storage system 3 to delete information generated in storage system 3 (e.g., entries in write management table 63) corresponding to the first write instruction. This abnormal termination instruction is for the first write instruction that has already been completed. That is, this abnormal termination instruction is not a previous abnormal termination instruction that interrupts an operation requested by an instruction, but a new type of abnormal termination instruction used to delete information generated corresponding to the first write instruction. Thus, compared with the aforementioned... Figure 22 Similarly, in the case of a successful abnormal termination, the write operation corresponding to the first write instruction can be aborted. Furthermore, if host 2 does not send an abnormal termination instruction, upon completion of the second write instruction, host 2 deletes the corresponding entry from the lock data list 245 of the first write instruction. Additionally, upon completion of the second write instruction, storage system 3 deletes the entry for the first write instruction from the write management table 63.

[0338] If the second write instruction has already been sent to storage system 3, host 2 will send an exception termination instruction to storage system 3 to abort the second write instruction. This will stop the write operation corresponding to the first write instruction.

[0339] (Actions corresponding to pruning requests that fully encompass the LBA range specified by the issued but not yet completed write command)

[0340] The same action can be achieved by replacing the aforementioned second write request with a trim request. That is, the first write instruction can be aborted even if the LBA range specified by the subsequently generated trim request completely includes the LBA range specified by the first write instruction that has been issued but not yet completed.

[0341] Reference Figure 24 and Figure 25 This describes the action where the LBA range specified by a subsequently generated trim request completely includes the LBA range specified by a written instruction that has been issued but not yet completed.

[0342] Figure 24This represents an example of an action corresponding to a pruning request that specifies an LBA range that fully includes the LBA range specified by the issued but not yet completed write instruction. Figure 24 The actions shown are, for example, in reference Figure 11 The aforementioned write operation is performed afterward. The issued but incomplete write instruction is referred to as the first write instruction. The user data to be written corresponding to the first write instruction is designated as first user data 711. The trimming request specifies one or more LBA ranges that completely encompass the LBA range specified by the first write instruction. Range information 72 represents information indicating the one or more LBA ranges specified by the trimming request. First user data 711 and range information 72 are stored in data buffer 241.

[0343] First, in host 2, the IO handling unit 210 handles the pruning request from application 223 or OS 221. Figure 24 (1)). The IO receiving department 210 sends the received trimming request to the write / trimming management department 212. Figure 24 (2) in the middle.

[0344] If the write / trimming management unit 212 does not receive the first completion response for the first write command, it waits to receive the first completion response for the first write command. Furthermore, the following example illustrates the case where the first completion response for the first write command is a normal response.

[0345] In parallel with the action of waiting for the first completion of the first write command, the write / trimming management unit 212 locks the range information 72 ( Figure 24 (3) in the middle.

[0346] After the first completion of receiving a normal response to the first write instruction, the write / trim management unit 212 entrusts the instruction issuance unit 211 to issue a trimming instruction corresponding to the trimming request. Figure 24 (4)). The instruction issuing unit 211, in response to the request made by the write / trim management unit 212, issues a trimming instruction to release the allocation of the LBA range based on the range information 72. That is, the instruction issuing unit 211 generates SQ entry information corresponding to the trimming instruction for releasing the allocation of the LBA range based on the range information 72. The instruction issuing unit 211 sends the generated SQ entry information to the write / trim management unit 212 ( Figure 24 (5) in the middle.

[0347] The write / trim management unit 212 uses the SQ entry information sent by the instruction issuing unit 211 to generate an entry for the locked data list 245. This generated entry is referred to as a third entry. The third entry, for example, contains SQ entry information corresponding to the issued trimming instruction and data area management information. This data area management information is information that can determine the storage area within the data buffer 241 where the range information 72 is stored. The write / trim management unit 212 appends the third entry to the locked data list 245. Figure 24 (6) in the middle.

[0348] Then, the instruction issuing unit 211 saves the issued trimming instruction (SQ entry information) in the submission queue 242. Figure 24 (7) in the middle.

[0349] The instruction receiving unit 121 of storage system 3 obtains the pruning instruction from the submission queue 242. Figure 24 (8)). Then, the instruction receiving unit 121 sends the obtained trimming instruction to the write / trimming control unit 122 ( Figure 24 (9) in the middle.

[0350] The write / trim control unit 122 confirms that the trim instruction sent by the instruction receiving unit 121 is an executable instruction. Specifically, the write / trim control unit 122 confirms, for example, that the data pointer is valid and the LBA range specified by the range information 72 is valid. If the trim instruction is an executable instruction, the write / trim control unit 122 notifies the instruction receiving unit 121 that the acceptance of the trim instruction has been completed. Figure 24 (10) in the middle.

[0351] In response to a notification from the write / trim control unit 122, the instruction receiving unit 121 stores the first completion (indicating normal completion) of the trimming instruction in the completion queue 243. Figure 24 (11)). The first completion contains the instruction ID of the trimming instruction.

[0352] In addition, if the trimming instruction obtained from the submission queue 242 is an unexecutable instruction, the instruction receiving unit 121 can save the completion indicating abnormal termination as the first completion in the completion queue 243.

[0353] Next, the instruction issuing unit 211 of host 2 retrieves the first completion of the pruning instruction from the completion queue 243. Figure 24 (12)). Then, the instruction issuing unit 211 sends the obtained first completion to the write / prune management unit 212 ( Figure 24 (13) in the middle.

[0354] If the first completion indicates a normal end, the write / trimming management unit 212 updates the third entry corresponding to the trimming command in the locked data list 245. Figure 24 (14)). More specifically, the write / trimming management unit 212 appends the assigned sequence number (i.e., information indicating the receiving order of the first completion) and information indicating that the first completion has been received to the third entry. The write / trimming management unit 212 notifies the IO receiving unit 210 of the completion of trimming (normal termination). Figure 24 (15)). Then, the IO receiving unit 210 notifies the application 223 or OS 221 that the pruning is complete. Figure 24 (16) in the middle.

[0355] In the case where the first completion indicates an abnormal termination, the write / trim management unit 212 releases the lock on the range information 72 corresponding to the trimming command in the data buffer 241. Figure 24 (17)). Then, the write / trimming management unit 212 deletes the third entry corresponding to the trimming instruction from the locked data list 245 ( Figure 24 (18)). The Write / Prune Management Department 212 notifies the IO Acceptance Department 210 of the end of the exception ( Figure 24 (19)). Then, the IO handling unit 210 notifies the application 223 or OS 221 of the abnormal termination ( Figure 24 (20) in the middle.

[0356] If the first completion of the trimming command is a normal response, further actions (abnormal termination actions) are performed in host 2 and storage system 3 to abort the first write command. This abnormal termination action is related to... Figure 22 The aforementioned abnormal termination action is the same.

[0357] Furthermore, as described above, host 2 begins the operation to abort the first write instruction after receiving the first completion signal indicating the normal completion of the trim instruction. This is because, for example, if the first completion signal of the first write instruction has been successfully received, before sending the trim instruction, the trim instruction will not succeed if the LBA range specified by the trim instruction has become write-prohibited due to a security setting. The first write instruction cannot fail to complete normally. Except in cases where the first completion signal for the trim instruction cannot be received due to a malfunction of storage system 3, i.e., ensuring the reception of the first completion signal indicating the normal completion of the trim instruction, host 2 can begin the operation to abort the first write instruction before receiving the first completion signal indicating the normal completion of the trim instruction.

[0358] Additionally, in host 2 and storage system 3, an action is performed to release the allocation of the specified LBA range in response to the pruning command received in storage system 3.

[0359] Figure 25 This represents an example of an action corresponding to a trimming command received in storage system 3. Figure 25 The actions shown are performed, for example, after completing or terminating the following write instruction, which precedes the trim instruction and specifies an LBA range that overlaps with the LBA range specified by the trim instruction.

[0360] First, the write / trim control unit 122 of the storage system 3 uses the range information 72 corresponding to the trim command to release the allocation of the LBA range specified by the range information 72. Figure 25 (1)). The write / trim control unit 122 updates the logical physical address translation table 62, for example, in a manner indicating that the LBA range specified by the range information 72 is not mapped to any physical address, and releases the allocation of that LBA range. Then, the write / trim control unit 122 notifies the instruction receiving unit 121 of the completion of the processing corresponding to the trim instruction. Figure 25 (2)). Furthermore, the write / trim control unit 122 appends the instruction ID of the trimming instruction to the instruction log 51 ( Figure 25 (3) in the middle.

[0361] In response to the notification from the write / trim control unit 122, the instruction receiving unit 121 sends a second completion message to the host 2 indicating that the processing corresponding to the trimming instruction has been completed. Figure 25 (4)). More specifically, the instruction receiving unit 121, in response to the notification from the write / trim control unit 122, saves the second completion of the trimming instruction in the completion queue 243. The notification from the write / trim control unit 122 includes, for example, the instruction ID of the trimming instruction that has been processed.

[0362] Furthermore, if an error occurs in the processing corresponding to the trimming instruction, the instruction receiving unit 121 sends a completion message indicating the error to the host 2 as a second completion message.

[0363] Next, the instruction issuing unit 211 of host 2 retrieves the second completion from the completion queue 243. Figure 25 (5)). Then, the instruction issuing unit 211 sends the obtained second completion to the write / prune management unit 212 ( Figure 25 (6) in the middle.

[0364] The write / trim management unit 212 receives the second completion notification from the instruction issuance unit 211 and unlocks the range information 72 corresponding to the trimming instruction. Figure 25(7)). Then, the write / trimming management unit 212 deletes the third entry corresponding to the trimming instruction from the locked data list 245 ( Figure 25 (8) in the middle.

[0365] Furthermore, in the event of a second completion indication error, host 2 (specifically, write / prune management unit 212) considers it a failure of storage system 3. Write / prune management unit 212 suspends processing for storage system 3 and performs exception handling as for information processing system 1.

[0366] Through the above pruning and abnormal termination actions, if the LBA range specified by the subsequently generated pruning request completely includes the LBA range specified by the first write instruction that has been issued but not yet completed, the write operation corresponding to the first write instruction in the storage system 3 can be aborted.

[0367] Specifically, host 2 sends a trimming instruction corresponding to the trimming request to storage system 3. Upon receiving a first completion indication from storage system 3 indicating normal termination of the trimming instruction, host 2 sends an abnormal termination instruction to storage system 3 to abort the first write instruction.

[0368] Storage system 3 receives an abnormal termination command from host 2. If the write operation corresponding to the first write command has not yet started, the first write command is aborted. Then, storage system 3 returns a completion message indicating successful abnormal termination of the first write command to host 2. Based on the completion message indicating successful abnormal termination, host 2 removes the entry corresponding to the first write command from the locked data list 245.

[0369] Therefore, in storage system 3, no write operation is performed to the NAND flash memory 5 corresponding to the first write instruction. That is, no write operation is performed to the LBA range that was deallocated in the trim request. As a result, wear and tear on the NAND flash memory 5 can be reduced.

[0370] Furthermore, similar to the second example of the aforementioned write operation, it can also be configured such that, when the I / O receiving unit 210 of host 2 receives a pruning request to release the allocation of the LBA range, the instruction issuing unit 211 of host 2 issues two pruning instructions, and the storage system 3 responds with two completions for each of these two pruning instructions. In this configuration, if the LBA range specified by the subsequently generated pruning request completely includes the LBA range specified by the first write instruction that has been issued but not yet completed, the first write instruction can also be aborted in the same way.

[0371] Here, we will explain the case where there are multiple issued but not yet completed write commands that specify an LBA range that is completely contained within the LBA range specified by a subsequently generated write / prune request.

[0372] Figure 26This represents an example of write / trim request #2, which specifies an LBA range that fully encompasses the LBA ranges specified by the issued but incomplete write instructions #1X and #1Y, respectively. Figure 26 The “X” shown indicates the LBA specified by the corresponding write instruction #1X. Figure 26 The “Y” shown indicates the LBA specified by the corresponding write instruction #1Y. Figure 26 The “W” shown indicates the LBA specified by the corresponding write / trim request #2. The LBA range specified by write / trim request #2 is the range of LBAs to be written or trimmed in accordance with that write / trim request (more specifically, the corresponding write instruction or trim instruction).

[0373] Specifically, the write instruction #1X specifies an LBA range from LBA x+1 to LBA x+2. The LBA range specified by the write instruction #1X is the LBA range for which the non-volatile conversion of the user data corresponding to the write instruction #1X has not yet been completed.

[0374] The write instruction #1Y specifies an LBA range from LBA x+4 to LBA x+5. The LBA range specified by write instruction #1Y is the LBA range for which the non-volatile conversion of the user data corresponding to write instruction #1Y is not yet complete.

[0375] In write / prune request #2, an LBA range from LBA x to LBA x+6 was specified.

[0376] Thus, the LBA range specified by write / prune request #2 completely includes the LBA ranges specified by multiple write instructions #1X and #1Y respectively.

[0377] If the LBA range specified by a subsequently generated write / prune request completely encompasses the LBAs specified by multiple issued but incomplete write commands, the aforementioned abnormal termination action is performed on each of these multiple write commands.

[0378] ((2) The LBA range specified by a subsequently generated write / prune request includes a portion of the LBA range specified by an issued but not yet completed write instruction)

[0379] If the LBA range specified by a subsequently generated write / prune request includes a portion of the LBA range specified by an issued but incomplete write command, one of the methods (2-a) for correcting the issued but incomplete write command and (2-b) for aborting the issued but incomplete write command can be used. These two methods will be described separately.

[0380] ((2-a) Method for correcting a write command that has been issued but not yet completed)

[0381] Figure 27 Examples of write / prune requests #2a and #2b are provided, which specify an LBA range that includes a portion of the LBA range specified by the issued but not yet completed write instruction #1. Figure 27 The “X” shown indicates the LBA specified by the corresponding write instruction #1. Figure 27 The “W” shown indicates the LBA specified by the corresponding write / trim requests #2a and #2b. The LBA ranges specified by write / trim requests #2a and #2b are the LBA ranges for writing or pruning corresponding to these write / trim requests (more specifically, the corresponding write instructions or pruning instructions).

[0382] Specifically, write instruction #1 specifies an LBA range from LBA x+1 to LBA x+2. The LBA range specified by write instruction #1 is the LBA range for which the non-volatile conversion of the user data corresponding to write instruction #1 is not yet complete.

[0383] In write / trim request #2a, an LBA range from LBA x to LBA x+1 is specified. The LBA range specified by write / trim request #2a includes a continuous portion from the beginning to the end of the LBA range specified by write instruction #1. Alternatively, the continuous portion from the beginning to the end can also be just the beginning of the LBA.

[0384] In write / trim request #2b, an LBA range from LBA x+2 to LBA x+3 is specified. The LBA range specified by write / trim request #2b includes a continuous portion from the end to the beginning of the LBA range specified by write instruction #1. Alternatively, the continuous portion from the end to the beginning can also be just the last LBA.

[0385] More specifically, the LBA range from LBA x to x+1 specified by write / trim request #2a includes LBA x+1 (i.e., sectors to be covered or trimmed) within LBA x+1 and x+2 specified by write instruction #1, but excludes LBA x+2 (i.e., sectors not to be covered or trimmed). In other words, LBA x+1 and x+2 specified by write instruction #1 include not only LBA x+1 (i.e., sectors to be covered or trimmed) within LBA x and x+1 specified by write / trim request #2a, but also LBA x+2 (i.e., sectors not to be covered or trimmed).

[0386] Additionally, the LBA range from LBA x+2 to x+3 specified by write / trim request #2b includes LBA x+2 (i.e., sectors to be covered or trimmed) within LBA x+1 and x+2 specified by write instruction #1, but excludes LBA x+1 (i.e., sectors not to be covered or trimmed). In other words, LBA x+1 and x+2 specified by write instruction #1 include not only LBA x+2 (i.e., sectors to be covered or trimmed) within LBA x+2 and x+3 specified by write / trim request #2b, but also LBA x+1 (i.e., sectors not to be covered or trimmed).

[0387] Thus, a write / trim request that specifies a portion of the LBA range specified by an issued but incomplete write instruction is, for example, (A) specifying a write / trim request that specifies a portion of the LBA range specified by the write instruction from beginning to end, or (B) specifying a write / trim request that specifies a portion of the LBA range specified by the write instruction from end to beginning.

[0388] Alternatively, a write / prune request that specifies a portion of the LBA range defined by an issued but incomplete write instruction can be (C) a write / prune request that specifies a portion of the LBA range within the LBA range specified by the write instruction, excluding the beginning and the end of the LBA range.

[0389] Figure 28 This represents an example of a write / trim request #2, which specifies an LBA range within the LBA range specified by an issued but incomplete write instruction #1, excluding both the beginning and the end of the LBA.

[0390] Specifically, write instruction #1 specifies an LBA range from LBA x to LBA x+4. The LBA range specified by write instruction #1 is the LBA range for which the non-volatile conversion of the user data corresponding to write instruction #1 is not yet complete.

[0391] In write / trim request #2, an LBA range from LBA x+1 to LBA x+2 is specified. The LBA range specified by write / trim request #2 is the LBA range for writing or pruning corresponding to this write / trim request (more specifically, the corresponding write instruction or pruning instruction).

[0392] Thus, the LBA range specified by write / trim request #2 includes the middle portion of the LBA range specified by write instruction #1.

[0393] More specifically, LBA x+1 and x+2 specified by write / trim request #2 include LBA x+1 and x+2 within the LBA range from LBA x to x+4 specified by write instruction #1 (i.e., sectors to be covered or trimmed), but exclude the initial LBA x and the consecutive LBA range from the end LBA x+4 to LBA x+3 towards the beginning (i.e., sectors not to be covered or trimmed). In other words, the LBA range from LBA x to x+4 specified by write instruction #1 includes not only LBA x+1 and x+2 (i.e., sectors to be covered or trimmed) specified by write / trim request #2, but also LBA x and the LBA range from LBA x+3 to x+4 (i.e., sectors not to be covered or trimmed).

[0394] like Figure 27 As shown, the LBA ranges specified by the subsequently generated write / prune requests #2a and #2b respectively include a portion of the LBA range specified by the issued but incomplete write instruction #1. Figure 28 As shown, the LBA range specified by the subsequently generated write / prune request #2 includes a portion of the LBA range specified by the issued but not yet completed write instruction #1.

[0395] This describes the action where the LBA range specified by a subsequently generated write request includes a portion of the LBA range specified by a written instruction that has been issued but not yet completed.

[0396] Figure 29 This represents an example of an action corresponding to a write request that specifies a portion of the LBA range included by a write instruction that has been issued but not yet completed. Figure 29 The actions shown are, for example, in reference Figure 11 The aforementioned write operation takes place afterward.

[0397] First, with Figure 21Similarly, after host 2 receives the first completion of an issued but incomplete write instruction (first write instruction), host 2 and storage system 3 perform actions corresponding to a write request (hereinafter referred to as the third write request) that specifies an LBA range including a portion of the LBA range specified by the first write instruction. That is, after receiving the first completion of a normal response to the first write instruction, host 2 sends a write instruction corresponding to the third write request (hereinafter referred to as the third write instruction) to storage system 3 and manages the entries in the lock data list 245 corresponding to the third write instruction. Storage system 3 updates the write management table 63 based on the third write instruction and returns the first completion of the third write instruction to host 2. Then, if the first completion of the third write instruction is a normal response, host 2 updates the entries in the lock data list 245 corresponding to the third write instruction to indicate that the first completion has been received.

[0398] The user data to be written corresponding to the first write instruction is set as first user data 711. The user data requested to be written via the third write request is set as third user data 713. First user data 711 and third user data 713 are stored in data buffer 241.

[0399] The instruction issuing unit 211 issues a correction instruction to correct the first write instruction. That is, the instruction issuing unit 211 generates SQ entry information corresponding to the correction instruction for correcting the first write instruction. The issued correction instruction contains information that can identify the first write instruction as the object of correction (e.g., instruction ID) and information indicating the LBA range that should be canceled from writing. The LBA range that should be canceled from writing represents the portion that overlaps between the LBA range specified by the first write instruction and the LBA range specified by the third write request. The instruction issuing unit 211 stores the issued correction instruction (SQ entry information) in the submission queue 242. Figure 29 (1) in the middle.

[0400] Then, the instruction receiving unit 121 of the storage system 3 obtains the correction instruction from the submission queue 242. Figure 29 (2)). Then, the instruction receiving unit 121 sends the obtained correction instruction to the write / trim control unit 122 ( Figure 29 (3) in the middle.

[0401] The write / trimming control unit 122 updates the write management table 63 using the correction command sent by the command receiving unit 121. Figure 29(4)). Specifically, the write / trimming control unit 122 uses the instruction ID of the first write instruction specified by the correction instruction to determine the corresponding entry in the write management table 63. If a write operation based on the determined entry has not started, and the LBA range specified by the correction instruction is valid (i.e., within the LBA range specified by the first write instruction), the write / trimming control unit 122 updates the entry, thereby canceling the write to the LBA range specified by the correction instruction. More specifically, the write / trimming control unit 122 generates correction instruction data 64 based on information representing the LBA range specified by the correction instruction. Then, the write / trimming control unit 122 registers a pointer to the generated correction instruction data 64 in the pointer field pointing to the correction instruction data of the entry. Thus, when a write to the NAND flash memory 5 is performed in accordance with the first write instruction, the write / trimming control unit 122 controls based on the updated entry, thereby preventing the write to the LBA range specified by the correction instruction within the LBA range specified by the first write instruction. Then, the write / trimming control unit 122 notifies the instruction receiving unit 121 that the correction of the first write instruction corresponding to the correction instruction has been successful (correction successful). Figure 29 (5) in the middle.

[0402] Furthermore, the correction instruction data 64 in the storage system 3 can be set to a list structure in the same way as the correction instruction data list in the host 2, and operations such as (1) appending, (2) correcting, (3) inserting and (4) deleting can be performed.

[0403] Furthermore, if a write operation based on a determined entry has already begun, and if the LBA range specified by the correction instruction is invalid, the write / trimming control unit 122 notifies the instruction receiving unit 121 that the correction of the first write instruction corresponding to the correction instruction has failed (correction failure). Figure 29 (5)). That is, the write / trim control unit 122 rejects the correction of the first write instruction corresponding to the correction instruction. In addition, if there is no entry in the write management table 63 corresponding to the instruction ID of the first write instruction, the write / trim control unit 122 also notifies the instruction receiving unit 121 of the correction failure. Figure 29 (5) in the middle.

[0404] The instruction receiving unit 121, in response to the notification from the write / trim control unit 122, saves the completion of the correction instruction in the completion queue 243. Figure 29(6)). Specifically, if the write / trim control unit 122 notifies that the correction was successful, the instruction receiving unit 121 saves the completion indicating successful correction (i.e., normal completion) in the completion queue 243. Conversely, if the write / trim control unit 122 notifies that the correction failed, the instruction receiving unit 121 saves the completion indicating failed correction (i.e., abnormal completion) in the completion queue 243.

[0405] Next, the instruction issuing unit 211 of host 2 retrieves the completion (or completion) of the correction instruction from the completion queue 243. Figure 29 (7)). Then, the instruction issuing unit 211 sends the obtained completion information to the write / prune management unit 212 ( Figure 29 (8) in the middle.

[0406] In the case of completion indicating successful correction, the first write instruction is corrected. Therefore, the write / trimming management unit 212 generates correction instruction data 246 indicating the LBA range specified by the correction instruction (i.e., the LBA range that was written away). Figure 29 (9)). Then, the write / trimming management unit 212 registers the pointer to the generated correction instruction data 246 into the first entry (more specifically, the pointer field to the correction instruction data) in the locked data list 245 corresponding to the first write instruction. Figure 29 (10) in the middle.

[0407] Furthermore, if the third write request is the aforementioned (A) write request that specifies an LBA range including a continuous portion from the beginning to the end within the LBA range specified by the write instruction, the LBA range specified by the first write instruction is correspondingly reduced to exclude the continuous portion from the beginning to the end. Regarding this action, the following explains (a) the case where PRP is used as a data pointer and (b) the case where SGL is used as a data pointer.

[0408] (a) Cases where PRP is used as a data pointer

[0409] In this case, the LBA range can be excluded simply by modifying the entries in the locked data list 245. Specifically, the write / trimming management unit 212 updates the data pointer information within the SQ entry information of the first entry to indicate the storage location of user data to be written to the reduced LBA range, replacing the generation of correction instruction data 246, and registers the generated correction instruction data 246 in the correction instruction data list of the first entry. Furthermore, the write / trimming management unit 212 updates the beginning LBA of the LBA range within the SQ entry information of the first entry to indicate the reduced LBA range. Additionally, the write / trimming management unit 212 can unlock user data 71 that no longer needs to be written.

[0410] Specifically, the data pointer within the SQ entry information of the first entry in the locked data list 245 contains a reference Figure 5 In the case of the first PRP entry 921 described in (a), the write / trim management unit 212 rewrites the first PRP entry 921 to indicate the physical address of the storage area that stores the user data 71 to be written to the beginning of the new starting LBA. Additionally, the data pointer within the SQ entry information of the first entry includes a reference... Figure 5 In the case of the second PRP entry 922 described in (a), the write / trim management unit 212 rewrites the second PRP entry 922 so that it represents the physical address of multiple storage areas that hold user data 71 that should be written to the new LBA range.

[0411] Furthermore, in host 2, addresses in the logical address space can also be used to manage the area storing user data 71 by locking the data area management information in data list 245. When the data area information is specified by a start LBA and an end LBA, write / trimming management unit 212 only changes the start LBA to the new starting address. When the data area information is specified by a start LBA and the length of the data, write / trimming management unit 212 changes both.

[0412] Regardless of whether the area storing user data 71 is managed by physical address or logical address, the write / trimming management unit 212 unlocks the storage area containing user data 71 that no longer needs to be written to the storage system 3 due to the change in the starting address of the LBA range after confirming the normal completion of the correction instruction. Thus, this storage area is opened and can be used for other purposes.

[0413] (b) Cases where SGL is used as a data pointer

[0414] In this case, the data pointer within the SQ entry information of the first entry in the locked data list 245 represents the address of the SGL segment. Each SGL segment is located on the pointer list 244, which is also referenced by the storage system 3. When the initial LBA is changed by a correction instruction, the contents of each SGL segment also need to be corrected accordingly. However, since each SGL segment is also referenced by the storage system 3, this correction requires the locking function of the storage area storing each SGL segment and the recovery function when the exception ends. That is, the correction of SGLs is more complex than the correction of PRPs, which can be performed only by the host 2 or only by the storage system 3. Therefore, when using SGLs, it is preferable that the host 2 and the storage system 3 use correction instruction data 246 and correction instruction data 64, respectively.

[0415] In the case where the third write request is a write / trim request as described above (B) that specifies a continuous portion of the LBA range from the end to the beginning within the LBA range specified by the write instruction, the LBA range specified by the first write instruction is reduced by excluding the continuous portion from the end to the beginning. In this case, the write / trim management unit 212 may also update the number of sectors representing the LBA range shown by the SQ entry information in the first entry to represent the reduced LBA range, instead of generating the correction instruction data 246, and register the generated correction instruction data 246 in the correction instruction data list of the first entry. In this case, the write / trim management unit 212 may unlock the user data 71 that no longer needs to be written.

[0416] If the third write request is either (B) a write / trimming request that specifies a continuous portion of the LBA range from the end to the beginning within the LBA range specified by the write instruction, or (C) a write / trimming request that specifies a portion of the LBA range within the LBA range specified by the write instruction that does not include the beginning or the end, the beginning of the LBA range specified by the first write instruction is not changed. Therefore, even if the correction instruction data 246 is not registered in the correction instruction data list of the first entry, the write / trimming management unit 212 does not need to change the data pointer and the beginning LBA indicating the storage location of the user data 71 to be written corresponding to the first write instruction.

[0417] Furthermore, if the third write request (C) specifies a write / pruning request that includes an LBA range within the LBA range specified by the write instruction (excluding the beginning and the end), the LBA range specified by the first write instruction corresponds to the pruning, resulting in two LBA ranges by excluding the intermediate LBA ranges. These two LBA ranges can be determined by the LBA range shown in the SQ entry information in the first entry and the LBA range shown in the generated pruning instruction data 246.

[0418] In the case where the completion of a correction instruction indicates a failure to correct, since the first write instruction was not corrected, the write operation corresponding to the original first write instruction continues. That is, the write / trimming management unit 212 does not generate correction instruction data 246 corresponding to the correction instruction, and does not update the first entry in the locked data list 245.

[0419] Figure 30 Indicates in Figure 29Example of correction instruction data 246 generated in action (9). Correction instruction data 246 includes: the LBA "LBA x" at the beginning of the write is canceled, the number of sectors "n" that were canceled from the write, and a pointer "NULL" to the next correction instruction data.

[0420] The LBA at the beginning of the write instruction is removed, representing the LBA at the beginning of the LBA range specified by the correction instruction (i.e., the LBA range where the write instruction was removed). The number of sectors where the write instruction was removed represents the length of the LBA range specified by the correction instruction. Therefore, the LBA range specified by the correction instruction is obtained based on the LBA at the beginning of the write instruction "LBA x" and the number of sectors where the write instruction was removed "n".

[0421] The pointer to the next correction instruction data indicates a pointer to other correction instruction data 246 generated for the first write instruction. In this case, since correction instruction data 246 has not yet been generated, the pointer to the next correction instruction data is set to "NULL".

[0422] Furthermore, if the LBA range that was canceled from being written is simply expanded due to a correction corresponding to the next correction instruction for the first write instruction, the host 2 can update the already saved correction instruction data 246 to indicate the expanded LBA range instead of generating new correction instruction data 246. Conversely, if the correction corresponding to the next correction instruction for the first write instruction does not require indicating the LBA range that was canceled from being written, but instead indicates a reduction in the LBA range specified by the first write instruction, the corresponding correction instruction data 246 can be deleted, and the LBA range shown in the SQ entry information in the first entry of the corresponding lock data list 245 can be updated to indicate the reduced LBA range.

[0423] Furthermore, in the case where, as a result of corrections corresponding to multiple correction instructions, the write to the entire LBA range specified by the first write instruction is cancelled, similar to the aforementioned action (1) where the LBA range specified by the subsequently generated write / trim request completely includes the LBA range specified by the issued but incomplete write instruction, an abnormal termination action is performed to abort the first write instruction (i.e., Figure 22 (The abnormal termination action shown).

[0424] Furthermore, when deleting an entry in the lock data list 245 corresponding to a write instruction, the associated correction instruction data 246 is also deleted using a pointer to the correction instruction data within that entry. If a pointer is provided to the next correction instruction data within the associated correction instruction data 246, that other associated correction instruction data 246 is also deleted using that pointer. Similarly, for each deleted entry in the lock data list 245, all correction instruction data 246 associated with it in a list structure using pointers are also deleted.

[0425] Figure 31 Indicates passage Figure 29 The action in (10) updates the example of the locked data list 245 of the entry. The locked data list 245 contains entry 81 corresponding to the first write instruction and entry 83 corresponding to the third write instruction.

[0426] Item 81 and Figure 17 Similarly, entry 81 indicates that the first completion of the first write instruction has been received. In the pointer field to the correction instruction data of entry 81, a pointer "ptr1" is set to the correction instruction data 246. This correction instruction data 246 is the correction instruction data generated in response to the successful completion of the correction of the first write instruction received from the storage system 3.

[0427] Entry 83 contains SQ entry information "sqentry_info3", completion order "cseq3", data region management information "region_info3", and completion status "completed". Entry 83 indicates that the first completion of the third write instruction has been received.

[0428] Through the above write and correction actions, if the LBA range specified by the subsequently generated third write request includes a portion of the LBA range specified by the first write instruction that has been issued but not yet completed, a portion of the write corresponding to the first write instruction in the storage system 3 can be cancelled.

[0429] Specifically, host 2 sends a third write instruction corresponding to the third write request to storage system 3. Upon receiving a first completion indication from storage system 3 for the third write instruction, host 2 sends a correction instruction to storage system 3 to correct the first write instruction.

[0430] Storage system 3 receives a correction instruction from host 2. If the write operation corresponding to the first write instruction has not yet started, and the LBA range specified by the correction instruction is valid, then the first write instruction is corrected. Storage system 3 then returns a completion message indicating successful correction of the first write instruction to host 2. Host 2 updates the entry in the lock data list 245 corresponding to the first write instruction in response to the successful correction completion. Specifically, host 2 generates correction instruction data 246, for example, in response to the successful correction completion. Host 2 then registers the generated correction instruction data 246 into the correction instruction data list corresponding to the entry in the lock data list 245 of the first write instruction.

[0431] Therefore, in storage system 3, a portion of the write to NAND flash memory 5 corresponding to the first write instruction is cancelled. That is, no write is performed to the LBA range covered by the third write request. As a result, wear and tear on NAND flash memory 5 can be reduced.

[0432] Here, a second example of using the aforementioned write operation will be explained, specifically, the case where the following operation is used: When the I / O processing unit 210 of host 2 accepts a request to write user data 71 to NAND flash memory 5, the instruction issuing unit 211 of host 2 sends two write instructions, and the storage system 3 responds with two completions for each of these two write instructions. In this case, if host 2 has not received the first completion for the first write instruction, or if it has received the first completion for the first write instruction but has not yet sent the second write instruction to the storage system 3, host 2 sends the second first write instruction with a narrowed LBA range to the storage system 3. This narrowed LBA range is obtained by excluding LBA ranges that should be canceled from the LBA range specified by the first write instruction. Thus, compared with the aforementioned... Figure 29 Similarly, if the correction is successful, the portion of the write operation corresponding to the first write instruction can be cancelled. In this case, the write / trim control unit 122 of the storage system 3 corrects the start LBA, data pointer, and data length of the corresponding entry in the write management table 63. Alternatively, the write / trim control unit 122 may also generate correction instruction data 64 and write its pointer to the corresponding entry in the write management table 63.

[0433] Furthermore, if multiple LBA ranges are obtained by excluding LBA ranges that should be canceled from the LBA range specified by the first write instruction, the host 2 sends an instruction indicating the excluded LBA ranges to the storage system 3. For example, this instruction could be an instruction with a data structure like a pruning instruction. Additionally, the host 2 creates correction instruction data 246 and writes its pointer to the entry in the lock data list 245 corresponding to the first write instruction.

[0434] Having already sent the second first write instruction to storage system 3, host 2 sends a correction instruction to storage system 3 to correct the first write instruction. This cancels a portion of the write operation corresponding to the first write instruction.

[0435] Furthermore, the same action can be achieved by replacing the aforementioned third write request with a pruning request. That is, the first write instruction can be modified in the same way if the LBA range specified by the subsequently generated pruning request includes a portion of the LBA range specified by the issued but incomplete first write instruction. In this case, referring to... Figure 21 and Figures 29 to 31 In the aforementioned actions, the third write request is replaced with a pruning request, and the third write instruction is replaced with a pruning instruction. Furthermore, the pruning actions performed on host 2 and storage system 3 corresponding to the pruning request are as follows: Figure 24 and Figure 25 As mentioned above.

[0436] Furthermore, similar to the second example of the aforementioned write operation, it can also be configured such that, when the I / O receiving unit 210 of host 2 receives a pruning request, the instruction issuing unit 211 of host 2 issues two pruning instructions, and the storage system 3 responds with two completions for each of these two pruning instructions. Even in this configuration, if the LBA range specified by the pruning request includes a portion of the LBA range specified by the first write instruction that has been issued but not yet completed, the first write instruction can be modified in the same way.

[0437] Here, we will explain the case where there are multiple issued but not yet completed write commands that specify part or all of the LBA range contained in the LBA range specified by the subsequently generated write / prune request.

[0438] Figure 32 This represents an example of a write / prune request #2a, which specifies a portion or all of the LBA range defined by the issued but incomplete write instructions #1X and #1Y and write instruction #1Z, respectively. Figure 32 The “X” shown indicates the LBA specified by the corresponding write instruction #1X. Figure 32 The “Y” shown indicates the LBA specified by the corresponding write instruction #1Y. Figure 32 The “Z” shown indicates the LBA specified by the corresponding write instruction #1Z. Figure 32The “W” shown indicates the LBA specified by the corresponding write / trim request #2a. The LBA range specified by write / trim request #2a is the range of LBAs to be written or trimmed in accordance with that write / trim request (more specifically, the corresponding write instruction or trim instruction).

[0439] Specifically, the write instruction #1X specifies an LBA range from LBA x to LBA x+1. The LBA range specified by the write instruction #1X is the LBA range for which the non-volatile conversion of the user data corresponding to the write instruction #1X has not yet been completed.

[0440] The write instruction #1Y specifies an LBA range from LBA x+6 to LBA x+7. The LBA range specified by the write instruction #1Y is the LBA range for which the non-volatile conversion of the user data corresponding to the write instruction #1Y is not yet complete.

[0441] In write instruction #1Z, LBA x+3 is specified. The LBA specified by write instruction #1Z is the LBA of the user data corresponding to write instruction #1Z where the non-volatile conversion is not yet complete.

[0442] In write / prune request #2a, an LBA range from LBA x+1 to LBA x+6 was specified.

[0443] Thus, the LBA range specified by write / trim request #2a includes a portion of the LBA range specified by write instruction #1X, a portion of the LBA range specified by write instruction #1Y, and all the LBAs specified by write instruction #1Z. In this case, for example, for write instruction #1Z, the operation is performed where the LBA range specified by the subsequently generated write / trim request as described in (1) completely includes the LBA range specified by the issued and incomplete write instruction. On the other hand, for write instructions #1X and #1Y, the operation is performed where, in the case where the LBA range specified by the subsequently generated write / trim request as described in (2) includes a portion of the LBA range specified by the issued and incomplete write instruction, the method of correcting the issued and incomplete write instruction using (2-a) is performed.

[0444] ((2-b) Method for aborting a write command that has been issued but not yet completed)

[0445] Next, a method for aborting an issued but incomplete write command will be described. In this method, when a write request is generated that specifies an LBA range including a portion of the LBA range specified by the issued but incomplete write command, host 2 sends a write command to storage system 3 that combines the write corresponding to the write command and the write corresponding to the generated write request. Then, host 2 aborts the issued but incomplete write command. The write command that combines the write corresponding to the issued but incomplete write command and the write corresponding to the write request that specifies an LBA range including a portion of the LBA range specified by the write command is also called a combined write command.

[0446] Figure 33 This represents an example of a combined write instruction #3 issued in the event of a write request #2, which specifies an LBA range that includes a portion of the LBA range specified by a written instruction #1 that has been issued but not yet completed. Figure 33 The “A” to “B” shown indicate user data that should be written to the LBA specified by the corresponding write instruction #1. Figure 33 The “C” through “D” shown represent user data that should be written to the LBA specified by the corresponding write request #2. That is, user data A through D each represent a specific data string.

[0447] Specifically, write instruction #1 specifies the LBA range from LBA x+1 to LBA x+2. Write instruction #1 also specifies user data A and B to be written to LBA x+1 and x+2 respectively. The LBA range specified by write instruction #1 is the LBA range where the non-volatile conversion of user data A and B corresponding to write instruction #1 is not yet complete.

[0448] Write request #2 specifies the LBA range from LBA x to LBA x+1. Write request #2 also specifies that user data C and D should be written to LBA x and x+1 respectively.

[0449] The LBA range specified by write request #2 includes LBAx+1 (i.e., the sectors to be overwritten) which is part of the LBA range specified by write instruction #1, and LBA x (i.e., the sectors not to be overwritten) which is outside the LBA range specified by write instruction #1. In other words, the LBA range specified by write instruction #1 includes LBA x+1 (i.e., the sectors to be overwritten) which is part of the LBA range specified by write request #2, and LBA x+2 (i.e., the sectors not to be overwritten) which is outside the LBA range specified by write request #2.

[0450] Combined write instruction #3 is a write instruction used to combine the write corresponding to write instruction #1 and the write corresponding to write request #2. Combined write instruction #3 is generated based on the user data C, D, and B that should ultimately be written to the LBA range from LBA x to LBA x+2 after the write corresponding to write instruction #1 has been performed and the write corresponding to write request #2 has been performed. Therefore, the LBA range from LBA x to LBA x+2 is specified in combined write instruction #3. The LBA range from LBA x to LBA x+2 includes the LBA range specified by write instruction #1 and the LBA range specified by write request #2, both of which have been specified by at least one of them. Furthermore, the user data C, D, and B that should be written to LBA x, x+1, and x+2 respectively are associated with combined write instruction #3. Within the overlapping range of write instruction #1 and write request #2, the user data from the later write request #2 is written.

[0451] Figure 34 This represents another example of a combined write instruction #3 issued when a write request #2 is generated that specifies a portion of the LBA range included by the issued but not yet completed write instruction #1. Figure 34 The “A” to “E” shown indicate user data that should be written to the LBA specified by the corresponding write instruction #1. Figure 34 The “F” to “G” symbols indicate user data to be written to the LBA specified by the corresponding write request #2. That is, user data A to G represent specific data strings.

[0452] Specifically, write instruction #1 specifies the LBA range from LBA x to LBA x+4. Write instruction #1 also specifies that user data A, B, C, D, and E should be written to LBA x, x+1, x+2, x+3, and x+4 respectively. The LBA range specified by write instruction #1 is the LBA range where the non-volatile conversion of the user data A, B, C, D, and E corresponding to write instruction #1 is not yet complete.

[0453] Write request #2 specifies the LBA range from LBA x+1 to LBA x+2. Write request #2 also specifies user data F and G to be written to LBA x+1 and x+2 respectively.

[0454] The LBA range specified by write request #2 includes LBAs x+1 and x+2 (i.e., the sectors to be overwritten), which are part of the LBA range specified by write instruction #1. In other words, the LBA range specified by write instruction #1 includes the LBA ranges x+1 and x+2 specified by write request #2 (i.e., the sectors to be overwritten) and LBAs x, x+3, and x+4 (i.e., the sectors not to be overwritten), which are outside the LBA range specified by write request #2.

[0455] The combined write instruction #3 is a write instruction used to combine the write corresponding to write instruction #1 and the write corresponding to write request #2. Combined write instruction #3 is generated based on the user data A, F, G, D, and E that should ultimately be written to the LBA range from LBA x to LBA x+4 after the write corresponding to write instruction #1 has been performed and the write corresponding to write request #2 has been performed. Therefore, the LBA range from LBA x to LBA x+4 is specified in combined write instruction #3. The LBA range from LBA x to LBA x+4 includes at least one of the LBA ranges specified by write instruction #1 and LBA ranges specified by write request #2. Furthermore, the user data A, F, G, D, and E that should be written to LBA x, x+1, x+2, x+3, and x+4 respectively are associated with combined write instruction #3. Within the overlapping range of write instruction #1 and write request #2, the user data of the later write request #2 is written.

[0456] like Figure 33 and Figure 34 As shown, in the case of generating a write request #2 that specifies an LBA range including a portion of the LBA range specified by the issued but incomplete write instruction #1, the combined write instruction #3 is used to abort the write instruction #1.

[0457] Reference Figure 35 and 36 This indicates that a combined write command is issued and the action of the issued but not completed write command is aborted if the LBA range specified by the subsequently generated write request includes a portion of the LBA range specified by the issued but not completed write command.

[0458] Figure 35 This represents an example of an action corresponding to a write request that specifies a logical address range including a portion of the logical address range specified by an issued but incomplete write instruction. Figure 35 The actions shown are, for example, in reference Figure 11The aforementioned write operation is performed afterward. The issued but incomplete write instruction is referred to as the first write instruction. The write request specifying an LBA range including a portion of the LBA range specified by the first write instruction is referred to as the third write request. The user data to be written corresponding to the first write instruction is designated as first user data 711. Furthermore, the user data requested to be written via the third write request is designated as third user data 713. First user data 711 and third user data 713 are stored in data buffer 241.

[0459] First, in host 2, the IO processing unit 210 accepts the third write request from application 223 or OS 221. Figure 35 (1)). The IO receiving unit 210 sends the received third write request to the write / prune management unit 212. Figure 35 (2) in the middle.

[0460] If the write / trim management unit 212 does not receive the first completion response for the first write instruction, it waits to receive the first completion response for the first write instruction. In the storage system 3, the accepted write and trim instructions can be executed in any order independent of the acceptance order. Therefore, when multiple writes or trims are performed on one LBA, the host 2 needs to control the process so that the content corresponding to the most recently generated write or trim request is ultimately reflected in the NAND flash memory 5 of the storage system 3, according to the order in which write or trim requests are generated from application 223 or OS 221. Therefore, the instruction issuing unit 211 and the write / trim management unit 212 wait to receive the first completion response for the first write instruction and perform actions corresponding to the third write request. Furthermore, the following example illustrates the case where the first completion response for the first write instruction is normal. In the case where the first completion response for the first write instruction is abnormal, a reference is made for the third write request. Figures 11 to 18 The aforementioned write operation.

[0461] After receiving the first completion reception of a normal response to the first write instruction, the write / trimming management unit 212 determines the user data 714 (hereinafter referred to as combined user data 714) to be written in conjunction with the write instruction. Combined user data 714 is the user data to be finally written after a write corresponding to the first write instruction has been performed, and a write corresponding to the third write request has been performed.

[0462] When the PRP is used as a data pointer representing the storage location of the combined user data 714, the write / trimming management unit 212 copies a portion of the first user data 711 and the third user data 713 used as the combined user data 714 to generate the combined user data 714. The write / trimming management unit 212 stores the generated combined user data 714 in the data buffer 241.

[0463] In PRP, the location of data storage is represented by a list of physically non-contiguous pages on NVRAM 24 (i.e., a list of PRP entries). Within the group of pages shown in the list of PRP entries, the area containing data in the first page can begin midway through the page. That is, the beginning of the first page may be unsaved. In the last page, the area containing data can end midway through the page. That is, the end of the last page may be unsaved. There cannot be any unsaved data areas in the pages between the first and last pages.

[0464] Here, we consider the case where the page size of NVRAM 24 is m times the sector size in LBA units. Furthermore, m is an integer greater than 1. In this case, the area within NVRAM 24 storing a portion of first user data 711 used as combined user data 714 and third user data 713 may begin or end midway through the page. Therefore, the storage location of the portion of first user data 711 and third user data 713 used as combined user data 714 may not be represented by a list of PRP entries.

[0465] Therefore, when the PRP is used as a data pointer representing the storage location of the combined user data 714, the write / trimming management unit 212 copies a portion of the first user data 711 and the third user data used as the combined user data 714, so that the storage location of the combined user data 714 is stored in NVRAM 24 in a way that can be represented by a list of PRP entries.

[0466] The write / trim management unit 212 generates a data pointer (in this case, a list of PRP entries) representing the storage location of the combined user data 714. Then, the write / trim management unit 212 locks the combined user data 714. Figure 35 (3) in the middle. Figure 35 The example shown is where user data 714 is stored in a data buffer 241 within NVRAM 24 and locked.

[0467] Furthermore, when the SGL is used as a data pointer representing the storage location of combined user data 714, the write / prune management unit 212 may not copy a portion of the first user data 711 and the third user data 713 used as combined user data 714. The SGL is capable of representing the storage location of a portion of the first user data 711 and the third user data 713 used as combined user data 714. Therefore, the write / prune management unit 212 generates an SGL representing the storage location of a portion of the first user data 711 and the third user data 713 used as combined user data 714. Then, the write / prune management unit 212 locks the portion of the first user data 711 and the third user data 713 used as combined user data 714. Figure 35 (4)). Furthermore, the storage location of a portion of the first user data 711 used as part of the combined user data 714 is sometimes temporarily referenced by both the first write instruction and the combined write instruction. In this case, since the first user data 711 is locked when the first write instruction is issued, the write / trimming management unit 212 increments the reference counter for the portion of the first user data 711 used as part of the combined user data 714. The reference counter represents the number of instructions referencing the corresponding specific unit of data. When a new instruction to reference a certain data is issued, the reference counter corresponding to that data is incremented. When the processing corresponding to the instruction to reference a certain data is completed, the reference counter corresponding to that data is decremented. When the decremented reference counter becomes 0, the write / trimming management unit 212 unlocks the corresponding data.

[0468] After locking the combined user data 714 when using PRP, or after locking a portion of the first user data 711 and the third user data 713 used as the combined user data 714 when using SGL, the write / trimming management unit 212 entrusts the instruction issuing unit 211 to issue a write instruction (combined write instruction) for writing the combined user data 714. Figure 35 (5)). The instruction issuing unit 211 issues a combined write instruction in response to the request made by the write / trim management unit 212. That is, the instruction issuing unit 211 generates SQ entry information corresponding to the combined write instruction used to write combined user data 714. The combined write instruction specifies an LBA range that includes the LBA range specified by the first write instruction and the LBA range specified by the third write request. The instruction issuing unit 211 sends the generated SQ entry information to the write / trim management unit 212 ( Figure 35 (6) in the middle.

[0469] The write / trim management unit 212 uses the SQ entry information sent by the instruction issuing unit 211 to generate an entry for the locked data list 245. This generated entry is referred to as the fourth entry. The fourth entry, for example, includes SQ entry information corresponding to the issued write instruction and data area management information. This data area management information is information that can determine the storage area within the data buffer 241 where the combined user data 714 is stored. The write / trim management unit 212 appends the fourth entry to the locked data list 245. Figure 35 (7) in the middle.

[0470] Then, the instruction issuing unit 211 saves the issued combined write instruction (SQ entry information) in the commit queue 242. Figure 35 (8) in the middle.

[0471] The actions in memory system 3 corresponding to the subsequent write instructions ( Figure 35 (9) to (13) in the reference Figure 11 The actions in the aforementioned storage system 3 ( Figure 11 (8) to (12) are the same.

[0472] Next, the instruction issuing unit 211 of host 2 retrieves the first completion (or completion) for the combined write instruction from the completion queue 243. Figure 35 (14)). Then, the instruction issuing unit 211 sends the obtained first completion to the write / prune management unit 212 ( Figure 35 (15) in the middle.

[0473] If the first completion indicates a normal end, the write / prune management unit 212 updates the fourth entry corresponding to the combined write command in the locked data list 245. Figure 35 (16)). Specifically, the write / trimming management unit 212 appends the assigned sequence number (i.e., information indicating the receiving order of the first completion) and information indicating that the first completion has been received to the fourth entry. The write / trimming management unit 212 notifies the IO receiving unit 210 of the completion of the write (normal termination). Figure 35 (17)). Then, the IO receiving unit 210 notifies the application 223 or OS 221 that the write is complete. Figure 35 (18) in the middle.

[0474] In the event that the first completion indicates an abnormal termination, the write / prune management unit 212 releases the lock on the user data 714. Figure 35 (19) in the middle, or unlock the first user data 711 used as part of the combination of user data 714 and third user data 713. Figure 35(20)). Then, the write / trimming management department 212 deletes the fourth entry from the locked data list 245 ( Figure 35 (21)). More specifically, the write / trimming management unit 212 uses the data area management information within the fourth entry to unlock the combined user data 714. Alternatively, the write / trimming management unit 212 can decrement the reference counter used as part of the first user data 711 used as combined user data 714 to unlock the third user data 713. In addition, if the write / trimming management unit 212 has created a list of PRP entries or a second or subsequent segment of SGL, it also releases the area of ​​the pointer list 244 that stores them. Then, the write / trimming management unit 212 deletes the fourth entry from the locked data list 245. In addition, the write / trimming management unit 212 notifies the IO receiving unit 210 of the abnormal termination ( Figure 35 (22)). Then, the IO handling unit 210 notifies the application 223 or OS 221 of the abnormal termination ( Figure 35 (23)

[0475] If the first completion of the combined write instruction is a normal response, information processing system 1 performs an action to abort the first write instruction (abnormal termination action). This abnormal termination action is related to the reference... Figure 22 The aforementioned abnormal termination action is the same. Furthermore, in Figure 22 In the abnormal termination action shown, if the first write instruction is successfully aborted, the lock on the first user data 711 that should have been written corresponding to the first write instruction is released. Figure 22 (9)). In contrast, in the method using combined write instructions, a portion of the first user data 711 is sometimes referenced not only by the first write instruction but also by the combined write instruction. In this case, corresponding to the successful abort of the first write instruction, the write / trimming management unit 212 unlocks the portion of the first user data 711 that is not referenced by the combined write instruction and decrements the reference counter of the portion referenced by the combined write instruction. Furthermore, in the case where combined user data 714 is generated by copying a portion of the first user data 711, corresponding to the successful abort of the first write instruction, the write / trimming management unit 212 unlocks the entire first user data 711.

[0476] Figure 36 This example illustrates the lock data list 245 updated during an abnormal termination action, assuming a normal response to the first completion of a combined write instruction. The lock data list 245 contains entry 81 corresponding to the first write instruction and entry 84 corresponding to the combined write instruction.

[0477] Item 81 and Figure 17Similarly, entry 81 shown indicates that the first completion of the first write instruction has been received. Entry 81 is deleted upon receiving a completion indicating that the abnormal termination of the first write instruction was successful from the storage system 3.

[0478] Entry 84 contains SQ entry information "sqentry_info4", completion order "cseq4", data region management information "region_info4", and completion status "completed". Entry 84 indicates that the first completion for the combined write command has been received.

[0479] Through the above write and abnormal termination actions, if the LBA range specified by the subsequently generated third write request includes a portion of the LBA range specified by the first write instruction that has been issued but not yet completed, the write corresponding to the first write instruction in the storage system 3 can be aborted.

[0480] Specifically, host 2 sends a combined write instruction, which combines the first write instruction and the third write request, to storage system 3. If host 2 receives a first completion indication from storage system 3 indicating normal termination for the combined write instruction, host 2 sends an abnormal termination instruction to storage system 3 to abort the first write instruction.

[0481] Storage system 3 receives an abnormal termination command from host 2. If the write operation corresponding to the first write command has not yet started, the first write command is aborted. Then, storage system 3 returns a completion message indicating successful abnormal termination of the first write command to host 2. Based on the completion message indicating successful abnormal termination, host 2 removes the entry corresponding to the first write command from the locked data list 245.

[0482] Therefore, in storage system 3, the write to NAND flash memory 5 corresponding to the first write instruction is aborted. That is, no write is performed to the LBA range covered by the third write request. As a result, wear and tear on NAND flash memory 5 can be reduced.

[0483] In addition, storage system 3 has a security function: after receiving the first write command, if the LBA range that was not overwritten becomes write-prohibited due to the third write request, host 2 will not issue a combined write command. Alternatively, after receiving an error from storage system 3, host 2 will refer to the third write request. Figures 11 to 18 The aforementioned write operation.

[0484] (Recovery action)

[0485] Next, the recovery action in information processing system 1 will be explained. The recovery action is as follows: using data stored in NVRAM 24, the write of user data to storage system 3 that was not completed due to an abnormal termination or unintentional restart of one or both of the host 2 and storage system 3. Here, abnormal termination means that one or both of the host 2 and storage system 3 terminated their operation before the write of user data corresponding to all write commands received by storage system 3 was completed. Unintentional restart means that one or both of the host 2 and storage system 3 restarted without completing the shutdown process.

[0486] Figure 37 This example illustrates a recovery action in information processing system 1. Here, it is assumed that one or both of host 2 and storage system 3 experienced an abnormal termination or unintentional restart just before the scheduled startup. Specifically, this could be a case where host 2 operates normally while only storage system 3 experiences an abnormal termination or restart, storage system 3 operates normally while only host 2 experiences an abnormal termination or restart, or both host 2 and storage system 3 experience abnormal termination or restarts. First, if either host 2 or storage system 3 is experiencing an abnormal termination, the operator, for example, manually restarts it. Then, the instruction issuing unit 211 of host 2 resets storage system 3. At this point, while host 2 continues to operate normally, the instruction issuing unit 211 discards the submission queue 242 and the completion queue 243 and creates new ones. That is, it creates empty queues.

[0487] Furthermore, suppose there is a situation where user data is written to storage system 3 that cannot be completed due to abnormal termination or unintentional restart. That is, suppose the locked data list 245 contains an entry indicating that the first completion write instruction has been received.

[0488] First, the I / O handling unit 210 of host 2 interrupts the acceptance and processing of new I / O requests from application 223 or OS 221. That is, even if the I / O handling unit 210 accepts a new I / O request, it does not begin processing the new I / O request. The recovery control unit 213 of host 2 changes the lock data list 245 associated with storage system 3 in a manner that excludes duplicate writes to one LBA. Figure 37(1)). Specifically, the recovery control unit 213 sequentially determines one or more entries from the beginning of the lock data list 245 that indicate the first completion of the operation. The recovery control unit 213 uses the determined one or more entries to modify or delete entries corresponding to previously issued write commands, such that if at least a portion of the LBA range specified by the previously issued write command overlaps with the LBA range specified by a subsequently issued write command or trim command, no write to the overlapping portion is performed. Thus, when requesting a write or trim based on the lock data list 245 again from the storage system 3, it is possible to avoid overwriting a certain LBA or writing to a later-trimmed LBA. Therefore, wear and tear on the NAND flash memory 5 of the storage system 3 can be reduced. The lock data list 245 containing entries modified in a way that excludes writes to overlapping LBAs is also called the lock data list 245 after deduplication.

[0489] After obtaining the locked data list 245 after eliminating duplicates, the recovery control unit 213 sequentially determines the n entries representing the first completion received, starting from the beginning of the locked data list 245. Figure 37 (2)). n is an integer greater than or equal to 1.

[0490] The recovery control unit 213 selects one of the n determined entries from the locked data list 245. Since duplication has been eliminated at this point in time, the recovery control unit 213 can process the entries in any order, without having to select them sequentially from the beginning. Hereinafter, the selected entry will also be referred to as the object entry. Figure 37 In the subsequent actions shown, the n entries are used as object entries one by one in sequence from the beginning.

[0491] Recovery control unit 213 uses the data area management information contained in the object entry to lock the user data 71 or range information 72 in the corresponding data buffer 241. Figure 37 (3)). Then, the recovery control unit 213 uses the SQ entry information contained in the object entry to request the instruction issuing unit 211 to issue the corresponding write instruction or issue the corresponding trim instruction. Figure 37 (4) in the middle.

[0492] Furthermore, if host 2 restarts, recovery control unit 213 deletes the entry in lock data list 245 that indicates the first completion was not received. This is because the application 223, etc., that requested the entry no longer exists, and a completion notification cannot be sent from recovery control unit 213. An entry indicating the first completion was not received is, for example, an entry that does not include completion order and completion status. Since recovery control unit 213 did not receive the first completion, it determines that the write command or trim command corresponding to that entry was not processed by storage system 3. Additionally, since the first completion was not received, application 223, etc., which requested the write or trim command corresponding to that entry, terminates without notifying the application 223, etc., of the completion of the write or trim command. Therefore, it is not necessary to send the write command or trim command corresponding to the entry indicating the first completion was not received to storage system 3 again. Therefore, recovery control unit 213 deletes the entry indicating the first completion was not received from lock data list 245.

[0493] The instruction issuing unit 211, in response to a request from the recovery control unit 213 to issue either a write instruction or a trim instruction, stores the write instruction or trim instruction corresponding to the SQ entry information within the object entry in the submission queue 242. Figure 37 (5) in the middle.

[0494] Then, the recovery control unit 213 deletes the completion order and completion status in the object entries. Figure 37 (6)). Thus, the object entry indicates that the corresponding write or trim command was issued (sent) to storage system 3 and is in a state where the first completion has not been received.

[0495] The future Figure 37 Actions (7) to (11) in the reference, when the object entry corresponds to a write instruction, are the same as those in the reference. Figure 11 The actions (8) to (12) of the aforementioned write operation are the same. Furthermore, when the object entry corresponds to a trim command, Figure 37 The actions in (7) to (11) are replaced with references. Figure 24 The aforementioned trimming actions (8) to (11) involve the instruction receiving unit 121 and the write / trim control unit 122 of the storage system 3 receiving write or trimming instructions from the submission queue 242 and storing the first completion in the completion queue 243.

[0496] Then, the instruction issuing unit 211 of host 2 retrieves the first completion for the write instruction or trim instruction from the completion queue 243. Figure 37 (12)). The instruction issuing unit 211 sends the first completion result to the recovery control unit 213. Figure 37 (13) in the middle.

[0497] The recovery control unit 213 receives the first completion from the instruction issuing unit 211 and updates the entry corresponding to the received first completion in the locked data list 245. Figure 37 (14)). Specifically, the recovery control unit 213 appends a sequence number indicating the order in which completions are received and information indicating that the first completion has been received to the entry corresponding to the first completion received.

[0498] Through the above Figure 37 In the recovery action shown, host 2 modifies the locked data list 245 to exclude duplicate writes to one LBA and exclude pruned writes. Then, host 2 can use n entries, each representing the first completion received, to resend the write command requesting the write of the corresponding user data 71, or the pruning command requesting the release of the LBA range allocation based on the corresponding range information 72, to storage system 3. Therefore, it is possible to reproduce the sending of write commands or pruning commands that were not completed due to abnormal termination or unintentional restart of one or both of host 2 and storage system 3, considering the order of requests from application 223 or OS 221.

[0499] In storage system 3, actions corresponding to the sent write or prune commands are performed. In the write operation corresponding to the sent write command, duplicate writes to one LBA are excluded.

[0500] The recovery control unit 213 and instruction issuance unit 211 of host 2 send a special refresh instruction to storage system 3, and after receiving the second completion notification for all write and pruning instructions sent from host 2 to storage system 3, they begin processing new I / O requests from application 223 or OS 221. The special refresh instruction completes the first completion notification for write or pruning instructions that have already received a normal completion notification. Alternatively, the recovery control unit 213 and instruction issuance unit 211 may also begin processing new I / O requests from application 223 or OS 221 after receiving the first completion notification for all write and pruning instructions sent from host 2 to storage system 3. The new I / O request is a new data read request or data write request for storage system 3. That is, the instruction issuance unit 211 of host 2 may issue a new read or write instruction to storage system 3 corresponding to the received new I / O request.

[0501] Through the above recovery actions, the writing of user data that could not be completed due to abnormal termination or unintentional restart of one or both of the host 2 and storage system 3, as well as the release of LBA range allocation, can be completed. In other words, host 2 can use the locked data list 245, which manages the processing status of write and trim commands issued by the management system, to recover any incomplete writes and trims to storage system 3. Then, the instruction issuing unit 211 of host 2 can begin processing new I / O requests received from application 223 or OS 221 via the I / O receiving unit 210.

[0502] Furthermore, in any of the aforementioned tasks, operations managing the writing or pruning of data to storage system 3 need to be performed atomically, ensuring that no data mismatch occurs even if processing stops at any point in time due to an abnormal power outage, OS 221 crash, or other reasons. That is, the operations associated with managing the writing or pruning of data to storage system 3 need to be performed in a manner that prevents them from ending prematurely. Therefore, this operation utilizes, for example, instructions that guarantee atomicity and algorithms that can return to a consolidated state even if the atomic operation is not completed. Operations requiring atomicity include modifying entries in the locked data list 245, appending entries to the locked data list 245, deleting entries from the locked data list 245, generating correction instruction data 246, and deleting correction instruction data 246.

[0503] Furthermore, each entry in the locked data list 245 includes a completion order. However, as described above, when the aforementioned write action, abnormal termination action, and correction action are applied to all write requests and pruning requests from application 223 or OS 221, during the recovery action, a single LBA will not be written repeatedly, and pruning will not be performed after a single LBA has been written. Therefore, a completion order field may not be set in each entry of the locked data list 245. Additionally, in the storage system 3, the processing order of instructions issued during the recovery action may not be guaranteed. However, in the locked data list 245, corresponding entries are appended in the order in which write requests and pruning requests are received from application 223 or OS 221. As described above, in the case of duplicate preceding instructions, the next instruction must be issued after the first completion of the preceding instruction is received.

[0504] Furthermore, in a speed-priority mode where the aforementioned write actions, abnormal termination actions, and correction actions are not applied (e.g., only a portion of write requests and pruning requests from application 223 or OS 221 are subject to these actions), the completion order must be included in the entries of the locked data list 245.

[0505] Next, refer to Figures 38 to 54 The flowchart illustrates the processes performed in host 2 and storage system 3.

[0506] (Write request control processing in host 2)

[0507] Figure 38 This is a flowchart illustrating an example of the steps of a write request control process executed by the CPU 21 of host 2. This write request control process controls the writing to the NAND flash memory 5 of storage system 3, corresponding to whether there is overlap within a specified LBA range between a new write request generated by application 223 or OS 221 and an issued but incomplete write instruction. This write request control process performs the following actions: (1) the aforementioned action when the LBA range specified by the subsequently generated write / trim request completely includes the LBA range specified by the issued but incomplete write instruction; and (2) the action of using (2-a) to correct the issued but incomplete write instruction when the LBA range specified by the subsequently generated write / trim request includes a portion of the LBA range specified by the issued but incomplete write instruction. The CPU 21 executes the write request control process when a new write request is generated by application 223 or OS 221.

[0508] First, the CPU 21 determines whether the lock data list 245 contains an entry indicating a write instruction (repeated write instruction) that specifies an LBA range that at least partially overlaps with the LBA range specified by the current write request (step S101). Specifically, the CPU 21 determines whether the LBA range based on the SQ entry information contained in each entry of the lock data list 245 overlaps with the LBA range specified by the current write request.

[0509] If no duplicate write instruction entry exists in the locked data list 245 (No in step S101), the CPU 21 executes write request processing based on the current write request (step S102) and terminates the write request control processing. The write request processing is the process by which the host 2 requests the storage system 3 to write user data. In the write request processing, the CPU 21 issues a write instruction to write the specified user data into the LBA range specified by the current write request. Furthermore, since no duplicate write instruction entry exists in the locked data list 245, the CPU 21 does not perform processing to abort or correct the write instruction represented by the locked data list 245. For the specific steps of the write request processing, please refer to... Figure 39 The flowchart will be described later.

[0510] If an entry for a duplicate write instruction exists in the locked data list 245 (Yes in step S101), the CPU 21 determines whether the first completion of all duplicate write instructions has been received (step S103). The CPU 21 determines this by checking whether the completion status of each entry indicates that the first completion has been received or that the entry has been deleted because the first completion ended abnormally. If at least one first completion for a duplicate write instruction has not been received (No in step S103), the CPU 21 returns to step S103. That is, the CPU 21 waits until the first completion of all duplicate write instructions has been received.

[0511] If all first-time completions for repeated write instructions have been received (Yes in step S103), CPU 21 confirms that at least one completion was a normal response, i.e., confirms that there are still entries for repeated write instructions remaining in the lock data list 245 (step S104). The entries corresponding to the repeated write instructions whose first completions were abnormal responses are deleted from the lock data list 245. Therefore, after receiving all first-time completions for repeated write instructions, CPU 21 determines whether there are still entries for repeated write instructions remaining in the lock data list 245.

[0512] If no duplicate write instruction entry remains (No in step S104), that is, if an exception occurs during the processing of duplicate write instructions in the storage system 3 and no duplicate write instruction entry exists in the lock data list 245, the CPU 21 performs write request processing based on the current write request (step S102) and terminates the write request control processing. The CPU 21 does not perform processing to abort or correct the write instruction represented by the lock data list 245.

[0513] If there are entries with duplicate write instructions remaining (Yes in step S104), CPU 21 executes write request processing based on the current write request (step S105). In the locked data list 245, the LBA range specified by the write instruction of a previous entry may be modified or invalidated by the write instruction or trimming instruction of a subsequent entry. On the other hand, the LBA range specified by the write instruction of a subsequent entry cannot be modified or invalidated by the write instruction or trimming instruction of a previous entry. Therefore, in this embodiment, sequence numbering is not necessary. Furthermore, sequence numbering is required when duplicate elimination between the LBA range specified by the previous write instruction and the LBA range specified by the subsequent write instruction or trimming instruction is not performed. Hereinafter, the write instruction issued in the write request processing of step S105 will be referred to as the object write instruction.

[0514] CPU 21 determines whether it has received the first completion of the write instruction for the object (step S106). If it has not received the first completion of the write instruction for the object (no in step S106), CPU 21 returns to step S106. That is, CPU 21 waits until it receives the first completion of the write instruction for the object.

[0515] If the first completion of a write instruction for an object is received (Yes in step S106), the CPU 21 determines whether the first completion of the write instruction for the object is a normal response (step S107). If the first completion of the write instruction for the object is an abnormal response (No in step S107), the CPU 21 terminates the write request control process. That is, because an abnormal situation occurred in the processing of the write instruction for the object in the storage system 3, the CPU 21 does not perform the processing to abort or correct the duplicate write instruction represented by the lock data list 245.

[0516] If the first completion of the write instruction for the object is a normal response (Yes in step S107), the CPU 21 determines whether the LBA range specified by the write instruction for the object (i.e., the current write request) includes the entire LBA range specified by a single write instruction (step S108). If the LBA range specified by the write instruction for the object includes the entire LBA range specified by a single write instruction (Yes in step S108), the CPU 21 issues an abnormal termination instruction for the write instruction (step S109). The abnormal termination instruction contains information that can identify the write instruction to be aborted (e.g., instruction ID). Then, the CPU 21 stores the issued abnormal termination instruction (i.e., SQ entry information indicating the abnormal termination instruction) in the commit queue 242 (step S110). Thus, the CPU 21 can request the storage system 3 to abort the writing of user data corresponding to the write instruction.

[0517] If the LBA range specified by the object write instruction only includes a portion of the LBA range specified by a single repeat write instruction (No in step S108), the CPU 21 issues a correction instruction for the repeat write instruction (step S111). The correction instruction includes information that can identify the repeat write instruction as the object of correction, and information indicating the LBA range within the LBA range specified by the repeat write instruction that should be canceled. Then, the CPU 21 stores the issued correction instruction (i.e., the SQ entry information indicating the correction instruction) in the commit queue 242 (step S112). Thus, the CPU 21 is able to request the storage system 3 to cancel a portion of the user data write corresponding to the repeat write instruction.

[0518] Next, CPU 21 uses the locked data list 245 to determine whether there are other duplicate write instructions (step S113). If there are other duplicate write instructions (yes in step S113), CPU 21 returns to step S108. Then, either an abnormal termination instruction or a correction instruction is issued to the other duplicate write instruction.

[0519] If there are no other duplicate write instructions (in step S113, no), CPU 21 ends the write request control process.

[0520] Through the above write request control processing, when a new write request is generated by application 223 or OS 221, if there is an incomplete write instruction (repeated write instruction) that specifies an LBA range that overlaps with the LBA range specified by the new write request, the CPU 21 can request the storage system 3 to abort or correct the repeated write instruction.

[0521] Specifically, CPU 21 uses lock data list 245 to determine if a duplicate write instruction exists. If a duplicate write instruction exists, CPU 21 uses lock data list 245 to determine whether the LBA range specified by the new write request includes the entire LBA range specified by the duplicate write instruction, or only a portion thereof. If the LBA range specified by the new write request includes the entire LBA range specified by the duplicate write instruction, CPU 21 requests the memory system 3 to abort the duplicate write instruction. If the LBA range specified by the new write request includes only a portion of the LBA range specified by the duplicate write instruction, CPU 21 requests the memory system 3 to correct the duplicate write instruction.

[0522] Therefore, in the event of a new write request that overlaps with a repeat write instruction within the LBA range, the CPU 21 can request the storage system 3 to abort the write corresponding to the repeat write instruction, or cancel a portion of the write.

[0523] (Processing for writing user data to storage system 3 in host 2)

[0524] Figure 39 This is a flowchart illustrating an example of the steps involved in a write request processing performed by CPU 21 of host 2. Write request processing is the process by which host 2 requests the writing of user data to storage system 3. The write request processing is respectively equivalent to referring to... Figure 38 The aforementioned steps S102 and S105 of the write request control processing.

[0525] First, CPU 21 obtains the location of the storage area containing the user data to be written to NAND flash memory 5 from the data buffer 241 (step S201). Alternatively, if the user data to be written to NAND flash memory 5 is stored in RAM 22, CPU 21 copies the user data to the data buffer 241. Then, CPU 21 obtains the location of the storage area for the copy destination. Next, CPU 21 locks and disables writing to the user data stored in data buffer 241 (step S202). More specifically, CPU 21 uses the functions of the executed OS 221 to lock and disable writing to the storage area (e.g., a page) that is the storage area containing user data and is accessible to driver 222. This prevents the storage area containing user data from being unintentionally released or overwritten. That is, after CPU 21 notifies application 223 or OS 221 of the completion of the write request upon receiving the first completion notification, it can detect if the storage area containing user data is about to be overwritten.

[0526] CPU 21 issues a write instruction (hereinafter referred to as the first write instruction) to write user data stored in data buffer 241 to NAND flash memory 5 (step S203). More specifically, CPU 21 stores the SQ entry information of the first write instruction in the commit queue 242 and writes the value of the SQ Tail pointer to the SQ Tail doorbell register of the storage system 3.

[0527] Next, CPU 21 appends the entry corresponding to the first write instruction to the locked data list 245 (step S204). The appended entry includes, for example, SQ entry information corresponding to the first write instruction and data area management information. The SQ entry information corresponding to the first write instruction is information representing the first write instruction. More specifically, the SQ entry information corresponding to the first write instruction is information stored in the commit queue 242 to enable the storage system 3 to perform the processing corresponding to the first write instruction. Additionally, the data area management information corresponding to the first write instruction is information that can determine the storage area within the data buffer 241 containing the user data corresponding to the first write instruction. While the SQ entry information also contains information for determining the storage area within the data buffer 241, since this information is described using physical addresses, it is preferable that the data area management information is described using logical addresses.

[0528] Alternatively, CPU 21 may execute step S204, which appends the entry corresponding to the first write instruction to the locked data list 245, before step S203, which saves the first write instruction to the commit queue 242. Furthermore, CPU 21 may execute steps S203 and S204 in parallel.

[0529] Through the above write request processing, CPU 21 can request the memory system 3 to write user data stored in data buffer 241. In addition, CPU 21 can use lock data list 245 to manage information related to the write request to memory system 3 (i.e., information related to the issued write instruction).

[0530] (Used for processing user data writes in storage system 3)

[0531] Figure 40 This is a flowchart illustrating an example of the steps of write control processing performed by the CPU 12 of the storage system 3. Write control processing is a process that controls the writing of user data corresponding to a write instruction issued by the host 2. The CPU 12 executes the write control processing corresponding to the write instruction issued by the host 2, which is retrieved from the submission queue 242. Here, the write instruction retrieved from the submission queue 242 is referred to as the first object write instruction.

[0532] First, CPU 12 updates the write management table 63 based on the first object write instruction (step S301). Specifically, CPU 12 obtains, for example, instruction ID, LBA, data length, and data pointer from the first object write instruction. CPU 12 appends entries representing the obtained instruction ID, LBA, data length, and data pointer to the write management table 63.

[0533] Then, CPU 12 notifies host 2 of the first completion of the write instruction for the first object (step S302). More specifically, CPU 12 stores the first completion in completion queue 243 and notifies host 2 of an interrupt. Alternatively, CPU 12 may notify host 2 of an interrupt after storing multiple completions in completion queue 243. The first completion of the write instruction for the first object includes the instruction ID of the write instruction for the first object.

[0534] Next, CPU 12 determines whether writing user data can begin (step S303). More specifically, for example, CPU 12 begins writing user data when the total amount of unwritten user data from more than one write instruction that returned the first completion is reduced by the amount canceled by correction instructions, reaching the write unit. CPU 12 uses write management table 63 and correction instruction data 64 to calculate the total amount of unwritten user data after removing the amount canceled by correction instructions. That is, CPU 12 calculates the data amount obtained by subtracting the amount of user data corresponding to the LBA range that was canceled by correction instructions from the total amount of unwritten user data stored in host 2's data buffer 241.

[0535] Furthermore, to eliminate duplicate writes caused by prior write instructions and first object instructions, if an abnormal termination instruction or correction instruction for a prior write instruction is scheduled to be sent after the first object write instruction, a flag indicating that the sending is scheduled can be appended to the first object write instruction. If multiple abnormal termination instructions or correction instructions are sent, a flag indicating that an abnormal termination instruction or correction instruction is scheduled to be sent can be further appended to these instructions. Therefore, even if the total amount of user data corresponding to the first object write instruction that has been received but not written reaches the write unit, the CPU 12 can wait for subsequent abnormal termination instructions or correction instructions without initiating writing to the NAND flash memory 5. This avoids failure of abnormal termination instructions or correction instructions. Furthermore, if the total amount of user data that has not been written due to the execution of abnormal termination instructions or correction instructions has not reached the write unit, writing of the unwritten user data can be prevented.

[0536] If the total amount of unwritten user data, excluding the amount canceled, does not reach the write unit (No in step S303), CPU 12 ends the write control process.

[0537] When the total amount of unwritten user data, excluding the cancelled amount, reaches the write unit (Yes in step S303), CPU 12 forwards the write unit of user data from the data buffer 241 of host 2 to the NAND flash memory 5 of storage system 3 (step S304). CPU 12 writes the forwarded user data to NAND flash memory 5 (step S305). Next, CPU 12 updates the logical physical address translation table 62 to indicate the correspondence between the physical address and LBA of the written user data (step S306).

[0538] Next, CPU 12 determines whether there is a corresponding write instruction that can be read from NAND flash memory 5 (step S307). If there is no corresponding write instruction that can be read (no in step S307), the processing of CPU 12 ends. That is, since it is not yet possible to notify host 2 of the second completion indicating that the writing of user data corresponding to the write instruction has been completed, the processing of CPU 12 ends.

[0539] If there are more than one corresponding write instruction that has been written and become readable in step S305 (Yes in step S307), the CPU 12 notifies the host 2 of more than one second completion for the more than one write instruction (step S308). Hereinafter, the write instruction for which the corresponding user data has been written is referred to as the second object write instruction. The second completion for the second object write instruction includes the instruction ID of the second object write instruction. Then, the CPU 12 updates the write management table 63 (step S309). Specifically, the CPU 12 deletes the entry corresponding to the second object write instruction from the write management table 63. In addition, if there is correction instruction data 64 associated with the entry corresponding to the second object write instruction, the CPU 12 also deletes the correction instruction data 64. Then, the CPU 12 updates the instruction log 51 to append the instruction ID of the second object write instruction (step S310) and ends the write control process.

[0540] Through the above write control processing, CPU 12 can manage write commands received from host 2 and control the writing of user data corresponding to the accepted write commands. Specifically, when CPU 12 receives a write command from host 2, it updates the write management table 63 based on the write command and returns the first completion to host 2. Furthermore, if CPU 12 has the user data for the write unit stored in data buffer 241 (excluding user data canceled according to correction commands), it writes the user data for that write unit to NAND flash memory 5. Then, CPU 12 returns a second completion to host 2 for the write command corresponding to the completed user data.

[0541] Therefore, CPU 12 can notify host 2 of the processing status of the write instruction by returning the first completion and the second completion. In addition, CPU 12 can efficiently utilize the storage area of ​​NAND flash memory 5 by writing based on delayed write completion.

[0542] Furthermore, the CPU 12 can write the user data band corresponding to the accepted write instruction to the NAND flash memory 5 not only when the total amount of unwritten user data, after removing the amount canceled corresponding to the correction instruction, reaches the write unit (Yes in step S303), but also when the time elapsed since accepting the write instruction exceeds a threshold. Specifically, when the time elapsed since accepting the write instruction exceeds the threshold, the CPU 12 forwards the user data, after removing the amount canceled corresponding to the correction instruction, from the host 2's data buffer 241 to the NAND flash memory 5, corresponding to the accepted write instruction. Then, the CPU 12 writes the forwarded user data band to the NAND flash memory 5. That is, the CPU 12 performs the following when the time elapsed since accepting the write instruction exceeds the threshold: Figure 40 The process following step S304 of the write control processing. In this case, the user data of the write unit in step S304 is replaced with data for padding added to the user data corresponding to the accepted write instruction. Thus, the CPU 12 can notify the host 2 of the second completion of the write instruction within the expected time.

[0543] Furthermore, if the time elapsed since the CPU 12 performed a delete operation on the NAND flash memory 5 exceeds a threshold, similarly to the above, user data can be written to the end of the block. Therefore, the quality of the user data written to the block can be maintained.

[0544] Furthermore, upon receiving a special refresh instruction, CPU 12 can fill and write the user data bands corresponding to all accepted write instructions into NAND flash memory 5, thus completing these write instructions. That is, upon receiving a special refresh instruction, CPU 12 can perform... Figure 40 The steps following step S304 of the write control processing. In this case, the user data of the write unit in step S304 is replaced with data for padding added to the user data corresponding to the accepted write instruction.

[0545] (Used to abort the processing of repeated write instructions in memory system 3)

[0546] Figure 41 This is a flowchart illustrating an example of the steps involved in the abnormal termination control processing performed by the CPU 12 of the storage system 3. The abnormal termination control processing is based on the processing of an abnormal termination instruction received from the host 2. The CPU 12 executes the abnormal termination control processing in response to the case where an abnormal termination instruction issued by the host 2 is received from the submission queue 242. Here, the case where the object of abort based on the abnormal termination instruction is a duplicate write instruction is illustrated.

[0547] First, CPU 12 obtains the instruction ID specified by the abnormal termination instruction (step S401). The obtained instruction ID is the instruction ID of the repeated write instruction that should be aborted corresponding to the abnormal termination instruction. CPU 12 determines whether there is an entry containing the obtained instruction ID in the write management table 63 (step S402).

[0548] If there is no entry containing the acquired instruction ID in the write management table 63 (No in step S402), since there is no duplicate write instruction, the CPU 12 notifies the host 2 that the abnormal termination failure has been completed (step S403), and ends the abnormal termination control process.

[0549] If an entry containing the acquired instruction ID exists in the write management table 63 (Yes in step S402), the CPU 12 determines whether the write process corresponding to the repeated write instruction has started (step S404). For example, when referring to... Figure 40 If step S305 of the aforementioned write control process has been performed or completed based on one or more write instructions that include a repeat write instruction as the abort target, the CPU 12 determines that the write process corresponding to the repeat write instruction has started. In other words, the CPU 12 determines whether the write to the NAND flash memory 5 has started or completed.

[0550] If the write process corresponding to the repeat write instruction has started (Yes in step S404), the CPU 12, unable to abort the write process corresponding to the repeat write instruction, sends a completion notification indicating abnormal termination failure to the host 2 (step S403) and ends the abnormal termination control process.

[0551] If the write process corresponding to the repetitive write instruction has not started (No in step S404), CPU 12 deletes the entry corresponding to the repetitive write instruction (i.e., the entry containing the acquired instruction ID) from the write management table 63 (step S405). CPU 12 then forwards the user data corresponding to the repetitive write instruction from the data buffer 241. Figure 40 If step S304 has already started, the forwarding is stopped. If the forwarding has ended, the CPU 12 also does not perform any writes to the NAND flash memory 5. Figure 40 (Step S305). Thus, CPU 12 is able to abort the writing of user data corresponding to the repetitive write instruction. Then, CPU 12 notifies host 2 of the successful completion of the abnormal termination (step S406). Furthermore, CPU 12 notifies host 2 of the completion of the termination of the repetitive write instruction (step S407) and ends the abnormal termination control process.

[0552] Furthermore, from the time the CPU 12 finds the entry in the write management table 63 containing the acquired instruction ID (step S402) until it deletes the entry (step S405), it does not begin the write process of user data corresponding to the repeated write instruction to the NAND flash memory 5. That is, if an abnormal termination instruction is received between steps S304 and S305, the CPU 12 stops the write control process until the abnormal termination instruction is completed. Since the total amount of unwritten user data after removing the canceled amount still reaches the write unit, the CPU 12 returns to step 303 to start the write control process again after the abnormal termination instruction is completed. In addition, if a flag indicating that the aforementioned abnormal termination instruction or correction instruction is scheduled to be sent after the write instruction is used, the abnormal termination process is completed before the determination in step S303. Therefore, in this case, after the total amount of unwritten user data after removing the canceled amount reaches the write unit (yes in step S303), the total amount of user data does not change, and the CPU 12 does not need to recalculate the total amount of user data.

[0553] In addition, if the write process has been completed for a period of time exceeding the threshold, or if the process is stopped before step S305 due to receiving an abnormal termination instruction for a repeated write instruction during the implementation of a refresh instruction, the CPU 12 restarts the process that was initially stopped.

[0554] Through the above abnormal termination control process, if the CPU 12 can suspend the writing of user data corresponding to the repeated write instruction if the write process corresponding to the repeated write instruction has not yet started when the abnormal termination instruction is received by the host 2.

[0555] (Used to correct the handling of duplicate write instructions in memory system 3)

[0556] Figure 42 This is a flowchart illustrating an example of the steps of a correction control process executed by the CPU 12 of the storage system 3. The correction control process is based on the processing of correction instructions received from the host 2. The CPU 12 executes the correction control process corresponding to the correction instruction issued by the host 2, which is received from the submission queue 242.

[0557] First, CPU 12 obtains the instruction ID specified by the correction instruction (step S501). The obtained instruction ID is the instruction ID of the write instruction (i.e., the repeat write instruction) that should be corrected corresponding to the correction instruction. CPU 12 determines whether there is an entry containing the obtained instruction ID in the write management table 63 (step S502). The entry containing the obtained instruction ID is also called the correction object entry.

[0558] If no correction object entry exists in the write management table 63 (No in step S502), since there is no duplicate write instruction, the CPU 12 will notify the host 2 of the completion indicating that the correction has failed (step S503) and end the correction control process.

[0559] If a correction object entry exists in the write management table 63 (Yes in step S502), the CPU 12 determines whether the write process corresponding to the repeat write instruction has started (step S504). For example, when referring to... Figure 40 If step S305 of the aforementioned write control processing has been performed or completed based on one or more write instructions that include a repeat write instruction as the correction target, the CPU 12 determines that the write processing corresponding to the repeat write instruction has started. In other words, the CPU 12 determines this by whether the write to the NAND flash memory 5 has started or completed.

[0560] If the write process corresponding to the repetitive write instruction has started (Yes in step S504), the CPU 12 is unable to correct the write process corresponding to the repetitive write instruction, and therefore sends a completion notification indicating that the correction has failed to the host 2 (step S503), and ends the correction control process.

[0561] If the write process corresponding to the repetitive write instruction has not started (No in step S504), the CPU 12 obtains the LBA range from the correction object entry (step S505). Specifically, the CPU 12 obtains the LBA range (first LBA range) based on the LBA represented by the correction object entry and the data length. Then, the CPU 12 determines whether the LBA range specified by the correction instruction (second LBA range) is within the first LBA range (step S506).

[0562] If at least a portion of the second LBA range is outside the first LBA range (in step S506, no), the CPU 12 will notify the host 2 of a completion indicating a correction failure (step S503) because the specified second LBA range is inappropriate, and end the correction control process.

[0563] If the second LBA range is within the first LBA range (Yes in step S506), CPU 12 updates the correction object entry using the second LBA range (step S507). Specifically, CPU 12 generates correction instruction data 64 representing the second LBA range. Then, CPU 12 registers a pointer to the generated correction instruction data 64 into the pointer field pointing to the correction instruction data of the correction object entry. Thus, CPU 12 can use the correction object entry and correction instruction data 64 to manage the writing of the second LBA range that should be canceled within the first LBA range. Then, CPU 12 notifies host 2 of the completion indicating successful correction (step S508) and ends the correction control process.

[0564] Through the above correction control processing, CPU 12 can update the write management table 63 in response to the correction instruction received from host 2, thereby canceling writes to the second LBA range within the first LBA range specified by the repetitive write instruction. That is, CPU 12 can correct the first LBA range specified by the repetitive write instruction in response to the correction instruction. Based on the updated write management table 63, CPU 12 will not write user data to the second LBA range within the first LBA range specified by the repetitive write instruction.

[0565] (Processing in host 2 based on the response to write commands from storage system 3)

[0566] Figure 43 This is a flowchart illustrating an example of the steps of a write response receiving process performed by the CPU 21 of host 2. The write response receiving process is based on the response (completion) received from the storage system 3 in response to a write instruction. The CPU 21 performs the write response receiving process in response to a completion received from the completion queue 243 for a write instruction.

[0567] First, CPU 21 determines the entry corresponding to the instruction ID within the acquired completion in the lock data list 245 (step S601). CPU 21 uses the determined entry to determine whether the acquired completion is the first completion (step S602). Specifically, for example, if no value is set as the completion status within the determined entry, CPU 21 determines that the acquired completion is the first completion. Furthermore, if a value indicating that the first completion has been received is set as the completion status within the determined entry, CPU 21 determines that the acquired completion is the second completion.

[0568] If the completion obtained is the first completion (Yes in step S602), the CPU 21 determines whether the completion is a normal response (step S603).

[0569] If the obtained completion response is normal (Yes in step S603), CPU 21 increments the variable Cseq used for allocating the sequence number of the completion by 1 (i.e., increments) (step S604). Then, CPU 21 updates the determined entry using the variable Cseq (step S605). Specifically, CPU 21 appends (sets) the sequence number shown in the variable Cseq as the completion order within the determined entry. Thus, the sequence number shown in the variable Cseq is assigned to the obtained completion. In addition, CPU 21 appends a value indicating that the first completion has been received as the completion status within the determined entry. Then, CPU 21 returns a response indicating that the write is complete (step S606) to the write request generated by application 223 or OS 221, ending the write response receiving process.

[0570] In addition, sometimes the following method is used: corresponding to the write request generated by application 223 or OS 221, two write instructions are sent to storage system 3, thereby receiving from storage system 3 the first completion of the first write instruction and the second completion of the second write instruction. In this case, for example, after updating the entry determined in step S605, CPU 21 saves the second write instruction in the commit queue 242 (step S607), rewrites the instruction ID of the determined entry with the instruction ID of the second write instruction, and ends the write response receiving process.

[0571] If the completion achieved (i.e., the first completion) is an abnormal response (No in step S603), CPU 21 releases the lock on the user data in data buffer 241 associated with the instruction ID within the completion (step S608). After the lock on data buffer 241 is released, application 223 or OS 221 deletes the user data. CPU 21 can, for example, use data management area information within the determined entry to determine the user data that should be unlocked in data buffer 241. If the user data is unlocked, the user data can be deleted. That is, the storage area in data buffer 241 that holds the user data (i.e., the storage area within NVRAM 24) is released. CPU 21 removes the determined entry from the locked data list 245 (step S609). Furthermore, if CPU 21 has created a list of PRP entries and the second and subsequent segments of SGL for that entry, it also releases the area in the list of pointers to those entries in 244. Then, the CPU 21 notifies the application 223 or the OS 221 that the processing of the instruction corresponding to the determined entry has failed (step S610), and ends the write response receiving process.

[0572] If the completion obtained is the second completion (in step S602, no), the CPU 21 determines whether the completion is a normal response (step S611).

[0573] If the completion response is normal (Yes in step S611), the CPU 21 releases the lock on the user data associated with the instruction ID in the completion within the data buffer 241 and removes the write restriction (step S612). Then, the CPU 21 deletes the identified entry from the locked data list 245 (step S613), ending the write response reception process. Furthermore, if the CPU 21 has created a list of PRP entries and the second and subsequent segments of the SGL for this entry, it also releases the area in the pointer list 244 that stores them. Additionally, if the CPU 21 has created correction instruction data 246 for this entry, it also releases the area storing the correction instruction data 246.

[0574] If the obtained completion (i.e., the second completion) is an abnormal response (No in step S611), the CPU 21 considers the storage system 3 to have failed, suspends processing for the storage system 3 (step S614), notifies the OS 221 of the abnormal situation, and terminates the write response reception processing. In this case, abnormal handling as part of the information processing system 1 is performed. Thereafter, the IO handling unit 210 rejects all requests from the application 233 or the OS 221 to modify user data, such as write requests or pruning requests.

[0575] Through the above write response reception processing, CPU 21 can perform different actions depending on whether the received completion is the first or second completion of the corresponding write instruction, and whether the received completion is a normal or abnormal response. Specifically, if the received completion is the first completion and a normal response, CPU 21 appends the sequence number Cseq assigned to the completion and information indicating that the first completion has been received to the entry in the corresponding lock data list 245, thus replying to the write request as complete. If the received completion is the first completion and an abnormal response, CPU 21 deletes the corresponding user data from NVRAM 24 and the entry in the corresponding lock data list 245, thus replying to the write request as failed. If the received completion is the second completion and a normal response, CPU 21 deletes the corresponding user data (i.e., the user data that has been written) from NVRAM 24 and the entry in the corresponding lock data list 245. Furthermore, if the received completion is the second completion and an abnormal response, CPU 21 considers the storage system 3 to have failed and suspends processing for the storage system 3.

[0576] (Handling in host 2 based on the response to an abnormal termination command from storage system 3)

[0577] Figure 44 This is a flowchart illustrating an example of the steps involved in receiving and processing an exception termination response executed by the CPU 21 of host 2. The exception termination response receiving and processing is based on the response (completion) received from the storage system 3 to an exception termination instruction. The CPU 21 executes the exception termination response receiving and processing in the case where completion for an exception termination instruction has been obtained from the completion queue 243. Here, an example is illustrated where the exception termination instruction for which completion has been obtained is an exception termination instruction requesting abort of a duplicate write instruction.

[0578] First, CPU 21 determines whether the obtained completion is a normal response (step S701). That is, based on the obtained completion, CPU 21 determines whether the abort of the repeated write instruction was successful.

[0579] If the completion response is normal (Yes in step S701), CPU 21 determines the entry corresponding to the repeat write instruction in the locked data list 245 (step S702). Using the determined entry, CPU 21 unlocks the user data in data buffer 241 associated with the repeat write instruction (step S703). CPU 21 may, for example, use data area management information within the determined entry to determine the user data in data buffer 241 that should be unlocked.

[0580] Then, CPU 21 removes the identified entry from the locked data list 245 (step S704), ending the exception termination response reception process. Furthermore, if CPU 21 has created a list of PRP entries and the second and subsequent segments of SGL for this entry, it also releases the area containing the pointer list 244. Additionally, if CPU 21 has created correction instruction data 246 for this entry, it also releases the area containing the correction instruction data 246.

[0581] If the obtained completion response is an abnormal response (No in step S701), the CPU 21 ends the abnormal termination response reception process. That is, since the abort of the repeat write instruction failed, the CPU 21 does not release the lock on the user data associated with the repeat write instruction, does not delete the entry corresponding to the repeat write instruction from the lock data list 245, and ends the abnormal termination response reception process.

[0582] Through the above abnormal termination response receiving and processing, CPU 21 can release the lock on the user data associated with the repeated write instruction and delete the entry corresponding to the repeated write instruction from the locked data list 245 if the repeated write instruction is successfully aborted.

[0583] (Processing in host 2 based on the response to the correction command from storage system 3)

[0584] Figure 45 This is a flowchart illustrating an example of the steps of a correction response receiving process performed by the CPU 21 of host 2. The correction response receiving process is based on the response (completion) received from the storage system 3 for a correction instruction. The CPU 21 performs the correction response receiving process in response to a completion received from the completion queue 243 for a correction instruction. Here, an example is shown where the correction instruction for which completion was received is a correction instruction requesting correction of a duplicate write instruction, and a PRP is used.

[0585] First, CPU 21 determines whether the obtained completion is a normal response (step S801). That is, based on the obtained completion, CPU 21 determines whether the correction of the duplicate write instruction was successful.

[0586] If the completion response is normal (Yes in step S801), the CPU 21 determines the entry corresponding to the repeat write instruction in the lock data list 245 (step S802). Then, based on the LBA range (second LBA range) specified by the correction instruction, the CPU 21 determines whether the portion containing the beginning of the LBA range (first LBA range) specified by the repeat write instruction has been cancelled (step S803).

[0587] If the portion containing the beginning of the first LBA range has been cancelled (Yes in step S803), the CPU 21 modifies the LBA range and data pointer shown in the SQ entry information in the determined entry (step S804), ending the correction response reception process. Specifically, the CPU 21 modifies the LBA range shown in the SQ entry information (e.g., the beginning LBA and the data length) to indicate an LBA range from which the second LBA range has been excluded from the first LBA range. Then, the CPU 21 modifies the data pointer shown in the SQ entry information to indicate a location where user data that should be written to the LBA range from which the second LBA range has been excluded from the first LBA range is stored. In addition, the CPU 21 unlocks and releases the portion of the user data area that is no longer needed due to this exclusion.

[0588] Furthermore, the change of the data pointer in step S804 is possible when PRP is used to represent the storage area where user data is stored, and the cancellation of the LBA range containing the starting LBA is indicated only by modifying the entries in the lock data list 245. On the other hand, when SGL is used to represent the storage area where user data is stored, the cancellation of the LBA range containing the starting LBA cannot be indicated without modifying the data in the storage system 3 and the read lock data list 245. In this case, CPU 21 performs the same processing as in step S807.

[0589] If the portion containing the beginning of the first LBA range is not canceled (No in step S803), the CPU 21 determines whether the portion containing the end of the first LBA range has been canceled based on the second LBA range (step S805).

[0590] If the portion including the end of the first LBA range has been cancelled (Yes in step S805), the CPU 21 changes the LBA range shown in the SQ entry information in the determined entry (step S806), ending the correction response receiving process. Specifically, the CPU 21 changes the LBA range shown in the SQ entry information to indicate an LBA range from which the second LBA range has been excluded from the first LBA range. Furthermore, if the portion including the end of the first LBA range has been cancelled, the CPU 21 can manage, based on the changed LBA range, the portion corresponding to the beginning of the user data stored in the location indicated by the data pointer of the SQ entry information to the changed end, which is the user data to be written. That is, the beginning of the user data to be written is stored in the location indicated by the data pointer of the SQ entry information. Therefore, the CPU 21 may also not change the data pointer shown in the SQ entry information. Additionally, the CPU 21 unlocks and releases the storage area containing the user data no longer needed due to this exclusion.

[0591] If the portion at the end of the LBA range to be written is not cancelled (No in step S805), that is, if the portion in the middle of the LBA range to be written is not cancelled (excluding the beginning and end), the CPU 21 generates correction instruction data 246 based on the second LBA range (step S807). The correction instruction data 246 includes, for example, the LBA at the beginning of the second LBA range and the length of the second LBA range (e.g., the number of sectors). Then, the CPU 21 registers the generated correction instruction data 246 in the determined entry's correction instruction data list (step S808), unlocks the storage area containing user data that is no longer needed due to the exclusion, and ends the correction response receiving process.

[0592] If the response is abnormal (No in step S801), CPU 21 terminates the correction response reception process. That is, since the correction of the duplicate write instruction failed, CPU 21 terminates the correction response reception process without changing the entry corresponding to the duplicate write instruction.

[0593] Through the above correction response receiving process, the CPU 21 can modify the entry corresponding to the repeated write instruction if the correction of the repeated write instruction is successful, so that it indicates that the write to the second LBA range specified by the correction instruction has been cancelled.

[0594] (A variation of write request control processing in host 2)

[0595] Figure 46 This is a flowchart illustrating a modified example of the steps of a write request control process executed by the CPU 21 of host 2. In the modified write request control process, if there is a duplicate within a specified LBA range between a new write request generated by application 223 or OS 221 and an issued but incomplete write instruction, a write request is made to storage system 3 for an LBA range that combines the LBA range specified by the new write request and the LBA range specified by the issued but incomplete write instruction (repeated write instruction). Then, a request is made to storage system 3 to abort the repeated write instruction. That is, the write request control process is a process that performs the following actions: the aforementioned (1) when the LBA range specified by the subsequently generated write / trimming request completely includes the LBA range specified by the issued but incomplete write instruction; and (2) when the LBA range specified by the subsequently generated write / trimming request includes a portion of the LBA range specified by the issued but incomplete write instruction, the method of aborting the issued but incomplete write instruction using (2-b) is employed.

[0596] The LBA range specified by the write request includes at least a portion of the LBA range specified by the repeat write instruction. Therefore, the LBA range specified by the write request can include the entire LBA range specified by the repeat write instruction.

[0597] When a new write request is generated by application 223 or OS 221, CPU 21 performs write request control processing.

[0598] Figure 46 Steps S901, S902, and S903 are the same as those described above. Figure 38 The steps S101, S102 and S103 of the aforementioned write request control processing are the same.

[0599] If an entry exists in the lock data list 245 indicating a write instruction (repeated write instruction) that specifies an LBA range that at least partially overlaps with the LBA range specified by the current write request (Yes in step S901), and all first completions for repeated write instructions have been received (Yes in step S903), the CPU 21 determines whether any repeated write instruction entries remain in the lock data list 245 (step S904). Entries for repeated write instructions that correspond to an abnormal response to the first completion are deleted from the lock data list 245. Therefore, the CPU 21 determines whether any repeated write instruction entries remain in the lock data list 245 after receiving all first completions for repeated write instructions.

[0600] If there are no remaining entries for duplicate write instructions (No in step S904), that is, if the first completion of all duplicate write instructions is an abnormal response, CPU 21 executes write request processing based on the current write request (step S902), and ends the write request control processing. The specific steps of the write request processing are as follows: Figure 39 As described in the flowchart.

[0601] If there are remaining entries with duplicate write instructions (yes in step S904), CPU 21 executes a combined write request processing based on the write request and the duplicate write instruction (step S905). The combined write request processing is a process used to request a write operation from the storage system 3 that combines the duplicate write instruction with the current write request. More specifically, in the combined write request processing, if user data has been written to the NAND flash memory 5 of the storage system 3 corresponding to the duplicate write instruction and the current write request, it is determined that the user data to be finally written to the NAND flash memory 5 (combined user data) is used. Then, a write instruction (combined write instruction) is issued to the storage system 3 to write the determined combined user data. The specific process of the combined write request processing will be explained in detail below. Figure 47 The flowchart will be described later.

[0602] Next, CPU 21 determines whether it has received the first completion for the combined write instruction (step S906). If it has not received the first completion for the combined write instruction (no in step S906), CPU 21 returns to step S906. That is, CPU 21 waits until it receives the first completion for the combined write instruction.

[0603] Upon receiving the first completion for the combined write instruction (Yes in step S906), CPU 21 determines whether the completion is a normal response (step S907).

[0604] If the completion of the write instruction is a normal response (Yes in step S907), the CPU 21 issues an abnormal termination instruction to abort the duplicate write instruction (step S908). The CPU 21 stores the issued abnormal termination instruction in the submission queue 242 (step S909). Then, the CPU 21 uses the lock data list 245 to determine whether there are other duplicate write instructions (step S910). If there are other duplicate write instructions (Yes in step S910), the CPU 21's processing returns to step S908. Thus, abnormal termination instructions are issued to other duplicate write instructions.

[0605] If there are no other duplicate write instructions (in step S910, no), CPU 21 ends the write request control process.

[0606] Furthermore, if the completion of the combined write instruction results in an abnormal response (No in step S907), CPU 21 terminates the write request control process. That is, since no write operation is performed corresponding to the combined write instruction, CPU 21 terminates the write request control process without performing the processing to abort the repeated write instruction.

[0607] Through the write request control processing of the above variant, when a new write request is generated by application 223 or OS 221, if there is an incomplete write instruction (repeated write instruction) that specifies an LBA range that overlaps with the LBA range specified by the new write request, the CPU 21 can request the memory system 3 to write in combination with the new write request and the repeated write instruction, and can request the memory system 3 to abort the repeated write instruction.

[0608] Specifically, CPU 21 uses lock data list 245 to determine whether there is a duplicate write instruction. If a duplicate write instruction exists, CPU 21 issues a combined write instruction based on the new write request and the duplicate write instruction. Then, if the first completion of the combined write instruction is a normal response, CPU 21 issues an abnormal termination instruction to abort the duplicate write instruction.

[0609] Therefore, when a duplicate write instruction exists in response to a new write request, the CPU 21 can request the storage system 3 to abort the write operation corresponding to the duplicate write instruction.

[0610] (Combined write request processing in host 2)

[0611] Figure 47This is a flowchart illustrating an example of the steps involved in a combined write request processing performed by the CPU 21 of host 2. The combined write request processing is a process used to request a write from the storage system 3 that combines at least one incomplete repeat write instruction with a normal first completion response, and a new write request generated by application 223 or OS 221. The combined write request processing is equivalent to referencing... Figure 46 The aforementioned write request control processing step S905. Referring to... Figure 47 In the following description, a repeat write instruction that is incomplete and whose first completion is a normal response is referred to as a repeat write instruction.

[0612] First, if CPU 21 has written user data to the NAND flash memory 5 of storage system 3 in accordance with a repeat write instruction and the current write request, it determines the user data to be finally written to the NAND flash memory 5 (combined user data) (step S1001). The combined user data is determined according to the order of the write requests of the repeat write instruction and the current write request. That is, the user data to be written to a certain LBA is the user data corresponding to the repeat write instruction or write request that last requested a write to that LBA. Furthermore, if the LBA range specified by the current write request completely includes the LBA range specified by the repeat write instruction, the combined user data is the user data corresponding to the current write request.

[0613] CPU 21 stores the combined user data in data buffer 241 (step S1002). More specifically, CPU 21 stores the user data that should be written corresponding to the current write request in data buffer 241. User data that should be written corresponding to repeated write instructions has already been stored in data buffer 241.

[0614] Specifically, the PRP is used as information indicating the storage location of combined user data (i.e., a data pointer). The CPU 21 can copy user data that should be included in the combined user data, which is to be written according to the repeated write instruction, to other storage areas within the data buffer 241. For example, suppose the CPU 21 creates combined user data by sequentially combining user data stored in physical page A and physical page B respectively. In this case, the CPU 21 generates combined user data, for example, by copying the user data stored in physical page B to other storage areas within the data buffer 241 whose physical addresses are contiguous with physical page A. Hereinafter, the multiple storage areas storing combined user data will be referred to as combined storage areas. At this time, the combined storage area is set as one contiguous area in logical address. Furthermore, in the combined storage area, combined user data can be stored from the middle of the initial physical page. Similarly, in the combined storage area, combined user data can be stored up to the middle of the last physical page. However, the other physical pages contained in the combined storage area need to store combined user data from beginning to end. Thus, the storage location of the combined user data can be specified by the PRP. Furthermore, if other user data is stored in other storage areas within the data buffer 241 that is contiguous with the physical address of physical page A, the CPU 21 generates combined user data by copying the user data stored in physical page A to other storage areas within the data buffer 241 that is contiguous with the physical page B.

[0615] When using SGL as information representing the storage location of combined user data, CPU 21 does not need to copy the user data to be written according to repeated write instructions. This is because SGL can designate multiple storage regions within NVRAM 24, starting from the middle of a physical page, as the storage location of user data. In this case, CPU 21 creates an SGL containing multiple SGL descriptors, each representing a storage region that stores combined user data.

[0616] CPU 21 locks the stored combined user data (step S1003). Furthermore, if user data that should have been written corresponding to a repeat write instruction was not copied but used as part of the combined user data, that user data is already locked. When a portion of the combined user data is locked, CPU 21 increments the reference counter corresponding to that locked user data. CPU 21 relocks the unlocked portion of the combined user data. When a new write instruction is issued setting the corresponding user data as the write target, the reference counter increments. Furthermore, upon receiving a second completion of a write instruction setting the corresponding user data as the write target, or when the write instruction is aborted, the reference counter decrements. Then, when the reference counter becomes 0 due to decrementing, CPU 21 unlocks the corresponding user data.

[0617] Next, CPU 21 issues a write instruction that combines the repeat write instruction with the current write request (combined write instruction) (step S1004). The combined write instruction specifies that it includes the LBA range specified by the repeat write instruction and the LBA range specified by the current write request. Furthermore, the user data to be written corresponding to the combined write instruction is combined user data. Additionally, if the LBA range specified by the current write request completely includes the LBA range specified by the repeat write instruction, the combined write instruction is a write instruction corresponding to the current write request.

[0618] CPU 21 appends the entry corresponding to the combined write instruction to the locked data list 245 (step S1005). Then, CPU 21 saves the combined write instruction in the commit queue 242 (step S1006), ending the combined write request processing.

[0619] Through the above combined write request processing, CPU 21 can request the writing of combined user data from storage system 3 based on the repeated write instruction and the current write request. Combined user data refers to the user data that should ultimately be written to NAND flash memory 5 in storage system 3 when user data has been written to NAND flash memory 5 in accordance with the repeated write instruction and the current write request.

[0620] Next, we will refer to Figure 48 and Figure 49 The trim request control process is described. This process controls writes to the NAND flash memory 5 of the storage system 3, corresponding to whether there is overlap between a new trim request generated by application 223 or OS 221 and an issued but incomplete write command within a specified LBA range.

[0621] (Prune request control processing in Host 2)

[0622] Figure 48This is a flowchart illustrating an example of the steps involved in pruning request control processing performed by CPU 21 of host 2. CPU 21 performs pruning request control processing when a pruning request is generated by application 223 or OS 221.

[0623] First, the CPU 21 determines whether there is an entry in the locked data list 245 that indicates a write instruction (repeated write instruction) that specifies an LBA range that at least partially overlaps with the LBA range specified by the pruning request (step S1101). Specifically, the CPU 21 determines whether the LBA range based on the SQ entry information contained in each entry of the locked data list 245 overlaps with the LBA range specified by the pruning request.

[0624] If no duplicate write instruction entry exists in the lock data list 245 (No in step S1101), the CPU 21 executes the trim request processing based on the trim request (step S1102), ending the trim request control processing. The trim request processing is the process by which the host 2 requests the release of the LBA range allocation from the storage system 3. In the trim request processing, the CPU 21 issues a trim instruction to release the allocation of the LBA range specified by the trim request. Furthermore, since no duplicate write instruction entry exists in the lock data list 245, the CPU 21 does not perform processing to abort or correct the write instruction represented by the lock data list 245. For specific steps regarding the trim request processing, refer to [link to relevant documentation]. Figure 49 The flowchart will be described later.

[0625] If a duplicate write instruction entry exists in the locked data list 245 (Yes in step S1101), the CPU 21 determines whether all first completions for duplicate write instructions have been received (step S1103). If at least one first completion for a duplicate write instruction has not been received (No in step S1103), the processing performed by the CPU 21 returns to step S1103. That is, the CPU 21 waits until all first completions for duplicate write instructions are received.

[0626] If all first completions for the duplicate write instructions have been received (Yes in step S1103), CPU 21 confirms that at least one completion is a normal response. That is, CPU 21 confirms that there are entries for duplicate write instructions remaining in the locked data list 245 (step S1104). If no entries for duplicate write instructions remain (No in step S1104), since the duplicate write instructions have disappeared, CPU 21 does not perform processing for aborting or correcting the duplicate write instructions, and proceeds to the trimming request processing in step S1102.

[0627] If there are any entries with duplicate write instructions remaining (yes in step S1104), CPU 21 executes trim request processing based on the trim request (step S1105). Hereinafter, the trim instruction issued in the trim request processing of step S1105 will be referred to as the object trim instruction.

[0628] CPU 21 determines whether it has received the first completion of the object trimming instruction (step S1106). If it has not received the first completion of the object trimming instruction (no in step S1106), the processing of CPU 21 returns to step S1106. That is, CPU 21 waits until the first completion of the object trimming instruction is received.

[0629] If the first completion of the object trimming instruction is received (Yes in step S1106), the CPU 21 determines whether the first completion of the object trimming instruction is a normal response (step S1107). If the first completion of the object trimming instruction is an abnormal response (No in step S1107), the CPU 21 terminates the trimming request control process. That is, because an abnormality occurred in the processing of the object trimming instruction in the storage system 3, the CPU 21 does not perform the processing for aborting or correcting duplicate write instructions represented by the lock data list 245.

[0630] If the first completion of the object pruning instruction is a normal response (Yes in step S1107), the CPU 21 determines whether the LBA range specified by the object pruning instruction (i.e., the current pruning request) includes the entire LBA range specified by a single write instruction (step S1108). If the LBA range specified by the object pruning instruction includes the entire LBA range specified by a single write instruction (Yes in step S1108), the CPU 21 issues an abnormal termination instruction for the write instruction (step S1109). Then, the CPU 21 stores the issued abnormal termination instruction in the commit queue 242 (step S1110). Thus, the CPU 21 is able to request the storage system 3 to abort the writing of user data corresponding to the write instruction.

[0631] If the LBA range specified by the object trimming instruction only includes a portion of the LBA range specified by a single write-repeat instruction (No in step S1108), the CPU 21 issues a correction instruction for the write-repeat instruction (step S1111). Then, the CPU 21 stores the issued correction instruction in the commit queue 242 (step S1112). Thus, the CPU 21 is able to request the storage system 3 to delete a portion of the user data that should have been written corresponding to the write-repeat instruction.

[0632] Next, CPU 21 uses the locked data list 245 to determine whether there are other duplicate write instructions (step S1113). If there are other duplicate write instructions (yes in step S1113), CPU 21 returns to step S1108. Thereby, it issues either an abnormal termination instruction or a correction instruction to the other duplicate write instruction.

[0633] If there are no other duplicate write instructions (in step S1113, no), CPU 21 ends the trim request control process.

[0634] Through the above pruning request control process, when a pruning request is generated by application 223 or OS 221, if there is an incomplete write instruction (repeated write instruction) that specifies an LBA range that overlaps with the LBA range specified by the pruning request, CPU 21 can request storage system 3 to abort or correct the repeated write instruction.

[0635] Specifically, CPU 21 uses lock data list 245 to determine whether a duplicate write instruction exists. If a duplicate write instruction exists, CPU 21 uses lock data list 245 to determine whether the LBA range specified by the pruning request includes the entire LBA range specified by the duplicate write instruction or only a portion thereof. If the LBA range specified by the pruning request includes the entire LBA range specified by the duplicate write instruction, CPU 21 requests memory system 3 to abort the duplicat...

Claims

1. An information processing device capable of being connected to a storage system, comprising non-volatile memory and a processor. The processor is configured such that, The first data is stored in the non-volatile memory; First management data is saved to the non-volatile memory. This first management data is associated with the first data and includes information corresponding to a first write instruction specifying a first logical address range. The first write instruction is sent to the storage system for the first time. Corresponding to the case where a first response to the first written instruction sent for the first time is received from the storage system, information indicating that the first response to the first written instruction sent for the first time has been received is appended to the first management data. Upon receiving the first response, corresponding to the case where a second response to the first write instruction is received from the storage system, the first data and the first management data are deleted from the non-volatile memory. The processor is further configured to, Before receiving the second response to the first write instruction, if either a request is made to write second data into a third logical address range that includes at least a second logical address range that is at least a part of the first logical address range, or to release the allocation of the third logical address range, an instruction is sent to the storage system to at least abort the writing of the first data into the second logical address range corresponding to the first write instruction. If the write to the second logical address range is successfully aborted, the first management data is updated or deleted.

2. The information processing apparatus according to claim 1, wherein, The processor is configured such that, Upon receiving the first response, corresponding to the case where the second response is received from the storage system as a second response to the first write instruction sent for the first time, the first data and the first management data are deleted from the non-volatile memory.

3. The information processing apparatus according to claim 1, wherein, The processor is configured such that, After receiving the first response, the first write instruction is sent to the storage system a second time. In response to receiving the second response from the storage system as a response to the second sent first write instruction, the first data and the first management data are deleted from the non-volatile memory.

4. The information processing apparatus according to any one of claims 1 to 3, wherein, When the third logical address range includes the entire first logical address range. The processor is further configured to, Before receiving the second response to the first write instruction sent for the first time, if a request is made to write the second data to the third logical address range, the second data is saved in the non-volatile memory, second management data is saved to the non-volatile memory, the second management data is associated with the second data and contains information corresponding to the second write instruction specifying the third logical address range, and the second write instruction is sent to the storage system for the first time. The processor is further configured to, Upon receiving a third response from the storage system in response to the first sent second write instruction, information indicating that the third response to the first sent second write instruction has been received is appended to the second management data, and an instruction is sent to the storage system to abort the writing of the first data to the first logical address range corresponding to the first write instruction. If the write to the first logical address range is successfully aborted, the first data and the first management data are deleted from the non-volatile memory. Upon receiving the third response, corresponding to the case where a fourth response for the second write instruction is received from the storage system, the second data and the second management data are deleted from the non-volatile memory.

5. The information processing apparatus according to claim 1, wherein, The first logical address range includes the second logical address range and one or more fourth logical address ranges that are logical address ranges different from the second logical address range. When the third logical address range includes the second logical address range but does not include the fourth logical address range. The processor is further configured to, Before receiving the second response to the first write instruction sent for the first time, if a request is made to write the second data to the third logical address range, the second data is saved in the non-volatile memory, second management data is saved to the non-volatile memory, the second management data is associated with the second data and contains information corresponding to the second write instruction specifying the third logical address range, and the second write instruction is sent to the storage system for the first time. The processor is further configured to, Upon receiving a third response from the storage system in response to the first sent second write instruction, information indicating that the third response to the first sent second write instruction has been received is appended to the second management data. An instruction is then sent to the storage system to abort the writing of the first data to the first logical address range corresponding to the first write instruction, and to the writing to the second logical address range. If the write to the second logical address range is successfully aborted, the first management data is updated such that the first write instruction specifies one or more fourth logical address ranges, but does not specify the second logical address range. Upon receiving the third response, corresponding to the case where a fourth response for the second write instruction is received from the storage system, the second data and the second management data are deleted from the non-volatile memory.

6. The information processing apparatus according to claim 5, wherein, The processor is further configured to, If the write to the second logical address range is successfully aborted, the first management data is updated such that the first write instruction specifies one or more fourth logical address ranges, but does not specify the second logical address range.

7. The information processing apparatus according to claim 1, wherein, The first logical address range includes the second logical address range and one or more fourth logical address ranges that are logical address ranges different from the second logical address range. When the first data includes one or more first data portions that should be written to one or more of the fourth logical address ranges, and a second data portion that should be written to the second logical address range. The processor is further configured to, Before receiving the second response to the first write instruction sent for the first time, if a request is made to write the second data to the third logical address range, the second data is saved to the non-volatile memory, and second management data is saved to the non-volatile memory. The second management data is associated with the second data and the one or more first data portions, and includes information corresponding to a second write instruction specifying a logical address range including the one or more fourth logical address ranges and the third logical address range. The second write instruction is sent to the storage system for the first time. The processor is further configured to, Upon receiving a third response from the storage system in response to the first sent second write instruction, information indicating that the third response to the first sent second write instruction has been received is appended to the second management data, and an instruction is sent to the storage system to abort the writing of the first data to the first logical address range corresponding to the first write instruction. If the write to the first logical address range is successfully aborted, the first management data and at least the second data portion are deleted from the non-volatile memory. Upon receiving the third response, corresponding to the case where a fourth response for the second write instruction is received from the storage system, the second data, the one or more first data sections, and the second management data are deleted from the non-volatile memory.

8. The information processing apparatus according to claim 4, wherein, The processor is configured such that, Upon receiving the third response, corresponding to the case where the fourth response is received from the storage system as a second response to the second write instruction sent for the first time, the second data and the second management data are deleted from the non-volatile memory.

9. The information processing apparatus according to claim 4, wherein, The processor is configured such that, After receiving the third response, the second write instruction is sent to the storage system a second time. In response to receiving the fourth response from the storage system as a response to the second write instruction sent for the second time, the second data and the second management data are deleted from the non-volatile memory.

10. The information processing apparatus according to any one of claims 1 to 3, wherein, When the third logical address range includes the entire first logical address range. The processor is further configured to, Before receiving the second response to the first write instruction sent for the first time, if a request is made to release the allocation of the third logical address range, third data representing the third logical address range is stored in the non-volatile memory, third management data containing information corresponding to the first release instruction specifying the third logical address range is stored in the non-volatile memory, and the first release instruction is sent to the storage system for the first time. The processor is further configured to, Upon receiving a fifth response from the storage system to the first release instruction sent for the first time, information indicating that the fifth response to the first release instruction sent for the first time has been received is appended to the third management data, and an instruction to the storage system is sent to abort the writing of the first data to the first logical address range corresponding to the first write instruction. If the write to the first logical address range is successfully aborted, the first data and the first management data are deleted from the non-volatile memory. Upon receiving the fifth response, corresponding to the case where a sixth response to the first release instruction is received from the storage system, the third data and the third management data are deleted from the non-volatile memory.

11. The information processing apparatus according to any one of claims 1 to 3, wherein, The first logical address range includes the second logical address range and one or more fourth logical address ranges that are logical address ranges different from the second logical address range. When the third logical address range includes the second logical address range but does not include the fourth logical address range. The processor is further configured to, Before receiving the second response to the first write instruction sent for the first time, if a request is made to release the allocation of the third logical address range, third data representing the third logical address range is stored in the non-volatile memory, third management data containing information corresponding to the first release instruction specifying the third logical address range is stored in the non-volatile memory, and the first release instruction is sent to the storage system for the first time. The processor is further configured to, Upon receiving a fifth response from the storage system in response to the first release command sent for the first time, Information indicating that a fifth response has been received in response to the first release command sent for the first time is appended to the third management data. Send an instruction to the storage system to abort the writing of the first data to the first logical address range corresponding to the first write instruction, and to the writing to the second logical address range. If the write to the second logical address range is successfully aborted, the first management data is updated such that the first write instruction specifies one or more fourth logical address ranges, but does not specify the second logical address range. Upon receiving the fifth response, corresponding to the case where a sixth response to the first release instruction is received from the storage system, the third data and the third management data are deleted from the non-volatile memory.

12. The information processing apparatus according to claim 11, wherein, The processor is further configured to, If the write to the second logical address range is successfully aborted, the first management data is updated such that the first write instruction specifies one or more fourth logical address ranges, but does not specify the second logical address range.

13. The information processing apparatus according to claim 10, wherein, The processor is configured such that, Upon receiving the fifth response, corresponding to the case where the sixth response is received from the storage system as a second response to the first release instruction sent for the first time, the third data and the third management data are deleted from the non-volatile memory.

14. The information processing apparatus according to claim 10, wherein, The processor is configured such that, After receiving the fifth response, the first release command is sent to the storage system a second time. In response to receiving the sixth response from the storage system as a response to the first release command sent for the second time, the third data and the third management data are deleted from the non-volatile memory.

15. An information processing apparatus capable of being connected to a storage system, comprising non-volatile memory and a processor. The processor is configured such that, Read one or more first data units stored in the first logical address range from the storage system. The read one or more first data portions are saved to the non-volatile memory. After rewriting one or more consecutive second data sections stored in one or more first data sections in the non-volatile memory, First management data is saved to the non-volatile memory. This first management data is associated with one or more second data units and includes information corresponding to a first write instruction specifying a second logical address range corresponding to the one or more second data units. The first write instruction is sent to the storage system for the first time. Corresponding to the case where a first response to the first written instruction sent for the first time is received from the storage system, information indicating that the first response to the first written instruction sent for the first time has been received is appended to the first management data. Upon receiving the first response, corresponding to the case where a second response to the first write instruction is received from the storage system, the first management data is deleted from the non-volatile memory. The processor is further configured to, Before receiving the second response, if the third data section within one or more second data sections has been rewritten, an instruction is sent to the storage system to abort the writing of one or more second data sections to the second logical address range corresponding to the first write instruction, and to the writing to the third logical address range corresponding to the third data section. If the write to the third logical address range is successfully aborted, the first management data is updated or deleted.

16. The information processing apparatus according to claim 15, wherein, The processor is configured such that, Upon receiving the first response, corresponding to the case where the second response is received from the storage system as a second response to the first write instruction sent for the first time, the first management data is deleted from the non-volatile memory.

17. The information processing apparatus according to claim 15, wherein, The processor is configured such that, After receiving the first response, the first write instruction is sent to the storage system a second time. In the event that the second response is received from the storage system as a response to the first write instruction sent for the second time, the first management data is deleted from the non-volatile memory.

18. The information processing apparatus according to any one of claims 15 to 17, wherein, When the third data section includes all of the one or more second data sections. The processor is configured such that, If the write to the third logical address range is successfully aborted, the first management data is deleted from the non-volatile memory.

19. The information processing apparatus according to any one of claims 15 to 17, wherein, The third data section includes one of the beginning and ending data sections of the one or more second data sections. When the second logical address range includes the third logical address range and the fourth logical address range. The processor is further configured to, If the write to the third logical address range is successfully aborted, the first management data is updated such that the first write instruction does not specify the third logical address range, but instead establishes an association with the data section corresponding to the fourth logical address range in one or more second data sections, and specifies the fourth logical address range.

20. The information processing apparatus according to any one of claims 15 to 17, wherein, The third data section does not include either the beginning or end data section of the more than one second data section. When the second logical address range includes the third logical address range and one or more fourth logical address ranges... The processor is further configured to, upon successfully aborting a write to the third logical address range, update the first management data such that the first write instruction does not specify the third logical address range, but instead establishes an association with the data section corresponding to the one or more fourth logical address ranges within the one or more second data sections, and specifies the one or more fourth logical address ranges.

Citation Information

Patent Citations

  • Game machine

    JP2022040562A

  • Memory system and method for controlling nonvolatile memory

    CN109542797A

  • Performing sub-logical page write operations in non-volatile random access memory (NVRAM) using pre-populated read-modify-write (RMW) buffers

    US20210278996A1