Storage system
By managing the mapping information between logical area identifiers and physical addresses in the storage system, physical secure erasure of specific data is performed, and confirmation is performed after erasure, which solves the difficulty of secure erasure and confirmation of data erasure in the existing technology. issues and achieve data security and reliability.
Patent Information
- Application Number
- CN202410265689.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-03-09
- Filing Date
- 2024-03-08
- Publication Date
- 2024-09-10
AI Technical Summary
It is difficult to securely erase specific data through physical secure erasure methods in the existing technology, and it is impossible to effectively confirm whether the erasure of data is performed correctly.
A storage system is designed that manages the mapping information between logical area identifiers and physical addresses through the controller, performs physical and secure erasure of specific data, and switches to Audit mode after erasure to confirm the correctness of the erasure operation. sex.
It realizes the safe physical erasure of specific data and can effectively confirm the correctness of the erasure operation to ensure the security and reliability of the data.
Smart Images

Figure CN118626004A
Abstract
Description
[0001] This application is based on Japanese Patent Application No. 2023-036753 (filing date: March 9, 2023) and claims the benefit of priority. This application incorporates the entire contents of the basic application by reference. Technical Field
[0002] Embodiments of the present invention relate to a technique for controlling a nonvolatile memory. Background Art
[0003] In recent years, storage systems equipped with nonvolatile memories have become widely used. As one of such storage systems, a solid-state drive (SSD) equipped with a NAND flash memory is known.
[0004] As secure erasure methods for safely and reliably erasing data stored in an SSD, overwrite, block erase, and cryptographic erase are known. Secure erasure methods are classified into physical secure erase methods and logical secure erase methods. The physical secure erase method is an erase method that physically and irreversibly renders the stored data unreadable, and the logical secure erase method is an erase method that logically renders the stored data unreadable. Overwrite and block erase are examples of physical secure erase methods. Cryptographic erase is an example of logical secure erase methods.
[0005] In crypto-erasing, the encryption key used when the data stored in the SSD is encrypted is erased through a physical secure erase method. As a result, the data cannot be decrypted and is logically erased.
[0006] Recently, there is a demand to perform secure erasure on specific data among data stored in a storage system such as an SSD by a physical secure erasure method.
[0007] Furthermore, there is a need to confirm whether secure erasure of specific data has been correctly performed. Summary of the invention
[0008] One embodiment of the present invention provides a storage system that can securely erase specific data using a physical secure erase method and can confirm whether the secure erase of the specific data has been correctly performed.
[0009] According to an embodiment, a storage system includes: a nonvolatile memory including a plurality of blocks each of which is a unit of data erasure operation; and a controller electrically connected to the nonvolatile memory. The controller manages a first table, the first table maintaining mapping information indicating mappings between each of one or more logical area identifiers and each of one or more physical addresses of the nonvolatile memory. The controller maintains a copy of the first mapping information corresponding to the first logical area identifier among the mapping information included in the first table, upon receiving a first command from a host requesting secure erasure of secure erasure target data associated with the first logical area identifier. The controller determines one or more first blocks in the plurality of blocks storing the secure erasure target data associated with the first logical area identifier. The controller performs at least the data erasure operation on at least the one or more first blocks. After performing the data erasure operation on the one or more first blocks, the controller transitions to the first mode. The controller, in the first mode, reads data from a storage location in the non-volatile memory corresponding to a first physical address mapped to the first logical area identifier in the copy of the first mapping information in response to receiving a read command specifying the first logical area identifier from the host.
[0010] According to the storage system having the above configuration, it is possible to perform secure erasure of specific data using the physical secure erasure method, and to confirm whether the secure erasure of the specific data has been correctly performed. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 This is a block diagram showing a configuration example of an information processing system including the storage system according to the first embodiment.
[0012] Figure 2 This is a diagram showing a configuration example of a logical-physical address conversion table (L2P table) used in the storage system according to the first embodiment.
[0013] Figure 3 This is a diagram showing an example of a plurality of namespaces managed in the storage system according to the first embodiment.
[0014] Figure 4 This is a diagram showing an overview of a write operation and a physical secure erase operation executed in the storage system according to the first embodiment.
[0015] Figure 5 This is a flowchart showing the procedure of the physical secure erase operation executed in the storage system according to the first embodiment.
[0016] Figure 6This is a diagram showing an example of the structure of data written to each block in the storage system according to the first embodiment.
[0017] Fig. 7A This is a flowchart showing a partial procedure of processing related to the audit function executed in the storage system according to the first embodiment.
[0018] Figure 7B This is a flowchart showing the remaining procedures of the process related to the Audit function executed in the storage system according to the first embodiment.
[0019] Figure 8 This is a flowchart showing a procedure of processing, which is executed in the storage system according to the first embodiment, for an I / O command received before receiving a first specific command.
[0020] Fig. 9 This is a flowchart showing a procedure of processing an I / O command received during execution of a first specific command, which is executed in the storage system according to the first embodiment.
[0021] Fig. 10A This is a diagram showing an example of the content of each active block before the physical secure erase operation is started in the storage system according to the first embodiment.
[0022] Fig. 10B This is a diagram showing an example of the content of each free block before the start of the physical secure erase operation in the storage system according to the first embodiment.
[0023] Fig.11 This is a diagram showing an example of the content of each active block after the mapping release operation is executed in the storage system according to the first embodiment.
[0024] Fig. 12A This is a diagram showing an example of the content of each active block after the garbage collection operation is executed in the storage system according to the first embodiment.
[0025] Fig. 12B This is a diagram showing an example of the content of each free block after the garbage collection operation is executed in the storage system according to the first embodiment.
[0026] Fig.13 This is a flowchart showing the procedure of the physical secure erase operation executed in the storage system according to the second embodiment.
[0027] Fig.14A This is a flowchart showing the procedure of the physical secure erase operation executed in the storage system according to the third embodiment.
[0028] Fig. 14B This is a flowchart showing the procedure of the mapping removal operation and the garbage collection operation executed in the storage system according to the third embodiment.
[0029] Fig. 14C This is a flowchart showing another procedure of the demapping operation and the garbage collection operation executed in the storage system according to the third embodiment.
[0030] Fig.15A This is a flowchart showing a partial procedure of processing related to the Audit function executed in the storage system according to the third embodiment.
[0031] Fig. 15B This is a flowchart showing the remaining procedures of the process related to the Audit function executed in the storage system according to the third embodiment.
[0032] Fig.16A This is a flowchart showing the procedure of the physical secure erase operation executed in the storage system according to the fourth embodiment.
[0033] Fig. 16B This is a flowchart showing the procedure of the demapping operation and the garbage collection operation executed in the storage system according to the fourth embodiment.
[0034] Fig. 16C This is a flowchart showing another procedure of the demapping operation and the garbage collection operation executed in the storage system according to the fourth embodiment. DETAILED DESCRIPTION
[0035] Hereinafter, a storage system according to an embodiment will be described with reference to the drawings.
[0036] (First embodiment)
[0037] The configuration of an information processing system including the storage system according to the first embodiment will be described. Figure 1 It is a block diagram showing a configuration example of an information processing system 1 including a storage system according to the first embodiment.
[0038] The information processing system 1 includes a host (host device) 2 and a storage system 3. The host 2 is an information processing device configured to control the storage system 3. Examples of the host 2 include a personal computer, a server computer, a portable terminal, or an in-vehicle device. The storage system 3 is a semiconductor storage device configured to write data to a non-volatile memory and read data from a non-volatile memory. The storage system 3 can be implemented as a solid-state drive (SSD) or a UFS (Universal Flash Storage) device, for example. Below, an example of the storage system 3 being implemented as an SSD is described. Hereinafter, the storage system 3 is referred to as SSD3.
[0039] The SSD 3 may be connected to the host 2 via a cable or a network. Alternatively, the SSD 3 may be built in the host 2 .
[0040] The interface for connecting the host 2 and the SSD 3 is not limited thereto, and SATA (Serial ATA), SAS (Serial Attached SCSI), M-PHY, PCI Express (PCIe) (registered trademark), and Ethernet (registered trademark) can be used.
[0041] SSD3 includes a controller 4 and a nonvolatile memory 5. The nonvolatile memory 5 is, for example, a NAND flash memory. Hereinafter, the nonvolatile memory 5 is referred to as the NAND flash memory 5. SSD3 may also include a random access memory 6. The random access memory 6 is, for example, a DRAM (Dynamic Random Access Memory). Hereinafter, the random access memory 6 is referred to as DRAM6.
[0042] The NAND flash memory 5 includes a memory cell array having a plurality of memory cells arranged in a matrix. The NAND flash memory 5 may be a flash memory having a two-dimensional structure or a flash memory having a three-dimensional structure.
[0043] The memory cell array of the NAND flash memory 5 includes a plurality of blocks BLK0 to BLKx-1. Each of the blocks BLK0 to BLKx-1 includes a plurality of pages (here, pages P0 to Py-1). Each page includes a plurality of memory cells connected to the same word line. Each of the blocks BLK0 to BLKx-1 is a unit of a data erasure operation (hereinafter also referred to as a block erase) for erasing data from the NAND flash memory 5. Blocks are sometimes also referred to as "erase blocks", "physical blocks", or "physical erase blocks". Each of the pages P0 to Py-1 is a unit for a data write operation and a data read operation. In addition, the initial data (for example, all 1 data) can be read from a block in an erased state (i.e., a block after a data erase operation has been performed and before a data write operation has been performed).
[0044] The controller 4 may be realized by a circuit such as a system-on-a-chip (SoC). The controller 4 is electrically connected to the NAND flash memory 5 via a NAND interface 13 that complies with, but is not limited to, a Toggle NAND flash interface and an Open NAND Flash Interface (ONFI). The controller 4 operates as a memory controller configured to control the NAND flash memory 5.
[0045] The controller 4 can function as a flash translation layer (FTL) configured to perform data management and block management of the NAND flash memory 5 .
[0046] The data management performed by the FTL includes: (1) management of mapping information, which represents the mapping between each of a plurality of logical area identifiers that respectively specify a plurality of logical areas and each of one or more physical addresses of the NAND flash memory 5, and (2) processing for hiding the constraints of the NAND flash memory 5 (for example, data writing work / data reading work in units of pages and data erasing work in units of blocks).
[0047] The logical region identifier may be a namespace identifier, a logical address, or a combination of a namespace identifier and a logical address. Alternatively, the logical region identifier may be a key of a key-value store.
[0048] The logical address is an address used by the host 2 to specify a logical address in the logical address space of the SSD 3. As the logical address, LBA (logical block address) can be used.
[0049] The controller 4 is configured to create and manage multiple namespaces. Multiple namespaces are independent logical address ranges. Multiple namespaces are used to make a storage system work as if it were multiple storage systems. Multiple namespaces are used by the host 2 to access the SSD 3. The namespace identifier is an identifier used by the host 2 to specify a namespace.
[0050] The management of the mapping information is performed using an address conversion table (logical-physical address conversion table: L2P table) 37 as a table for storing the mapping information. The L2P table 37 is also called a mapping table. Each physical address mapped to a logical area identifier representing a certain logical area represents the latest physical storage location in the NAND flash memory 5 where the data associated with the logical area identifier is written. The L2P table 37 can also be loaded from the NAND flash memory 5 to the DRAM 6 when the SSD 3 is started.
[0051] When a logical address (e.g., LBA) is used as a logical area identifier, the mapping information maintained in the L2P table 37 is information that represents the mapping between each LBA and each physical address PBA (physical block address) in units of a predetermined management size called a cluster. A cluster, for example, has a size that is an integer multiple of the size of a sector (also called a logical block) specified by the LBA. An example of a sector size is 512B or 4KiB, and an example of a cluster size is 4KiB. In addition, the cluster size may be larger than 4KiB. In the case where the size of the sector specified by the LBA is smaller than the size of the cluster, bitmap data indicating whether the data of each of the multiple sectors contained in each cluster is valid data or invalid data may be stored in the L2P table 37.
[0052] When using a key stored in a key-value store as a logical area identifier, the mapping information maintained in the L2P table 37 is information indicating the correspondence between, for example, a hash value of each key, a pointer to each key, a unique number corresponding to each key, the size of the value corresponding to each key, and a physical address list including one or more physical addresses storing the value corresponding to each key, but is not limited to this.
[0053] Figure 2 3 is a diagram showing a configuration example of the L2P table 37. Here, a configuration example of the L2P table 37 when a logical address such as LBA is used as a logical area identifier will be described.
[0054] In the L2P table 37, a physical address mapped to a certain logical address indicates the latest physical storage position in the NAND flash memory 5 where data associated with the logical address is written.
[0055] The L2P table 37 includes a plurality of entries corresponding to a plurality of logical addresses. A physical address PBA mapped to a certain logical address is stored in an entry corresponding to the logical address. For example, when the controller 4 writes data associated with a certain logical address to a certain physical storage location in the NAND flash memory 5, the controller 4 updates the L2P table 37 so that the physical address PBA representing the physical storage location is mapped to the logical address.
[0056] Figure 2The example in which physical addresses PBA0, PBA2, PBA1, PBA4, PBA5, and PBA6 are mapped to logical addresses 0x000, 0x001, 0x002, 0x005, 0x006, and 0x007, respectively, is illustrated. When data associated with a certain logical address is not written to the NAND flash memory 5, a predetermined constant (for example, a NULL value) may be stored in the entry corresponding to the logical address.
[0057] return Figure 1 Description. In the NAND flash memory 5, for the data writing work for a page, each time the data erasing work for the block containing the page is performed, the data writing work can only be performed once. That is, new data cannot be directly overwritten in the area within the block where data has been written. Therefore, in the case of updating the data that has been written, the controller 4 writes the new data in the unwritten area within the block (or other blocks), and treats the previous data as invalid data. In other words, in the case of updating the data associated with a logical area identifier, the controller 4 does not write the updated data to the physical storage location where the previous data is stored, but writes it to other physical storage locations. In addition, the controller 4 updates the L2P table 37 so that the physical address representing the other physical storage location is mapped to the logical area identifier and the previous data is invalidated.
[0058] The block management performed by the FTL includes bad block management, wear leveling, and garbage collection.
[0059] Wear leveling is an operation for making the number of rewrites (the number of program / erase cycles) of each block uniform.
[0060] Garbage collection is a process used to reduce the number of blocks containing a mixture of valid data and invalid data and to increase the number of free blocks. A free block is a block that does not contain valid data.
[0061] Valid data refers to the latest data associated with the logical area identifier representing a certain logical area. For example, data stored in the physical storage location referenced by the mapping information maintained by the L2P table 37 (i.e., data managed by the controller 4 as the latest data associated with the logical area identifier) is valid data. In other words, valid data is data that may be read from the host 2 later.
[0062] Invalid data refers to data stored in a physical storage location that is not referenced by the mapping information maintained by the L2P table 37. For example, data stored in a physical storage location represented by a physical address that is not mapped to an arbitrary logical area identifier (i.e., data that is not managed by the controller 4 as the latest data in association with the logical area identifier) is invalid data. Invalid data is data that can no longer be read from the host 2. When data associated with a logical area identifier representing a certain logical area is updated, valid data previously associated with the logical area identifier becomes invalid data, and the updated data becomes new valid data. In addition, even if the mapping release operation described later is performed on the logical area identifier representing a certain logical area, valid data previously associated with the logical area identifier becomes invalid data.
[0063] In garbage collection, the controller 4 selects only valid data in several blocks where valid data and invalid data are mixed, and copies them to other blocks (e.g., free blocks). The controller 4 updates the L2P table 37, and maps the physical address of the copy destination to the logical area identifier associated with the copied valid data. The block that only includes invalid data due to the valid data being copied to other blocks is released as a free block. Thus, after the data erasure operation for the block, the block can be reused for writing data.
[0064] The controller 4 includes, in addition to the above-mentioned NAND interface (I / F) 13, a host interface (I / F) 11, a CPU 12, a DRAM interface (I / F) 14, a direct memory access controller (DMAC) 15, a static RAM (SRAM) 16, and an ECC (Error Correction Code) encoding / decoding unit 17. These host I / F 11, CPU 12, NAND I / F 13, DRAM I / F 14, DMAC 15, SRAM 16, and ECC encoding / decoding unit 17 are connected to each other via a bus 10.
[0065] The host I / F 11 is a host interface circuit configured to perform communication with the host 2. The host I / F 11 may be, for example, a SATA interface controller, a SAS interface controller, a PCIe controller, or an Ethernet controller.
[0066] The host I / F 11 receives various commands from the host 2. ATA commands defined in the ATA standard are used in the SATA interface. SCSI commands defined in the SCSI standard are used in the SAS interface. NVMe commands defined in the NVM Express (NVMe) (registered trademark) standard are used in the PCIe interface and the Ethernet interface. These commands include write commands, read commands, and mapping release commands.
[0067] A write command (write request) is a command for requesting the SSD 3 to write user data (write data) associated with a logical area identifier representing a certain logical area to the NAND flash memory 5. When a combination of a logical address (especially LBA) and a namespace identifier is used as a logical area identifier, the write command may include, for example, a namespace identifier identifying a certain namespace, a logical address (starting LBA) within the namespace, a size of the write data (the number of sectors), and a data pointer (buffer address) indicating a location within the memory of the host 2 storing the write data. The starting LBA indicates the first sector associated with the write data.
[0068] The read command (read request) is a command for requesting the SSD 3 to read data associated with the logical area identifier indicating the logical area specified by the read command from the NAND flash memory 5. The read command in the case of using a combination of a logical address (especially LBA) and a namespace identifier as the logical area identifier may include a namespace identifier identifying a certain namespace, a logical address (starting LBA) in the namespace, the size of the data to be read (the number of sectors), and a data pointer (buffer address) indicating the location in the memory of the host 2 to which the data should be transferred. The starting LBA indicates the first sector associated with the data to be read.
[0069] The mapping release command is a command to request the SSD 3 to invalidate the data associated with the logical area identifier specified by the mapping release command. When a combination of a logical address (especially LBA) and a namespace identifier is used as the logical area identifier, the controller 4 deletes the physical address from each entry of the L2P table 37 corresponding to the logical address range (LBA range) specified by the mapping release command. In this case, the controller 4 may also delete the physical address from each entry by overwriting the NULL value to these entries. Through this mapping release operation, the data associated with each logical address included in the logical address range becomes invalid data.
[0070] The command received from the host 2 also includes a command (hereinafter referred to as a specific command) requesting the SSD 3 to securely erase the data associated with the logical area identifier representing the specific logical area. In the following description, the specific logical area is referred to as the secure erase target logical area. The identifier representing the secure erase target logical area is referred to as the secure erase target logical area identifier. In addition, the data associated with the secure erase target logical area identifier is referred to as the secure erase target data. The secure erase target logical area is a logical area identified by the logical area identifier (secure erase target logical area identifier) specified by the specific command.
[0071] The data to be securely erased includes both data currently associated with the logical area identifier to be securely erased and data previously associated with the logical area identifier to be securely erased. The data currently associated with the logical area identifier to be securely erased means valid data currently associated with the logical area identifier to be securely erased. The data previously associated with the logical area identifier to be securely erased means invalid data that has been invalidated by, for example, updating of data associated with the logical area identifier. In SSD3, since updated data is written to a physical storage location different from a physical storage location where old data is stored, the old data is maintained as invalid data and remains unchanged at the old physical storage location to update the data. The data to be securely erased also includes such invalid data.
[0072] The specific command is, for example, a command that specifies a logical area identifier that identifies a secure erasure target logical area and requests secure erasure of secure erasure target data.
[0073] Alternatively, the specific command may be a command for requesting secure erasure of data to be securely erased without specifying a logical area identifier that identifies the logical area to be securely erased. In this case, the host 2 first sends one or more commands that specify a logical area identifier that identifies the logical area to be securely erased to the SSD 3. Then, the host 2 sends the specific command for requesting secure erasure of data to be securely erased to the SSD 3.
[0074] In the case where the logical area identifier identifying the secure erase target logical area is a namespace identifier, the secure erase target logical area is a namespace identified by the namespace identifier. In this case, the secure erase target data includes both data currently associated with the namespace identified by the namespace identifier and data previously associated with the namespace.
[0075] In this way, when the controller 4 is configured to manage a plurality of namespaces respectively identified by a plurality of namespace identifiers, the namespace identifier can be used as a logical area identifier for identifying a secure erase target namespace.
[0076] In the case where the logical area identifier identifying the logical area to be securely erased is a logical address such as LBA, the logical area to be securely erased is a sector identified by the logical address. In this case, the data to be securely erased includes both data currently associated with the logical address representing the sector and data previously associated with the logical address. In addition, in the case where the controller 4 manages multiple namespaces, a combination of a namespace identifier and a logical address can also be used as a logical area identifier to identify the logical area to be securely erased.
[0077] The specific command can specify one or more logical addresses that identify one or more secure erase object sectors. In this case, the specific command can also specify a logical address range. The logical address range is specified, for example, by a logical address representing the beginning of the secure erase object logical area and the number of sectors starting from the logical address. In the case where multiple logical address ranges are desired to be secure erase objects, the host 2 can first send multiple commands that each specify a secure erase object logical address range to SSD3, and then can send a specific command requesting secure erase of secure erase object data associated with the secure erase object logical address range to SSD3. Of course, the specific command can also include multiple parameters that specify multiple logical address ranges. In this case, when the controller 4 manages multiple namespaces, the combination of the namespace identifier and the logical address range can be used as a logical area identifier that identifies the secure erase object logical area.
[0078] In the case where the controller 4 supports key-value storage, a key of the key-value storage can be used as a logical area identifier for identifying a secure erasure target logical area. In this case, the secure erasure target logical area is a logical area identified by a key. The secure erasure target data includes both data currently associated with the key representing the logical area and data previously associated with the key. A specific command can specify more than one key that identifies more than one secure erasure target logical area.
[0079] In the first embodiment, a combination of a namespace identifier and a logical address (LBA) is used as a logical area identifier specified by an I / O command such as a write command or a read command. The combination of the namespace identifier and the logical address (LBA) specified by the I / O command represents the logical area of the access object. In addition, when the controller 4 supports key-value storage, a key of the key-value storage, or a combination of the namespace identifier and the key represents the logical area of the access object.
[0080] In addition, the specific command may be a command for requesting execution of a secure erase operation accompanied by an Audit function. The Audit function is a function for enabling the host 2 to confirm whether data associated with the logical area identifier specified by the specific command is securely erased (physically securely erased or logically securely erased) from the NAND flash memory 5. Hereinafter, it is assumed that a command for requesting execution of a secure erase operation accompanied by an Audit function is used as the specific command. Details of the Audit function will be described later.
[0081] Figure 3 This is a diagram for explaining multiple namespaces managed in SSD3.
[0082] exist Figure 3In the example, the controller 4 manages namespace NS#1, namespace NS#2, and namespace NS#3. Each namespace is identified by a namespace identifier (NSID). Each namespace includes a set of multiple consecutive logical addresses (LBAs). The logical address range corresponding to each namespace starts from LBA0. Each namespace can be set to any size. The size of each namespace corresponds to the number of LBAs contained in each namespace.
[0083] exist Figure 3 In the example, the case where namespace NS#1 includes multiple consecutive LBAs from LBA0 to LBA(i-1), namespace NS#2 includes multiple consecutive LBAs from LBA0 to LBA(j-1), and namespace NS#3 includes multiple consecutive LBAs from LBA0 to LBA(k-1) is illustrated.
[0084] In the case where multiple namespaces are managed by the controller 4, each logical address (internal logical address inLBA) in an internal logical address space of the SSD 3 and each physical address of the NAND flash memory 5 can be mapped using an L2P table 37. For example, the controller 4 can transform the LBA range (LBA0 to LBA(i-1)) of the namespace NS#1 into the internal logical address range inLBA0 to inLBA(i-1), transform the LBA range (LBA0 to LBA(j-1)) of the namespace NS#2 into the internal logical address range inLBAi to inLBA(i+j-1), and transform the LBA range (LBA0 to LBA(k-1)) of the namespace NS#3 into the internal logical address range inLBA(i+j) to inLBA(i+j+k-1). In addition, the controller 4 uses an L2P table 37 to manage the mapping between each internal logical address and each physical address of the internal logical address range inLBA0 to inLBA(i+j+k-1).
[0085] Alternatively, the L2P table 37 may be created for each namespace.
[0086] return Figure 1Description. CPU12 is a processor configured to control host I / F11, NAND I / F13, DRAM I / F14, DMAC15, SRAM16, and ECC encoding / decoding unit 17. In response to the startup of SSD3, CPU12 loads a control program (firmware) from NAND flash memory 5 or ROM (not shown) to SRAM16, and performs various processes by executing the firmware. In addition, the firmware can also be loaded into DRAM6. CPU12 can perform command processing for processing various commands from host 2. The operation of CPU12 is controlled by the above-mentioned firmware. In addition, part or all of the command processing can also be performed by dedicated hardware in controller 4.
[0087] This firmware causes the CPU 12 to function as a namespace management unit 21 , a write control unit 22 , a read control unit 23 , and an erase control unit 24 .
[0088] The namespace management unit 21 creates, manages, deletes, etc. a namespace based on a namespace management command received from the host 2 .
[0089] The write control unit 22 processes a write command received from the host 2 via the host I / F 11. The write command specifies a logical area identifier (e.g., a name space identifier (NSID), a start LBA), the size of the write data, etc. The write control unit 22 writes the write data associated with the write command received from the host 2 via the host I / F 11 to the NAND flash memory 5 via the NAND I / F 13. Furthermore, the write control unit 22 updates the L2P table 37 so that each LBA associated with the write data and the physical address to which the write data is written are mapped.
[0090] The write control unit 22 may write the write data together with the logical area identifier (e.g., LBA) associated with the write data into the NAND flash memory 5. In this case, the logical area identifier may be written in the same block as the block in which the data is written. In particular, the logical area identifier may be written in the same page as the page in which the data is written.
[0091] The read control unit 23 processes a read command received from the host 2 via the host I / F 11. The read command specifies a logical area identifier (e.g., a name space identifier (NSID), a start LBA), the size of the read target data, etc. The read control unit 23 obtains a physical address where the read target data is stored by referring to the L2P table 37. The read control unit 23 reads the read target data from the NAND flash memory 5 via the NAND I / F 13.
[0092] When write data and a logical area identifier associated with the write data are written to the NAND flash memory 5, the read control unit 23 may read the read target data and the logical area identifier associated with the read target data from the NAND flash memory 5. When the logical area identifier specified by the read command and the logical area identifier read from the NAND flash memory 5 do not match, the read control unit 23 may determine that the read target data read is abnormal data.
[0093] The erase control unit 24 performs secure erasure of the secure erasure target data associated with the secure erasure target logical area identifier by a physical secure erasure method according to a specific command received from the host 2 via the host I / F 11. After executing the secure erasure operation, the erase control unit 24 changes to an audit mode. The audit mode is an operation mode for executing an audit function for a read command requesting to read data associated with the secure erasure target logical area identifier. In order to execute the secure erasure operation accompanied by the audit function, the erase control unit 24 includes a mapping information copying unit 241, a mapping release unit 242, a garbage collection (GC) unit 243, a secure erasure unit 244, and an audit function execution unit 255.
[0094] The mapping information copying unit 241 holds a copy of the mapping information corresponding to the secure erasure target logical area among the mapping information included in the L2P table 37. The copy of the mapping information is backup information indicating the mapping information corresponding to the secure erasure target logical area before the secure erasure operation for the secure erasure target logical area is about to start. The mapping information copying unit 241 holds a copy of the mapping information corresponding to the secure erasure target logical area by copying the mapping information corresponding to the secure erasure target logical area from the L2P table 37 to the NAND flash memory 5 or the volatile memory (e.g., SRAM 16 or DRAM 6) in the SSD 3. Even if the mapping information of the L2P table 37 is changed after the copy due to each of the mapping release operation and the garbage collection operation, the copy of the mapping information is not changed, and the content at the time of the copy is maintained.
[0095] The demapping unit 242 performs a demapping operation to invalidate the secure erase target data. For example, the demapping unit 242 deletes all physical addresses currently mapped to the secure erase target logical area identifier from the L2P table 37, thereby invalidating the secure erase target data.
[0096] The GC unit 243 selects each block storing the secure erase target data and the valid data in the data other than the secure erase target data as the GC target block (copy source block). The secure erase target data in the valid data in the copy source block is invalidated by the mapping release operation. Therefore, the valid data in the data other than the secure erase target data is the remaining valid data in the copy source block, that is, the valid data associated with the other logical area identifiers other than the secure erase target logical area identifier. The GC unit 243 performs a copy operation of only copying the valid data in the data other than the secure erase target data from the copy source block to the copy destination block. Through the mapping release operation and the copy operation, the copy source block becomes an idle block that does not store any valid data.
[0097] After executing the copy operation, the secure erase unit 244 executes a data erase operation on all blocks storing the secure erase target data including at least the copy source block. Thus, the secure erase unit 244 performs secure erase on the secure erase target data using a physical secure erase method.
[0098] The operation of storing a copy of the mapping information corresponding to the secure erase target logical area by the mapping information copying unit 241 may be performed before or during the execution of the mapping release operation in the secure erase operation.
[0099] In the latter case, when the mapping release unit 242 deletes the physical address mapped to the logical area identifier of the secure erase target (the physical address of the deletion target) from the mapping information of the L2P table 37, the mapping information copy unit 241 may also save a copy of a part of the mapping information of the L2P table 37 including the physical address of the deletion target in the volatile memory in the NAND flash memory 5 or the SSD 3. For example, consider the case where the mapping release unit 242 invalidates the data associated with LBA100 in the logical area identifier of the secure erase target. In this case, when the mapping release unit 242 deletes the mapping information including the physical address PBA mapped to LBA100 from the mapping information of the L2P table 37, the mapping information copy unit 241 obtains the mapping information including the physical address PBA of the deletion target from the L2P table 37 and saves it in the volatile memory in the NAND flash memory 5 or the SSD 3.
[0100] In addition, the mapping release operation may also be performed during the execution of the garbage collection operation. In this case, the mapping information copying unit 241 may also save a copy of the mapping information corresponding to the logical area to be securely erased in a block that has become a free block during the execution of the garbage collection operation in the secure erase operation. Thus, even when a quantity of data corresponding to the capacity of the SSD 3 is written to the non-volatile memory 5, a copy of the mapping information corresponding to the logical area to be securely erased can be maintained without suppressing the storage area of the volatile memory in the SSD 3.
[0101] After executing the secure erase, the Audit function execution unit 245 causes the controller 4 to switch to the Audit mode. First, the Audit function execution unit 245 receives a specific command from the host 2 and stores the logical area identifier (also referred to as the first logical area identifier) included in the specific command. For example, the Audit function execution unit 245 stores the first logical area identifier in the SRAM 16 or the DRAM 6 to store the first logical area identifier. After completing the secure erase operation, the Audit function execution unit 245 causes the controller 4 to switch to the Audit mode.
[0102] In the audit mode, upon receiving a read command specifying the first logical area identifier from the host 2, the controller 4 obtains the physical address mapped to the first logical area identifier as the logical area identifier of the secure erasure target from the copy of the mapping information, not from the L2P table 37. Furthermore, the controller 4 reads data from a physical storage location in the NAND flash memory 5 corresponding to the obtained physical address, and sends the read data to the host 2. As described below, the data read from the physical storage location is, for example, initial data, valid data that is not a secure erasure target for overwriting, data having a specific data pattern, or abnormal data.
[0103] In addition, regardless of whether the controller 4 is in the audit mode, the controller 4 obtains the physical address mapped to the other logical area identifier from the mapping information of the L2P table 37 in response to receiving a read command specifying another logical area identifier indicating another logical area other than the first logical area from the host 2. The controller 4 then reads data from the physical storage location in the NAND flash memory 5 corresponding to the obtained physical address and sends the read data to the host 2.
[0104] In addition, the audit function execution unit 245 discards the retained copy of the first logical area identifier and mapping information in response to receiving a command requesting the end of the audit mode or a write command designating the first logical area identifier from the host 2. The audit function execution unit 245 causes the controller 4 to exit the audit mode.
[0105] The other components in the controller 4 are described.
[0106] The NAND I / F 13 is a NAND controller configured to control the NAND flash memory 5 under the control of the CPU 12 .
[0107] The DRAM I / F 14 is a DRAM controller configured to control the DRAM 6 under the control of the CPU 12 .
[0108] Part of the storage area of DRAM 6 can be used as a write buffer 31, a read buffer 32, and a command buffer 33. In addition, part of the storage area of DRAM 6 can be used as an area for storing a secure erase target block list 34, a free block list 35, a live block list 36, and an L2P table 37.
[0109] The write buffer 31 temporarily stores data to be written in the NAND flash memory 5 .
[0110] The read buffer 32 temporarily stores data read from the NAND-type flash memory 5 .
[0111] The command buffer 33 temporarily stores the command received from the host 2 before executing the command.
[0112] The secure erase target block list 34 stores the block identifier of each block storing secure erase target data.
[0113] The free block list 35 stores the block identifier of each free block. A free block is a block that does not store valid data.
[0114] The live block list 36 stores the block identifier of each live block. A live block is a block that stores valid data.
[0115] The ECC encoding / decoding unit 17 performs encoding and decoding of data. For example, the ECC encoding / decoding unit 17 performs encoding of data and generates an error correction code during a write operation. The ECC encoding / decoding unit 17 adds an error correction code to user data and generates a code word that is the object of the write operation. The ECC encoding / decoding unit 17 performs decoding during a read operation. That is, the ECC encoding / decoding unit 17 uses the error correction code to perform error correction of the code word read from the NAND flash memory 5 and restore the user data.
[0116] Next, an operation of safely and securely erasing data using a physical secure erasure method (hereinafter referred to as a physical secure erasure operation) will be described.
[0117] Figure 4The following is an overview of the write operation and the physical security erase operation executed in the SSD 3. Before describing the physical security erase operation, the write operation will be described first.
[0118] The write control unit 22 writes the write data to the write buffer 31. When the write destination block 56 is not allocated, the write control unit 22 selects one of the free blocks managed by the free block list 35, performs block erasure on the selected free block, and allocates the block-erased free block as the write destination block 56.
[0119] The write control unit 22 writes the write data in the write buffer 31 to the writable page of the write destination block 56. The write control unit 22 updates the L2P table 37. When the write data is written to the write destination block 56, the write destination block 56 becomes a block partially written with valid data (hereinafter also referred to as a write-in-progress block). Since the write-in-progress block also stores valid data, it is managed as an active block.
[0120] When the write destination block 56 is full of write data and there are no writable pages in the write destination block 56, the write control unit 22 allocates a new free block as the write destination block and writes the write data in the write buffer 31 to the writable pages of the newly allocated write destination block.
[0121] Next, the mapping removal operation and the garbage collection operation performed in the physical secure erase operation will be described.
[0122] When receiving a specific command instructing secure erasure of data associated with a logical area identifier from the host 2, the mapping release unit 242 performs a mapping release operation so that one or more physical addresses mapped to each of all logical area identifiers specified by the specific command are deleted from the mapping information of the L2P table 37. In other words, the mapping release unit 242 invalidates the secure erasure target data. Thus, all secure erasure target data becomes invalid data. The live blocks without valid data are removed from the live block list 36 and are instead managed by the free block list 35.
[0123] Furthermore, the GC unit 243 performs a garbage collection operation. In the garbage collection operation, the GC unit 243 copies only the remaining valid data after the secure erasure target data is invalidated from the one or more first blocks storing the secure erasure target data to the one or more copy destination blocks. The secure erasure target data is invalidated by the mapping release unit 242, so the remaining valid data stored in the one or more first blocks is valid data in the data associated with the logical area identifier indicating the other logical area other than the secure erasure target logical area, that is, valid data not to be securely erased.
[0124] Thus, the active block group does not include blocks in which the data to be securely erased and valid data other than the data to be securely erased are mixed. Since the remaining valid data is copied, one or more first blocks (copy source blocks) no longer include valid data and are considered as free blocks. Therefore, one or more first blocks are removed from the active block list 36 and are instead managed by the free block list 35.
[0125] Next, a detailed example of the garbage collection work performed by the GC unit 243 is described. The secure erase target data is, for example, any of (i) data (user data) of the secure erase target namespace identified by the namespace identifier when only the namespace identifier is specified by the specific command, (ii) data of the logical area identified by the namespace identifier and the LBA range when a combination of the namespace identifier and the LBA range is specified by the specific command, and (iii) a value identified by the key of the key-value storage when the specific command specifies the key.
[0126] The GC unit 243 selects a live block storing data to be subject to secure erasure as a copy source block 52. A live block storing data to be subject to secure erasure is a block including data to be subject to secure erasure and valid data not subject to secure erasure.
[0127] The GC unit 243 selects one of the free blocks managed by the free block list 35. The GC unit 243 may also preferentially select a free block generated during the execution of a garbage collection operation (copy operation) performed by the GC unit 243. The GC unit 243 performs block erasure on the selected free block. Furthermore, the GC unit 243 allocates the free block that has been block-erased as the copy destination block 54.
[0128] The GC unit 243 copies the remaining valid data stored in the copy source block 52, that is, the valid data that is not the target of secure erasure, from the copy source block 52 to the copy destination block 54. The GC unit 243 updates the L2P table 37, and maps the physical address of the physical storage location of the copy destination where the valid data is copied to the logical area identifier of the copied valid data. The secure erasure target data in the copy source block 52 remains in the unmapped state. The copy destination block 54 where the valid data is copied becomes a live block and is managed by the live block list 36.
[0129] When the write data and the logical area identifier associated with the write data are written to the copy source block 52, the GC unit 243 may read out the valid data of the copy object and the logical area identifier associated with the data from the copy source block 52 and copy them to the copy destination block 54. The logical area identifier may also be copied to the same page as the page to which the data is copied.
[0130] When the copying of all valid data in the copy source block 52 is completed, the copy source block 52 becomes a free block and is managed by the free block list 35 .
[0131] The GC unit 243 selects another active block storing the data to be securely erased as a new copy source block 52. The GC unit 243 copies the valid data not to be securely erased from the new copy source block 52 to the copy destination block 54. The GC unit 243 updates the L2P table 37, mapping the physical address of the physical storage location of the copy destination where the valid data is copied to the logical area identifier of the copied valid data. The data to be securely erased in the copy source block 52 remains in the unmapped state.
[0132] When the copy destination block 54 is full of data, that is, when there is no page that can be written in the copy destination block 54, the GC unit 243 selects one of the free blocks managed by the free block list 35. The GC unit 243 performs block erasure on the selected free block. The GC unit 243 allocates the free block that has been block erased as a new copy destination block 54.
[0133] Since the copy source block that has completed the copy of valid data is managed as a free block by the free block list 35, it can be reused as the copy destination block 54. The GC unit 243 can also select the copy source block that has become a free block through copying as the copy destination block. In this case, the GC unit 243 performs block erasure on the selected block. As a result, the secure erasure object data in the copy source block that has become a free block through copying is erased. The GC unit 243 allocates the block that has been block erased as a new copy destination block 54. In addition, the GC unit 243 copies the valid data that is not a secure erasure object from the copy source block 52 to the copy destination block 54. In this way, the copy source block that has become a free block is reused as the copy destination block 54, and thus, the secure erasure object data in the copy source block is erased by block erasure, and then overwritten by the valid data that is not a secure erasure object.
[0134] In this way, the GC unit 243 performs block erasure on at least the copy source block that has become a free block that does not store valid data due to copying.
[0135] When the garbage collection work for all live blocks storing the secure erasure target data is completed, the secure erasure target data does not exist in any block other than the free block.
[0136] Next, an example of the above-mentioned block erase operation executed in the physical security erase operation will be described.
[0137] After executing the garbage collection operation, the secure erase unit 244 performs block erase on at least one first free block storing secure erase target data among the free blocks managed by the free block list 35 .
[0138] Here, the one or more first free blocks include (i) one or more blocks not used as copy destination blocks among the one or more copy source blocks that have become free blocks without valid data due to copying, and (ii) one or more free blocks not used as copy destination blocks among the free blocks that exist before the garbage collection operation starts and store invalid data in the secure erase target logical area. The invalid data in the secure erase target logical area in (ii) includes data in the secure erase target logical area that has been invalidated before the physical secure erase operation starts.
[0139] The secure erase unit 244 finds out the free blocks that match (i) and the free blocks that match (ii) from the free blocks managed by the free block list 35, and performs block erase on at least each of the found free blocks. Alternatively, the secure erase unit 244 may also perform block erase on at least each of all the free blocks managed by the free block list 35.
[0140] As a result, the secure erasure target data stored in each block remaining as a free block after the garbage collection operation is securely erased by at least block erasure. In addition, the secure erasure target data stored in several blocks reused as copy destination blocks is securely erased by overwriting (that is, block erasure + overwriting based on valid data not targeted for secure erasure).
[0141] In addition, after executing the garbage collection operation, the secure erasing unit 244 may perform block erasure on each free block storing the secure erasing target data, and then write a specific data pattern such as all 0s or all 1s or a combination thereof to each free block. In addition, the secure erasing unit 244 may also generate and write an error correction code corresponding to the specific data pattern. Furthermore, the secure erasing unit 244 may also write the logical area identifier written before the block erasing into the block that has been block-erased. Thus, all the secure erasing target data is securely erased by block erasing and overwriting based on the specific data pattern.
[0142] Next, the Audit function is explained. As described above, when the secure erasure object data is securely erased by block erasure or overwriting, the physical storage location storing the secure erasure object data stores data of other logical areas or is in an erased state. In order to confirm whether the secure erasure of the secure erasure object data has been performed normally, the host 2 can issue a read command specifying the secure erasure object logical area identifier. The controller 4 that has switched to the Audit mode reads data from the physical storage location storing the secure erasure object data based on the read command, and sends the read data to the host 2. As described below, the data read from the physical storage location is, for example, initial data, valid data of a non-secure erasure object for overwriting, data having a specific data pattern, or abnormal data.
[0143] In order to realize the audit function, the audit function execution unit 245 holds the secure erasure target logical area identifier when receiving a specific command requesting a secure erasure operation accompanied by the audit function. The mapping information copy unit 241 holds a copy of the mapping information corresponding to the secure erasure target logical area before the mapping release operation based on the specific command. The mapping information copy unit 241 stores the copy of the mapping information corresponding to the secure erasure target logical area in a free block as valid management data, for example.
[0144] The audit function execution unit 245 causes the controller 4 to shift to the audit mode after executing the secure erase operation based on a specific command requesting the secure erase operation accompanied by the audit function.
[0145] Furthermore, when the controller 4 receives a read command from the host 2 during the audit mode, it determines whether the logical area identifier included in the received read command is the same as the retained secure erase target logical area identifier. When the read command includes a logical area identifier different from the retained secure erase target logical area identifier, the controller 4 reads data from a physical storage location in the NAND flash memory 5 corresponding to the physical address indicated by the mapping information of the L2P table 37, and sends the read data to the host 2. Thus, the controller 4 can normally process a read command that specifies a logical area other than the secure erase target logical area.
[0146] On the other hand, when the received read command includes a logical area identifier that is identical to the logical area identifier of the secure erase object being maintained, the controller 4 reads data from a physical storage location within the NAND flash memory 5 corresponding to the physical address represented by the copy of the mapping information stored by the mapping information copying unit 241, and sends the read data to the host 2.
[0147] In the case where the physical storage location represented by the physical address is in an erased state, or a specific data pattern is overwritten without an error correction code corresponding to the specific data pattern at the physical storage location, error correction may fail in the ECC encoding / decoding unit 17. This is because the correct codeword of the group including data and an error correction code matching the data is not stored at the physical storage location. In this case, the controller 4 can send the data itself (i.e., the data before error correction) read from the physical storage location in the NAND flash memory 5 to the host 2. The data is, for example, initial data (e.g., all 1 data) when the physical storage location is in an erased state, and a specific data pattern used for overwriting when the physical storage location is overwritten. Alternatively, the controller 4 can also send the occurrence of an uncorrectable error to the host 2 as a completion response corresponding to the received read command.
[0148] When the physical storage location indicated by the physical address is reused as the copy destination block 54, or when the specific data pattern and the error correction code corresponding thereto are overwritten at the physical storage location without including the logical area identifier, the logical area identifier mapped to the physical address indicated by the copy of the mapping information and the logical area identifier read from the physical storage location together with the data do not match. In this case, the controller 4 sends a notification to the host 2 that the read data is abnormal as a completion response corresponding to the received read command.
[0149] When the completion response received from the SSD 3 indicates an error (uncorrectable error or abnormal data), the host 2 can confirm that the secure erasure of the secure erasure target data is normally performed. Alternatively, when the data received from the SSD 3 is different from the secure erasure target data, the host 2 can confirm that the secure erasure of the secure erasure target data is normally performed. The host 2 can detect that the data received from the SSD 3 and the secure erasure target data are different data by, for example, maintaining a hash value for each data associated with each logical area identifier.
[0150] When the controller 4 receives a write command from the host 2 during the audit mode, it determines whether the logical area identifier included in the received write command is the same as the stored secure erase target logical area identifier. If the write command includes a logical area identifier different from the stored secure erase target logical area identifier, the controller 4 writes the data associated with the write command to the write destination block 56 and updates the mapping information of the L2P table 37. At this time, the copy of the mapping information stored by the mapping information copying unit 241 is not updated but maintained.
[0151] On the other hand, when the write command includes the same logical area identifier as the stored secure erase target logical area identifier, the controller 4 discards the stored secure erase target logical area identifier and the copy of the mapping information, and exits the audit mode. After that, the controller 4 writes the data associated with the write command to the write destination block 56, and updates the mapping information of the L2P table 37. Thus, when the read command received later specifies the same logical area identifier as the secure erase target logical area identifier, the controller 4 can read the update data newly written to the write destination block 56, and send the read update data to the host 2.
[0152] Furthermore, when receiving a command instructing the end of the audit mode from the host 2, the controller 4 discards the copies of the secure erasure target logical area identifier and mapping information that are held, and then exits the audit mode.
[0153] In this way, the Audit function for the secure erasure target data is realized. In addition, for the target data of the Audit function, only the secure erasure target data associated with the secure erasure target logical area identifier is sufficient when a specific command is received. Therefore, the secure erasure target data previously associated with the secure erasure target logical area identifier is not the target of the Audit function.
[0154] Hereinafter, it is assumed that a first specific command is used as the above-mentioned specific command to request a secure erase operation for data in a specific namespace. For the first specific command, a namespace identifier (NSID) that identifies a specific namespace is used as a logical area identifier representing a logical area to be securely erased. In addition, the first specific command requests execution of a secure erase operation accompanied by an audit function.
[0155] Figure 5 This is a flowchart showing the procedure of the physical secure erase operation executed in the storage system according to the first embodiment.
[0156] When the controller 4 receives a command from the host computer 2 (step S102 ), the CPU 12 determines whether the received command is a first specific command (step S104 ).
[0157] When the received command is not the first specific command (No in step S104 ), the CPU 12 executes a process corresponding to the received command (step S106 ).
[0158] When the received command is the first specific command (Yes in step S104 ), the audit function execution unit 245 stores the NSID included in the received first specific command as the NSID of the specific namespace (secure erase target namespace) (step S108 ).
[0159] The mapping information copy unit 241 stores a copy of the mapping information corresponding to the secure erase target namespace (step S110). Specifically, the mapping information copy unit 241 stores a copy of the mapping information corresponding to the secure erase target namespace among the mapping information stored in the L2P table 37 in the NAND flash memory 5, SRAM 16, or DRAM 6.
[0160] The unmapping unit 242 executes an unmapping operation to invalidate all data in the secure erase target namespace (step S112 ).
[0161] In step S112, for example, the mapping release unit 242 deletes the physical address from each entry of the L2P table 37 corresponding to all LBAs of the secure erase target namespace. Alternatively, the mapping release unit 242 stores a NULL value in these entries. Through this mapping release operation, all clusters corresponding to the secure erase target namespace become invalid in the L2P table 37. That is, the data associated with all clusters corresponding to the secure erase target namespace is internally recognized as discardable data. As a result, all data in the secure erase target namespace becomes invalid data.
[0162] Here, although the case where the copying operation of the mapping information in step S110 and the de-mapping operation in step S112 are performed in different orders is described, these operations may be performed simultaneously. In this case, the mapping information copying unit 241 may copy the mapping information corresponding to the logical area to be de-mapping to the NAND flash memory 5, SRAM 16, or DRAM 6 immediately before performing the de-mapping operation.
[0163] When all data stored in a live block is data to be securely erased, the live block becomes a free block storing only invalid data at the end time of the mapping release operation.
[0164] When a live block stores both secure erase target data and valid data in a non-secure erase target namespace, at the end time of the mapping release operation, the live block stores invalid data in the secure erase target data and valid data in the non-secure erase target namespace.
[0165] The GC unit 243 performs a garbage collection operation (GC operation) so that blocks containing a mixture of secure erase target data (invalid data) and valid data in a namespace not intended for secure erase disappear from the active block group (step S114 ).
[0166] The GC unit 243 selects at least all live blocks storing invalid data of the secure erase object namespace as GC object blocks (i.e., copy source blocks). Live blocks storing invalid data of the secure erase object namespace are blocks storing invalid data of the secure erase object namespace and valid data of the non-secure erase object namespace. Alternatively, in the case of simply implementing the garbage collection work, the GC unit 243 may select at least all live blocks storing invalid data as copy source blocks regardless of whether they are invalid data of the secure erase object namespace. Live blocks storing at least invalid data are blocks storing invalid data and valid data of the non-secure erase object namespace.
[0167] The GC unit 243 may store the block identifier of each active block selected as the copy source block in the secure erase target block list 34 .
[0168] The GC unit 243 can be based on, for example, Figure 6 By using the information shown, you can check which namespace data is stored in each block.
[0169] Figure 6 An example of a data structure that represents the data written to a block. Figure 6 In the example of (a), a pair of namespace identifier and LBA and data identified by the pair are written to each page. Therefore, the GC unit 243 can determine whether the block containing the page stores data in the secure erase target namespace by reading the pair of namespace identifier and LBA of each page.
[0170] In other examples of data structures written to blocks, such as Figure 6 As shown in (b), Figure 6 In addition to the information of (a), a list of namespace identifiers of the namespace associated with the data stored in the block is written to an arbitrary page (e.g., the last page). Therefore, the GC unit 243 can determine whether the block stores data in the secure erase target namespace by reading only the pages of each block storing the list without reading all the pages of each block. In addition, the list of namespace identifiers and the list of LBAs associated with the data stored in the block can also be written to an arbitrary page of the block.
[0171] return Figure 5The GC unit 243 selects any one free block from the free blocks. The GC unit 243 performs block erasure on the selected free block. The GC unit 243 allocates the free block that has been block-erased as the copy destination block 54.
[0172] The GC unit 243 copies valid data among data other than the secure erase target data, that is, valid data in the non-secure erase target namespace, from the copy source block 52 to the copy destination block 54. The GC unit 243 updates the L2P table 37 to map each LBA of the valid data in the non-secure erase target namespace and each physical address of the copy destination.
[0173] When copying the valid data of the non-secure erase object namespace, the valid data of the non-secure erase object namespace in the copy source block 52 becomes invalid data. Since all LBAs of the secure erase object namespace are not mapped before copying, all data in the copy source block 52 becomes invalid data after the copying operation is performed. That is, when all valid data of the non-secure erase object namespace stored in the copy source block 52 is copied to the copy destination block, the copy source block 52 becomes a free block. Therefore, when all valid data of the non-secure erase object namespace in all copy source blocks is copied to several copy destination blocks, the secure erase object data does not exist outside the free blocks. In other words, the invalid data of the secure erase object namespace will only exist in several free blocks.
[0174] The GC unit 243 determines whether the end condition of the garbage collection operation has been satisfied (step S122). When all the valid data of the non-secure erase target namespace is copied from the block where the data of the secure erase target namespace and the valid data of the non-secure erase target namespace are mixed, the secure erase target data (invalid data of the secure erase target namespace) disappears from the active block. That is, the invalid data of the secure erase target namespace will only exist in the free block. Therefore, the end condition can be set to that the block storing the invalid data of the secure erase target namespace no longer exists in the active block group.
[0175] Until the block storing invalid data of the secure erase target namespace no longer exists in the active block group, the GC unit 243 continues to perform the GC work of step S114 ("No" in step S122, step S114).
[0176] When the end condition of the garbage collection operation is satisfied (Yes in step S122), the GC unit 243 ends the GC operation. At this point in time, there is no possibility that invalid data in the secure erase target namespace exists outside the free blocks.
[0177] The secure erasing unit 244 performs a block erasing operation on at least each free block storing invalid data of the secure erasing target namespace (step S124). The copy source blocks reused as copy destination blocks have been block erased by the garbage collection operation of step S114. Therefore, by combining the block erasing operation on each copy source block performed in step S114 with the block erasing operation of step S124, all data of the secure erasing target namespace is securely erased by block erasing.
[0178] In step S124, the secure erasure unit 244 may perform block erasure on each free block storing invalid data of the secure erasure object namespace, and then write a specific data pattern to each of these free blocks. As a result, the invalid data of the secure erasure object namespace stored in each free block is overwritten by the specific data pattern. In the case where the copy source block is reused as a copy destination block, the invalid data of the secure erasure object namespace stored in the copy source block has been overwritten by valid data of other namespaces through the garbage collection work of step S114. Therefore, by combining the overwriting in step S114 and the overwriting in step S124, all data of the secure erasure object namespace is securely erased by overwriting.
[0179] The secure erase unit 244 may perform block erase on all free blocks. This makes it possible to easily implement the process of step S124 of performing block erase on at least each free block storing invalid data in the secure erase target name space.
[0180] Alternatively, in order to reduce the number of blocks to be block erased, the secure erase unit 244 may determine one or more free blocks storing invalid data in the secure erase target namespace and perform block erase only on the determined one or more free blocks.
[0181] In either the former or the latter, at least one or more free blocks storing invalid data in the secure erase target namespace become the target of the physical secure erase operation.
[0182] In the latter case, and in the case where only live blocks storing invalid data of the secure erase target namespace are used as GC target blocks in step S114, the secure erase unit 244 can classify the free blocks existing at the start time point of step S124 into group I of free blocks generated by the GC work of step S114 (i.e., the group of blocks managed by the secure erase target block list 34) and group II of free blocks other than these. The secure erase unit 244 can easily determine the free blocks storing invalid data of the secure erase target namespace without checking the contents of each free block belonging to group I. The secure erase unit 244 can determine whether each free block is a free block storing invalid data of the secure erase target namespace by checking the contents of each free block belonging to group II.
[0183] When the process of step S124 is completed, the erase control unit 24 transmits a response indicating the completion of the first specific command to the host 2, thereby notifying the host 2 of the completion of the first specific command (step S126).
[0184] Then, the Audit function execution unit 245 executes the Audit function (step S128). In step S128, the controller 4 uses the NSID stored in step S108 and the copy of the mapping information stored in step S110 to send data that can confirm whether the secure erase is normally executed to the host 2 according to the read command issued from the host 2. For details of the sequence of step S128, refer to Fig. 7A as well as Figure 7B The flowchart is used to illustrate.
[0185] Fig. 7A This is a flowchart showing a partial procedure of processing related to the audit function executed in the storage system according to the first embodiment. Figure 7B This is a flowchart showing the remaining procedures of the processes related to the Audit function.
[0186] In reference Figure 5 When the completion of the first specific command is notified to the host 2 in step S126 described above, Fig. 7A As shown, the Audit function execution unit 245 causes the controller 4 to shift to the Audit mode (step S302).
[0187] The controller 4 determines whether a command is received from the host 2 (step S304).
[0188] When no command is received from the host computer 2 (No in step S304 ), the controller 4 waits until a command is received.
[0189] Upon receiving a command from the host 2 (YES in step S304 ), the controller 4 determines whether the received command is a read command (step S306 ).
[0190] If the received command is a read command ("Yes" in step S306), the controller 4 determines whether the NSID included in the received read command matches the reference NSID. Figure 5 The NSID of the secure erase target namespace stored in step S108 described above is consistent (step S308). In addition, the controller 4 may also exchange the execution order of step S306 and step S308. In this case, the controller 4 may also omit the processing of step S320.
[0191] When the NSID contained in the received read command is inconsistent with the NSID of the secure erase object namespace ("No" in step S308), the controller 4 refers to the mapping information of the L2P table 37 and obtains the physical address mapped to the logical address contained in the received read command from the mapping information of the L2P table 37 (step S310).
[0192] The controller 4 reads data from the physical storage location in the NAND flash memory 5 indicated by the physical address obtained in step S310, sends the read data to the host 2 (step S312), and the processing of the controller 4 returns to step S304. That is, the controller 4 waits until receiving the next command.
[0193] When the NSID included in the received read command is consistent with the NSID of the secure erase target namespace ("Yes" in step S308), the controller 4 refers to the copy of the mapping information stored in step S110, and obtains the physical address mapped to the logical address included in the received read command from the copy of the mapping information (step S314). The copy of the mapping information stores the physical address mapped to the logical address before the secure erase operation starts.
[0194] The controller 4 reads data from the physical storage location in the NAND flash memory 5 indicated by the physical address acquired in step S314, and transmits the read data to the host 2 (step S316). Then, the processing of the controller 4 returns to step S304.
[0195] If the received command is not a read command ("No" in step S306), Figure 7B As shown, the controller 4 determines whether the received command is a write command (step S318).
[0196] When the received command is a write command (Yes in step S318 ), the controller 4 determines whether the NSID included in the received write command is consistent with the NSID corresponding to the secure erase target namespace stored in step S108 (step S320 ).
[0197] When the NSID included in the write command does not match the NSID of the secure erase target namespace (No in step S320), the controller 4 writes the data associated with the write command into the NAND flash memory 5 (step S322).
[0198] The controller 4 updates the mapping information of the L2P table 37 so that the physical address representing the physical storage location where the data associated with the write command is written is mapped to the logical address specified by the write command (step S324). And, the processing of the controller 4 returns to Fig. 7A Step S304.
[0199] When the NSID included in the write command is consistent with the NSID of the secure erase object namespace ("Yes" in step S320), the controller 4 discards the copy of the mapping information and the NSID of the secure erase object namespace (step S326). In addition, the controller 4 exits from the Audit mode (step S328) and ends the Audit function. After exiting from the Audit mode, the controller 4 writes the data associated with the write command to the NAND flash memory 5 (step S330). The controller 4 updates the mapping information of the L2P table 37 so that the physical address representing the physical storage location where the data associated with the write command is written is mapped to the logical address specified by the write command (step S332).
[0200] When the received command is not a write command (No in step S318 ), the controller 4 determines whether the received command is an audit mode end command (step S334 ).
[0201] When the received command is an Audit mode end command ("Yes" in step S334), the controller 4 discards the copy of the mapping information and the NSID of the secure erase object namespace (step S336), exits from the Audit mode (step S338), and ends the Audit function.
[0202] When the received command is not the audit mode end command (No in step S334 ), the controller 4 executes command processing based on the received command (step S340 ).
[0203] Next, the response to an I / O command when a first specific command requesting secure erasure of data in a specific namespace is received will be described. Examples of I / O commands include a write command, a read command, and a map release command.
[0204] First, the response to an I / O command that has been received and not completed before the first specific command is received will be described.
[0205] During the processing of the first specific command, a copy of the mapping information corresponding to the secure erase target area and a mapping release operation to invalidate the secure erase target data are performed. Therefore, in order to prevent the mapping information corresponding to the secure erase target logical area from being updated by the processing of the I / O command during the processing of the first specific command, the controller 4 terminates the uncompleted write command for the secure erase target area (here, the secure erase target namespace) and the uncompleted mapping release command for the secure erase target namespace.
[0206] Alternatively, the controller 4 may wait for the completion of the processing of the uncompleted write command or the uncompleted mapping release command, and start executing the first specific command after the processing of these commands is completed. In particular, if the processing of these commands is about to be completed, the controller 4 may not terminate these commands, and start executing the first specific command after the processing of these commands is completed.
[0207] Figure 8 This is a flowchart showing the procedure for processing an I / O command that has been received and not completed before receiving the first specific command.
[0208] The controller 4 receives a first specific command requesting secure erasure of data in a specific namespace from the host 2 (step S702). The controller 4 determines whether there is an I / O command in execution for the specific namespace (secure erasure target namespace) or an I / O command that has been received but has not yet started execution (hereinafter, these I / O commands are also referred to as uncompleted commands) for the secure erasure target namespace (step S704).
[0209] If there is an unfinished command for the secure erase target namespace ("Yes" in step S704), the controller 4 determines whether the unfinished command is a command that causes an update of the mapping information corresponding to the secure erase target logical area (such as a write command or a mapping release command) (step S706).
[0210] In a case where the uncompleted command is a command causing update of mapping information (Yes in step S706 ), the controller 4 determines whether the processing of the command is about to be completed (step S708 ).
[0211] If the processing of the command is not about to be completed (No in step S708), the controller 4 terminates the unfinished command (step S712). In step S712, if the commands received from the host 2 are not allowed to be executed in any order (Out of order), for example, if a write command is terminated, the controller 4 terminates all subsequent I / O commands received from the host 2 after receiving the write command.
[0212] After terminating the unfinished command, the controller 4 starts executing the first specific command (step S714).
[0213] When the processing of the unfinished command is about to be completed ("Yes" in step S708), the controller 4 may not terminate the unfinished command, but wait for the completion of the processing of the unfinished command (step S710, "No" in step S710). And, in response to the completion of the processing of the unfinished command ("Yes" in step S710), the controller 4 starts executing the first specific command (step S714).
[0214] When the unfinished command for the secure erase target namespace is neither a write command nor a mapping release command, for example, when there is an unfinished read command for the secure erase target namespace ("No" in step S706), the controller 4 does not terminate the unfinished command, but waits for completion of the processing of the unfinished command (step S710, "No" in step S710). In addition, in response to completion of the processing of the unfinished command, the controller 4 starts executing the first specific command (step S714).
[0215] Next, regarding the response to the I / O command received during the execution of the first specific command, refer to Fig. 9 Provide explanation. Fig. 9 This is a flowchart showing the procedure of processing an I / O command received during the execution of the first specific command.
[0216] The controller 4 receives a first specific command requesting secure erasure of data in a specific namespace (step S802), and starts executing the first specific command (step S804). When an I / O command is received during the execution of the first specific command (step S806), the controller 4 determines whether the received I / O command is an I / O command for the specific namespace (secure erasure target namespace) (step S808).
[0217] When the I / O command received during the execution of the first specific command is an I / O command for the secure erase target namespace ("Yes" in step S808), the controller 4 terminates the received I / O command (step S810). Alternatively, the controller 4 may retain the execution of the received I / O command (step S810) before the processing of the first specific command is completed (that is, before notifying the host 2 of the completion of the first specific command), and execute the received I / O command after the processing of the first specific command is completed.
[0218] When the I / O command received during the execution of the first specific command is an I / O command for a namespace other than the secure erase target namespace ("No" in step S808), the controller 4 can selectively use the following first method or second method. Therefore, the controller 4 determines which of the first method and the second method is selected (step S812). When the first method is selected, the controller 4 performs the processing of step S814. When the second method is selected, the controller 4 performs the processing of step S816.
[0219] The first method (step S814): when the I / O command for other namespaces is a write command, the controller 4 reserves the execution of the write command at least until the GC work is completed, and executes the write command after the GC work is completed.
[0220] In the case where the I / O command for other namespaces is a read command, the controller 4 executes the read command as usual. However, in the case where the commands received from the host 2 are not allowed to be executed in an arbitrary order (Out of order), the controller 4 executes the read commands for other namespaces in the same order as the order in which these read commands are received. And, at the time point of receiving the subsequent write command for the other namespace after the read command for the other namespace, the processing of the received write command and all subsequent I / O commands for the other namespace after the received write command is retained at least until the GC work is completed. After the GC work is completed, the controller 4 executes the received write command and all subsequent I / O commands for the other namespace after the received write command in the same order as the order in which these commands were received.
[0221] In the description of the first method, the controller 4 may or may not process the unmapping command in the same manner as the write command. When the controller 4 does not process the unmapping command in the same manner as the write command, it executes the unmapping command in the same manner as the read command.
[0222] The second method (step S816): When the I / O command for other namespaces is a write command, a mapping release command, or a read command, the controller 4 executes the I / O command as usual. In the second method, the processing of the I / O command for other namespaces will not be significantly delayed, but the time required for processing the first specific command will increase the amount of processing of the I / O command. Furthermore, it is possible that even invalid data generated by writing write data (update data) associated with the write command for the other namespace will become the object of GC work. In this case, the time required for processing the first specific command is further increased.
[0223] Next, refer to Fig. 10A , Fig. 10B , Fig.11 , Fig. 12A ,as well as Fig. 12B , illustrating an example of secure erasure of data in a specific namespace.
[0224] Fig. 10A 2 is a diagram showing an example of the contents of each active block before the secure erase operation begins. Fig. 10A In FIG. 1 , the case where three blocks, namely, block BLK0 , block BLK1 , and block BLK2 , are active blocks storing valid data is illustrated.
[0225] Block BLK0 is a live block in the middle of writing and is allocated as a write destination block. In block BLK0, an unwritten storage area shown as a blank remains. Block BLK1 and block BLK2 are each a live block in which data has been written until the end of the block.
[0226] When the controller 4 manages three namespaces, namely, namespace A, namespace B, and namespace C, there is a possibility that data of namespace A, data of namespace B, and data of namespace C are mixed in each of blocks BLK0, BLK1, and BLK2. Furthermore, valid data and invalid data of each namespace may also be mixed in each of blocks BLK0, BLK1, and BLK2.
[0227] Fig. 10B FIG. 4 is a diagram showing an example of the contents of each free block before the secure erase operation starts. Fig. 10B In FIG. 1 , a case is illustrated in which four blocks, namely, block BLK3 , block BLK4 , block BLK5 , and block BLK6 , are free blocks that do not store valid data.
[0228] exist Fig. 10BIn the free block BLK3, invalid data of namespace A and invalid data of namespace C are stored, but invalid data of namespace B is not stored. In each of the free blocks BLK4 to BLK6, invalid data of namespace A, invalid data of namespace B, and invalid data of namespace C are stored.
[0229] It is assumed that the non-volatile memory 5 includes Fig. 10A The three live blocks shown and Fig. 10B In the state of four free blocks shown, SSD 3 receives a first specific command requesting secure erasure of data in namespace B from host 2 .
[0230] In this case, the demapping unit 242 executes a demapping operation to invalidate the data associated with all LBAs belonging to the name space B.
[0231] Fig.11 2 is a diagram showing an example of the contents of each active block after the mapping release operation is executed. Fig.11 In FIG. 1 , the bold characters indicate the data in the namespace B which becomes invalid data due to the unmapping operation.
[0232] Before executing the mapping release operation, block BLK0 is as follows Fig. 10A As shown, one invalid data of namespace B and two valid data of namespace B are stored. Fig.11 As shown, through the mapping release operation, the two valid data of the name space B in the block BLK0 all become invalid data.
[0233] Before executing the mapping release operation, block BLK1 is as follows Fig. 10A As shown, two invalid data of namespace B and four valid data of namespace B are stored. Fig.11 As shown, through the mapping release operation, the four valid data of the name space B in the block BLK1 all become invalid data.
[0234] Before executing the mapping release operation, block BLK2 is as follows Fig. 10A As shown, three invalid data of namespace B and four valid data of namespace B are stored. Fig.11 As shown, through the mapping release operation, the four valid data of the name space B in the block BLK2 all become invalid data.
[0235] After executing the unmapping operation, the GC unit 243 selects all live blocks storing invalid data of the namespace B as GC target blocks, that is, copy source blocks, to perform GC operations.
[0236] exist Fig.11In the example, each of the blocks BLK0, BLK1, and BLK2 as live blocks stores invalid data of the namespace B. Therefore, all three live blocks BLK0, BLK1, and BLK2 are selected as copy source blocks.
[0237] Fig. 12A This is a diagram showing an example of the contents of each active block after the GC work is executed. Fig. 12A In the figure, the symbols (A), (B), and (C) in each physical storage location indicate that the namespaces corresponding to the data previously stored in the physical storage location are namespace A, namespace B, and namespace C, respectively.
[0238] exist Fig. 12A 2 illustrates a case where blocks BLK6 and BLK5 that were free blocks before the GC operation are used as copy destination blocks by the GC operation and become active blocks by copying valid data.
[0239] Block BLK6 becomes active by copying valid data from blocks BLK1 and BLK2 to block BLK6. As a result of the copying, all valid data of namespace A and namespace C stored in block BLK1 and all valid data of namespace A and namespace C stored in block BLK2 are stored in block BLK6.
[0240] Block BLK5 becomes an active block by copying valid data from block BLK0 to block BLK5. By this copying, all valid data of namespace A and namespace C stored in block BLK0 are stored in block BLK5.
[0241] Next, the state of each of the blocks BLK6 and BLK5 is changed from Fig. 10B The free blocks shown are transformed into Fig. 12A GC unit 243 performs block erasure on block BLK6. GC unit 243 copies valid data remaining in block BLK1 after executing the mapping release operation to invalidate the data in namespace B, that is, valid data in other namespaces other than namespace B, from block BLK1 to block BLK6. At this time, GC unit 243 performs the copying in a manner that the valid data in other namespaces other than namespace B are continuously configured in multiple physical storage locations in block BLK6.
[0242] Furthermore, the GC unit 243 copies the valid data remaining in the block BLK2 after the mapping release operation that invalidates the data in the namespace B, that is, the valid data of the other namespaces other than the namespace B, from the block BLK2 to the block BLK6. At this time, the GC unit 243 performs the copying in such a manner that the valid data of the other namespaces other than the namespace B are continuously arranged in the subsequent multiple physical storage locations in the block BLK6.
[0243] Thus, block BLK6 is filled with valid data stored in namespaces other than namespace B of block BLK1 and valid data stored in namespaces other than namespace B of block BLK2. As a result, invalid data stored in namespace B of block BLK6, which is a free block before the GC operation, is overwritten by valid data in namespaces other than namespace B.
[0244] exist Fig. 12A In FIG. 1 , the boldface characters indicate the physical storage location where the data of namespace B is erased. The invalid data of namespace B stored in block BLK6 which is a free block before the GC operation is overwritten by the valid data of other namespaces other than namespace B.
[0245] Similarly, the GC unit 243 performs a block erase on the block BLK5. And the GC unit 243 copies the valid data remaining in the block BLK0 after executing the mapping release work that invalidates the data in the namespace B, that is, the valid data of other namespaces other than the namespace B, from the block BLK0 to the block BLK5. At this time, the GC unit 243 copies the valid data of other namespaces other than the namespace B in a manner that is continuously configured in multiple physical storage locations in the block BLK5. In addition, in this example, the data in the block BLK5 is not written to the end, but the remaining physical storage locations can also be filled with dummy data such as all 0s.
[0246] When you focus on the bold words and refer to Fig. 12A When the invalid data in the namespace B stored in the block BLK5 is overwritten by the valid data in the namespace other than the namespace B, or the physical storage location storing the invalid data becomes erased.
[0247] Through the above GC operation, blocks BLK0 to BLK2 storing data (invalid data) of namespace B become free blocks. In addition, blocks BLK5 and BLK6 that have become active blocks store only valid data of namespaces other than namespace B, but not data of namespace B. Therefore, blocks in which data of the secure erase target namespace and valid data of the non-secure erase target namespace are mixed no longer exist in the active block group.
[0248] Fig. 12B The figure shows an example of the contents of each free block after the GC operation is executed. After the GC operation is executed, the free blocks managed by the free block list 35 include three blocks (BLK0, BLK1, BLK2) that have become free blocks by the GC operation and two blocks (BLK3, BLK4) that were free blocks before the GC operation started.
[0249] Each of the free blocks BLK0, BLK1, and BLK2 becomes a free block by the GC operation and is a block that is not used as a copy destination block for the GC operation. The free blocks BLK0, BLK1, and BLK2 store invalid data of the secure erase target namespace B, but do not store valid data of the non-secure erase target namespaces A and C. Therefore, the controller 4 can perform block erasure on each of the free blocks BLK0, BLK1, and BLK2.
[0250] The controller 4 can securely erase the data in the secure erase target namespace B from each of the free blocks BLK0 , BLK1 , and BLK2 by performing block erasure on each of the free blocks BLK0 , BLK1 , and BLK2 .
[0251] Furthermore, in the GC operation, any of the free blocks BLK0, BLK1, and BLK2 can be reused as a copy destination block for the GC operation. The block reused as the copy destination block is first block-erased. And the data stored in the secure-erasure-target namespace B of the block reused as the copy destination block is overwritten by the valid data of the non-secure-erasure-target namespace copied from the copy source block. In this way, the data stored in the secure-erasure-target namespace B of the block reused as the copy destination block is securely erased by the block-erasing and overwriting performed in the GC operation.
[0252] The free block BLK3 is a block that has been free since before the start of the GC operation and is not used as a copy destination block for the GC operation.
[0253] The free block BLK3 does not store data of the secure erase target namespace B. Therefore, the controller 4 does not need to perform block erase on the free block BLK3.
[0254] The free block BLK4 is a block that has been free since the start of the GC work and is not used as a copy destination block for the GC work. The free block BLK4 stores invalid data of the secure erase target namespace B. Therefore, a block erase is performed on the free block BLK4. As a result, the data of the secure erase target namespace B is securely erased from the free block BLK4.
[0255] As described above, according to the first embodiment, in response to receiving the first specific command requesting secure erasure of data in a specific namespace from the host 2, an operation of maintaining a copy of mapping information corresponding to the secure erasure target namespace is performed. Next, an operation of unmapping data in the secure erasure target namespace that is invalidated and a GC operation of copying valid data in data in other namespaces other than the secure erasure target namespace from one or more blocks (copy source blocks) storing the data in the secure erasure target namespace to one or more copy destination blocks are performed.
[0256] As a result, since one or more blocks storing data in the secure erase target namespace become free blocks, the data in the secure erase target namespace no longer exists outside the free blocks.
[0257] When the copy source block becomes a free block, the free block can be reused as a copy destination block. In this case, the data stored in the secure erase target namespace of the free block is erased by block erasure and then overwritten by valid data in the data of other namespaces other than the secure erase target namespace.
[0258] Thus, in the first embodiment, a part of the data (valid data and invalid data) of the specified specific namespace can be securely erased by block erasure and overwriting during the GC operation. In addition, after the GC operation, at least the data of the specified namespace stored in one or more free blocks can be securely erased by block erasure. As a result, all the data (valid data and invalid data) of the specified specific namespace are securely erased.
[0259] After executing the secure erase operation, the controller 4 changes to the audit mode. In the audit mode, the controller 4 does not refer to the L2P table 37 but refers to the copy of the mapping information maintained according to the read command for specifying the secure erase object namespace received from the host 2. Thus, the controller 4 can obtain the physical address mapped to each logical address in the secure erase object namespace before the secure erase operation starts. The controller 4 performs a read operation to read data from the physical storage location in the NAND flash memory 5 corresponding to the physical address indicated by the copy of the mapping information. And the controller 4 sends the read data to the host 2.
[0260] The host 2 can confirm whether the security erase target data is securely erased from the NAND flash memory 5 by comparing the data received from the controller 4 in the audit mode with the security erase target data.
[0261] Furthermore, when the controller 4 receives a write command specifying the secure erase target namespace from the host 2, it discards the copy of the mapping information and the information indicating the retained secure erase target namespace and exits from the audit mode. After exiting from the audit mode, the controller 4 performs a write process and a process of updating the mapping information of the L2P table 37.
[0262] Next, the advantages of the secure erase operation according to the first embodiment will be described in comparison with several comparative examples.
[0263] First, the differences between the configurations of SSDs according to several comparative examples and the configuration of the SSD 3 according to the first embodiment will be described.
[0264] <Comparative Example #1>
[0265] In the SSD involved in Comparative Example #1, multiple endurance groups are managed in such a way that multiple namespaces belong to multiple different endurance groups. An endurance group is a unit for managing physical resources of a NAND flash memory. All physical resources of a NAND flash memory are divided into multiple endurance groups so that each block in the NAND flash memory is used by only one endurance group. When data in a specific namespace is securely erased, each block included in the endurance group corresponding to the specific namespace becomes a secure erase target.
[0266] <Comparative Example #2>
[0267] In the SSD involved in Comparative Example #2, all physical resources of the NAND flash memory belong to only one durability group, but the correspondence between multiple namespaces and multiple blocks is managed one-to-one in such a way that data of different namespaces are written to different blocks. When data of a specific namespace is securely erased, each block mapped one-to-one to the specific namespace becomes a secure erase target.
[0268] <First Embodiment>
[0269] In the SSD 3 involved in the first embodiment, multiple namespaces are managed, but all physical resources of the NAND flash memory are allowed to belong to only one durability group, and data of multiple namespaces are mixed in the same block. This is because even in an environment where data of multiple namespaces are mixed in the same block, the secure erasure operation of the first embodiment can perform a physical secure erasure operation for data in a specific namespace specified by the host 2.
[0270] (1) User Data Erase Speed
[0271] In the SSD 3 involved in the first embodiment, it is necessary to perform GC work before erasing a block. Therefore, the speed of securely erasing user data is relatively slow. However, in the case of securely erasing data in a specific namespace, for example, when giving a PC to another person, maintaining the data in the namespace where the backup data of the OS is stored, and erasing the data in the namespace containing the user data, the frequency of use is extremely low, so a slow secure erasing speed can be tolerated.
[0272] In Comparative Example #1 and Comparative Example #2, the speed of securely erasing user data depends on the installation, but can be performed at a relatively high speed.
[0273] (2) Number of blocks being written
[0274] Here, the following configuration is envisioned: user data from a host is written to an SLC storage area (SLC: single-level cell) of a NAND flash memory, and when the SSD is idle, the user data in the SLC storage area is written to a TLC storage area (TLC: three-level cell) or a QLC storage area (QLC: four-level cell).
[0275] In the SSD 3 involved in the first embodiment, the number of blocks in the middle of writing required is two. One of the two blocks in the middle of writing is an SLC block used as a write destination block for the SLC storage area. The other block in the middle of writing is a TLC / QLC block used as a write destination block for the TLC / QLC storage area.
[0276] In Comparative Example #1 and Comparative Example #2, the number of SLC blocks required is equal to the number of namespaces. The number of TLC / QLC blocks required is equal to the number of namespaces.
[0277] (3) Over-Provisioning
[0278] In the SSD 3 according to the first embodiment and the comparative example #2, the reserved space area can be shared by a plurality of name spaces.
[0279] In Comparative Example #1, it is necessary to prepare a reserved space area for each namespace.
[0280] (4) SLC storage area
[0281] In the SSD 3 according to the first embodiment, the SLC storage area is shared between namespaces, so a certain namespace can temporarily use the entire capacity of the SLC storage area.
[0282] In Comparative Example #1 and Comparative Example #2, it is necessary to prepare an independent SLC storage area for each namespace. When the capacity required for an SLC storage area is fixed and has nothing to do with the namespace size, the number of blocks that can be allocated for the TLC / QLC storage area is reduced. Therefore, the storage capacity of the non-volatile memory cannot be used efficiently, and the drive capacity (Total Capacity) represented by the sum of the storage capacity of the TLC / QLC storage area and the storage capacity of all SLC storage areas is reduced in proportion to the number of namespaces.
[0283] (5) Alignment between block size and namespace size
[0284] Generally, the size of a block is several tens of MB. On the other hand, the size of each namespace is an integer multiple of a sector. Therefore, a mismatch between the block size and the namespace size may occur.
[0285] In the SSD 3 according to the first embodiment, since one block can be shared by a plurality of namespaces, even if a mismatch between the block size and the namespace size occurs, the SSD 3 is less likely to be affected thereby and capacity efficiency is less likely to decrease.
[0286] In Comparative Example #1 and Comparative Example #2, when a mismatch between the block size and the namespace size occurs, the capacity efficiency is reduced due to the resulting influence.
[0287] (6) Reduction in drive capacity due to creating multiple namespaces
[0288] Due to the reasons (2) to (5), when multiple namespaces are created in one SSD, the drive capacity may be reduced.
[0289] In the SSD 3 according to the first embodiment, since there is only one durability group, a plurality of namespaces can be created efficiently. Therefore, the drive capacity is not reduced due to the creation of a plurality of namespaces.
[0290] In Comparative Example #1, since each namespace requires an independent durability group, the reduction in drive capacity due to the creation of multiple namespaces is large.
[0291] In Comparative Example #2, the degree of influence on the reduction in drive capacity due to the creation of a plurality of namespaces is intermediate between the first embodiment and Comparative Example #1.
[0292] (Second embodiment)
[0293] Next, the second embodiment will be described. The configuration of the SSD according to the second embodiment is as follows: Figure 1 The configuration of the SSD 3 involved in the first embodiment shown is the same. The second embodiment performs a physical secure erase operation for data in a specific namespace similarly to the first embodiment, but the processing related to the mapping release operation is different from the first embodiment. In the first embodiment, the controller 4 performs the mapping release operation before the GC operation. In contrast, in the second embodiment, the controller 4 performs the mapping release operation during the execution of the GC operation.
[0294] Fig.13 FIG. 1 is a flowchart showing the procedure of the physical secure erase operation performed in the storage system according to the second embodiment. Figure 5 The procedure of the physical secure erase operation executed in the storage system according to the first embodiment described above is the same as that described above, and the description thereof will be omitted.
[0295] While maintaining the NSID of the secure erase target namespace (step S108), the GC unit 243 performs a GC operation. During the GC operation, the mapping information copy unit 241 performs an operation of copying the mapping information corresponding to the secure erase target namespace, and the mapping release unit 242 performs a mapping release operation (step S132).
[0296] In step S132, the GC unit 243 selects at least the live blocks storing the data in the secure erasure target namespace, i.e., the secure erasure target data, as GC target blocks (i.e., copy source blocks), regardless of whether the data in the secure erasure target namespace is valid data or invalid data. Alternatively, in the case of simply implementing the GC operation, the GC unit 243 may select at least all the live blocks storing invalid data as copy source blocks, regardless of whether the data is in the secure erasure target namespace.
[0297] In the case where the valid data stored in the copy source block is the secure erase target data, the mapping information copying unit 241 performs the operation of copying the mapping information corresponding to the secure erase target data stored in the copy source block from the L2P table 37 to the NAND type flash memory 5, etc., and the mapping release unit 242 performs the mapping release operation of invalidating the valid data stored in the copy source block. That is, the mapping information copying unit 241 maintains a copy of the mapping information indicating the physical storage location of the valid data as the secure erase target data stored in the valid data stored in the copy source block. And the mapping release unit 242 performs the mapping release operation of invalidating the valid data as the secure erase target data stored in the valid data stored in the copy source block. Thus, the mapping information copying unit 241 can copy the mapping information corresponding to the secure erase target data before being invalidated by the mapping release unit 242 from the L2P table 37 to the NAND type flash memory 5, etc. When the valid data in the non-secure erase target namespace stored in the copy source block is copied to the copy destination block and the mapping of the valid data in the secure erase target namespace stored in the copy source block is unmapped, the copy source block becomes a free block. As a result, the secure erase target data no longer exists outside the free blocks. In other words, the data in the secure erase target namespace (invalid data) will only exist in a few free blocks.
[0298] After executing the GC operation, the operation of copying the mapping information, and the mapping release operation (step S132), similarly to the first embodiment, the end condition of the GC operation is determined (step S122), the block erase operation is executed (step S124), and the command completion is notified to the host 2 (step S126). In addition, the audit function execution unit 245 executes the audit function (step S128).
[0299] The response to the I / O command and the processing related to the audit function when the first specific command requesting secure erasure of data in a specific namespace is executed are the same as those in the first embodiment, and thus the description thereof is omitted.
[0300] In the second embodiment as well, the same effects as those of the first embodiment can be obtained.
[0301] (Third embodiment)
[0302] Next, a third embodiment will be described. The configuration of the SSD according to the third embodiment is as follows: Figure 1The structure of the SSD3 involved in the first embodiment shown is the same. In the first and second embodiments, a namespace identifier is used as a logical area identifier representing a logical area of a secure erase target, but in the third embodiment, a logical address identifying a sector of a secure erase target and the number of sectors from the logical address are used as a logical area identifier representing a logical area of a secure erase target. As the logical address, for example, LBA is used. In the case where the SSD3 has multiple namespaces, the logical area identifier representing the logical area of a secure erase target also includes a namespace identifier representing the namespace of the secure erase target.
[0303] In the third embodiment, the secure erase target data is data associated with one or more specific LBAs indicating one or more secure erase target sectors. In this case, the secure erase target data includes both data currently associated with the LBA and data previously associated with the LBA.
[0304] The second specific command used in the third embodiment requests the secure erasure of data associated with one or more specific LBAs, more specifically, data associated with one or more specific LBAs representing one or more secure erasure target sectors. The second specific command may also include parameters specifying one or more specific LBAs. The one or more specific LBAs may be represented by an LBA range. In addition, the second specific command requests the execution of a secure erasure operation accompanied by an audit function.
[0305] In the case where the host 2 sets multiple LBA ranges as the objects of secure erasure, the host 2 can first send multiple commands that each specify an LBA range to SSD3, and then send a second specific command requesting secure erasure of one or more specific LBA ranges to SSD3. Of course, the second specific command can also include multiple parameters that specify multiple LBA ranges. In this way, by specifying multiple LBA ranges to request secure erasure, the GC work described later can be completed once. Therefore, compared with the case of requesting secure erasure according to each LBA range, the amount of data copying and the number of times the block is erased can be reduced, and the wear of the storage unit can be reduced.
[0306] In addition, when the host 2 sets one or more specific LBAs or one or more specific LBA ranges of a specific namespace as the security erase object, the host 2 can also specify a namespace identifier that identifies the specific namespace, and one or more specific LBAs or one or more specific LBA ranges.
[0307] Fig.14A This is a flowchart showing the procedure of the physical secure erase operation executed in the storage system according to the third embodiment.
[0308] When the controller 4 receives a command from the host 2 (step S202), the CPU 12 determines whether the received command is a second specific command (step S204). The second specific command requests secure erasure of data in one or more specific LBAs using a physical secure erasure method.
[0309] When the received command is not the second specific command (No in step S204 ), the CPU 12 executes a process corresponding to the received command (step S206 ).
[0310] When the received command is the second specific command ("Yes" in step S204), the audit function execution unit 245 maintains one or more specific LBAs (e.g., a specific LBA range) contained in the received second specific command (step S208). Each of the one or more specific LBAs is also referred to as a secure erase target LBA. In addition, the specific LBA range is also referred to as a secure erase target LBA range.
[0311] The mapping information copy unit 241 holds a copy of the mapping information corresponding to the secure erase target LBA (eg, secure erase target LBA range) (step S210 ).
[0312] The demapping unit 242 performs a demapping operation (step S212 ). Next, the GC unit 243 performs a GC operation (step S214 ).
[0313] Here, the case where the copying work of the mapping information in step S210 and the mapping release work in step S212 are performed as independent orders respectively is described, but these tasks can also be performed simultaneously as one task so that the mapping information corresponding to the LBA of the mapping release object is copied before the mapping release work is about to be performed.
[0314] In addition, the order of the unmapping operation (step S212) and the GC operation (step S214) differs depending on the relationship between the sector size and the cluster size. Fig. 14B This is a flowchart showing the sequence of the unmapping operation and the GC operation when the sector size is equal to the cluster size. This sequence is the sequence when one secure erase target sector corresponds to one cluster. Fig. 14C This is a flowchart showing the order of the mapping removal operation and the GC operation when the sector size is smaller than the cluster size. In this case, data of at least one secure erase target sector exists in a part of one cluster storing valid data.
[0315] like Fig. 14BAs shown, when the sector size is equal to the cluster size, the mapping release unit 242 performs a mapping release operation to invalidate the data respectively associated with all the secure erase target LBAs specified by the host 2 (step S212A). The mapping release unit 242 deletes the physical address from each entry of the L2P table 37 corresponding to all the LBAs included in the second specific command. Alternatively, the mapping release unit 242 stores a NULL value in these entries. Through this mapping release operation, all clusters corresponding to the secure erase target LBA become invalid in the L2P table 37. As a result, the data associated with all the secure erase target LBAs become invalid data.
[0316] The GC unit 243 selects all live blocks that at least store invalid data of the secure erase target LBA as GC target blocks (i.e., copy source blocks). Alternatively, in the case of simply implementing the GC work, the GC unit 243 may select all live blocks that at least store invalid data as copy source blocks regardless of whether the data is invalid data of the secure erase target LBA.
[0317] The GC unit 243 may store the block identifier of each active block selected as the copy source block in the secure erase target block list 34 .
[0318] The GC unit 243 selects an arbitrary free block from the free blocks, performs block erasure on the selected free block, and allocates the free block that has been block-erased as a copy destination block.
[0319] The GC unit 243 copies valid data among data other than the secure erase target data, that is, valid data of the non-secure erase target LBA from the copy source block to the copy destination block (step S214A).
[0320] The GC unit 243 updates the L2P table 37 to map each LBA of the copied valid data and each physical address of the copy destination.
[0321] Reference Fig. 14C , the order of mapping removal and GC operation when the sector size is smaller than the cluster size is explained. Fig. 14B The procedures of the mapping removal operation and the GC operation are the same as those described above, and their description is omitted.
[0322] When the sector size is smaller than the cluster size, bitmap data indicating whether the data of each sector in the cluster is valid or invalid is stored in, for example, the L2P table 37 as described above.
[0323] The demapping unit 242 selects a cluster including data of at least one secure erase target sector as a target of the demapping operation, and determines whether all sectors in the cluster are secure erase target sectors (step S212B-1).
[0324] When all sectors in the cluster are targets for secure erasure, that is, when all data in the cluster are targets for secure erasure (Yes in step S212B-1), the demapping unit 242 executes a demapping operation to invalidate the data in the cluster (step S212B-4).
[0325] When the cluster includes one or more non-secure erase target sectors and one or more secure erase target sectors (No in step S212B-1), the demapping unit 242 updates the bitmap data so that the data of all secure erase target sectors in the cluster are invalidated (step S212B-2).
[0326] The unmapping unit 242 determines whether the data of all sectors in the cluster are invalidated by the invalidation (step S212B-3).
[0327] When all sectors included in the cluster have become invalid sectors (Yes in step S212B-3), the demapping unit 242 executes a demapping operation to invalidate the data in the cluster (step S212B-4).
[0328] When all sectors included in the cluster have not become invalid sectors, that is, when the cluster contains valid sectors that are not to be securely erased ("No" in step S212B-3), the processing on the cluster executed by the mapping release unit 242 is completed.
[0329] The demapping unit 242 determines whether the demapping operation for all the clusters that are targets of the demapping operation has been completed (step S212B-5).
[0330] When there is a cluster that has not performed the mapping release operation (No in step S212B-5), the mapping release unit 242 performs the determination in step 212B-1 on the next cluster.
[0331] When the unmapping work for all clusters is completed ("Yes" in step S212B-5), the GC unit 243 copies the data of all clusters containing valid data in the active block (i.e., data not to be securely erased) from the copy source block to the copy destination block (step S214B-1).
[0332] Furthermore, in step S214B-1, if there is an invalid sector in the cluster, the GC unit 243 changes the data of the sector to an appropriate value and copies it to the copy destination block. The appropriate value is, for example, all 0s or all 1s, random data, or a combination thereof.
[0333] The GC unit 243 updates the entry of the L2P table 37 and maps the LBA of the copied data to the physical address of the cluster of the copy destination.
[0334] return Fig.14A After the GC operation is executed (step S214), similarly to the first embodiment, the GC unit 243 determines whether the termination condition of the GC operation is satisfied (step S222). The termination condition may be that the block storing the invalid data of the secure erase target LBA no longer exists in the active block group.
[0335] The GC unit 243 continues to perform the GC work until the block storing invalid data of the secure erase target LBA no longer exists in the active block group ("No" in step S222, step S214).
[0336] When the end condition of the GC operation is satisfied (Yes in step S222), the GC unit 243 ends the GC operation. At this point in time, there is no possibility that invalid data of the secure erase target LBA exists outside the free block.
[0337] Furthermore, when all live blocks storing at least invalid data are selected as GC target blocks regardless of whether they are invalid data of the LBA to be erased securely, it is also possible to set the end condition of the GC operation as that the blocks storing invalid data no longer exist in the live block group regardless of whether they are invalid data of the LBA to be erased securely. However, this end condition reduces the efficiency of the GC operation. Therefore, this end condition can also be adopted when the ratio of invalid data to valid data in each live block of all live blocks is high.
[0338] After determining the end condition of the GC operation (step S222), the secure erase unit 244 performs a block erase operation on at least each free block storing invalid data of the secure erase target LBA (step S224). Thus, all invalid data of the secure erase target LBA is securely erased by block erase.
[0339] In step S224, the secure erase unit 244 performs block erase on each free block storing invalid data of the secure erase target LBA, and further, writes a specific data pattern into each free block as in the first embodiment. Thus, all invalid data of the secure erase target LBA is securely erased by overwriting.
[0340] The secure erase unit 244 may perform block erase on all free blocks regardless of whether invalid data of the secure erase target LBA is stored. Thus, the process of performing block erase on each free block storing invalid data of at least the secure erase target LBA can be easily implemented (step S224).
[0341] Alternatively, in order to reduce the number of blocks to be block erased, the secure erase unit 244 may determine one or more free blocks storing invalid data of the secure erase target LBA and perform block erase only on the determined one or more free blocks.
[0342] In either the former or the latter, at least one or more free blocks storing invalid data of the secure erase target LBA become the secure erase target.
[0343] When the process of step S224 is completed, the erase control unit 24 notifies the host 2 of the completion of the second specific command by sending a response indicating the completion of the second specific command to the host 2 (step S226).
[0344] Then, the Audit function execution unit 245 executes the Audit function (step S228). By executing the Audit function, the controller 4 sends data that can confirm whether the secure erase is normally executed to the host 2 using the specific LBA stored in step S208 and the copy of the mapping information stored in step S210 according to the read command issued from the host 2. The details of the sequence of step S228 are described with reference to the flowchart of FIG. 15.
[0345] Fig.15A as well as Fig. 15B 1 is a flowchart showing the procedure of processing related to the Audit function executed in the storage system according to the third embodiment. Fig. 7A as well as Figure 7B The same procedures as those of the processing related to the Audit function executed in the storage system according to the first embodiment described above will be omitted in their description.
[0346] In reference Fig.14A When the completion notification of the second specific command in step S226 described above is sent to the host 2, the Audit function execution unit 245 performs the following operation: Fig.15A As shown, the controller 4 is switched to the Audit mode (step S302).
[0347] If the command received in step S304 is a read command ("Yes" in step S306), the controller 4 determines whether the LBA included in the received read command matches the reference LBA. Fig.14AThe controller 4 may determine whether the LBA contained in the received read command is consistent with the specific LBA maintained in the step S208 described above, for example, whether the LBA contained in the received read command belongs to the specific LBA range maintained in the step S208 (step S342). In addition, the controller 4 may also exchange the execution order of step S306 and step S342. In this case, the controller 4 may also omit the processing of step S344.
[0348] When the LBA included in the read command is inconsistent with a specific LBA, for example, when the LBA included in the read command does not belong to a specific LBA range ("No" in step S342), the controller 4 refers to the mapping information of the L2P table 37 and obtains the physical address mapped to the LBA included in the received read command (step S310).
[0349] When the LBA included in the read command is consistent with the specific LBA, for example, when the LBA included in the read command belongs to the specific LBA range ("Yes" in step S342), the controller 4 refers to the reference Fig.14A The copy of the mapping information held in step S210 described above is used to obtain the physical address mapped to the LBA included in the received read command (step S314).
[0350] like Fig. 15B As shown, when the received command is a write command ("Yes" in step S318), the controller 4 determines whether the LBA contained in the received write command is consistent with the specific LBA maintained in step S208, for example, determines whether the LBA contained in the received write command belongs to the specific LBA range maintained in step S208 (step S344).
[0351] When the LBA included in the write command does not match the specific LBA, for example, when the LBA included in the write command does not belong to the specific LBA range (No in step S344), the controller 4 executes the processing of step S322 and the processing of step S324.
[0352] When the LBA included in the write command is consistent with the specific LBA, for example, when the LBA included in the write command belongs to the specific LBA range ("Yes" in step S344), the controller 4 discards the copy of the mapping information and the information indicating one or more specific LBAs (for example, the specific LBA range) (step S346). Then, the controller 4 executes the processing of step S328, the processing of step S330, and the processing of step S332.
[0353] In addition, when the received command is an audit mode end command ("Yes" in step S334), the controller 4 discards the copy of the mapping information and the information indicating one or more specific LBAs (for example, a specific LBA range) (step S348). Furthermore, the controller 4 exits from the audit mode (step S338) and ends the audit function.
[0354] The response to the I / O command when the second specific command is received is the same as that of the first embodiment, and thus the description thereof will be omitted.
[0355] As described above, according to the third embodiment, data of one or more specific LBAs can be securely erased by the physical secure erase method. In addition, when a cluster storing valid data and a part of which contains data of a secure erase target sector is included in a copy source block, the controller 4 changes the data of the secure erase target sector to a data pattern of all 1 or all 0 when copying the data of the cluster as a whole to the copy destination block. Therefore, in the case of a cluster in which secure erase target sectors and valid sectors not to be securely erased are mixed, the data of the valid sectors not to be securely erased can be correctly copied while ensuring the safety of the physical secure erase operation.
[0356] In addition, the controller 4 can execute an audit function for confirming whether the secure erasure operation for the data in the secure erasure target sector is normally executed.
[0357] (Fourth embodiment)
[0358] Next, a fourth embodiment will be described. The configuration of the SSD according to the fourth embodiment is as follows: Figure 1 The structure of the SSD 3 involved in the first embodiment shown is the same. The fourth embodiment performs secure erasure of data of a specific LBA in the same manner as the third embodiment, but the processing related to the mapping release operation is different from that in the third embodiment. In the third embodiment, the controller 4 performs the mapping release operation before the GC operation. In contrast, in the fourth embodiment, the controller 4 performs the mapping release operation during the execution of the GC operation.
[0359] Fig.16A 4 is a flowchart showing the sequence of the physical secure erase operation performed in the storage system according to the fourth embodiment. Fig.14A The procedure of the physical secure erase operation executed in the storage system according to the third embodiment described above is the same as that described above, and the description thereof will be omitted.
[0360] When the secure erase target LBA (e.g., secure erase target LBA range) included in the second specific command received in step S202 is retained (step S208), the GC unit 243 performs a GC operation. During the execution of the GC operation, the mapping information copying unit 241 performs an operation of copying the mapping information corresponding to the secure erase target LBA (e.g., secure erase target LBA range), and the mapping release unit 242 performs a mapping release operation (step S232).
[0361] As in the third embodiment, the order of step S232 including the GC operation, the operation of copying mapping information, and the operation of releasing mapping differs depending on the relationship between the sector size and the cluster size.
[0362] Fig. 16B This is a flowchart showing the order of GC operation and mapping removal operation when the sector size is equal to the cluster size. This order is the order when one secure erase target sector corresponds to one cluster.
[0363] In step S232A-1, the GC unit 243 selects the live block that at least stores the data of the secure erasure target LBA and the valid data of the non-secure erasure target LBA as the GC target block (that is, the copy source block), regardless of whether the data of the secure erasure target LBA is valid data or invalid data. Alternatively, in the case of simply implementing the GC operation, the GC unit 243 may select all live blocks that store invalid data as the copy source blocks, regardless of whether the data is the secure erasure target LBA. The GC unit 243 copies the valid data of the non-secure erasure target LBA from the copy source block to the copy destination block.
[0364] In step S232A-2, the mapping information copying unit 241 performs the work of copying the mapping information corresponding to the secure erase object data stored in the copy source block when the valid data of the secure erase object LBA is stored in the copy source block. The mapping release unit 242 performs the mapping release work to invalidate the valid data stored in the copy source block. Thus, the mapping information copying unit 241 can copy the mapping information before it is invalidated. When the valid data of the non-secure erase object LBA stored in the copy source block is copied to the copy destination block, and at the same time, the mapping release work to invalidate the valid data of the secure erase object LBA stored in the copy source block is also performed, the copy source block becomes a free block. Thus, the data of the secure erase object LBA no longer exists outside the free blocks. In other words, the data of the secure erase object LBA (invalid data) exists only in a few free blocks.
[0365] Fig. 16CThis is a flowchart showing the procedure of GC operation and mapping removal operation when the sector size is smaller than the cluster size. In this case, the bitmap data showing whether the data of each sector in the cluster is valid or invalid is stored in the L2P table 37, for example, as described above.
[0366] The mapping information copying unit 241, mapping release unit 242, and GC unit 243 select a cluster including at least one valid sector as the object of mapping information copying, mapping release, and GC work, and determine whether all sectors in the cluster are secure erase object sectors (step S232B-1).
[0367] When the processing target cluster includes at least one secure erase target sector (Yes in step S232B-1), the mapping information copy unit 241 holds a copy of the mapping information corresponding to the processing target cluster (step S232B-2).
[0368] The unmapping unit 242 updates the bitmap data so that the data of all the secure erase target sectors in the cluster are invalidated (step S232B-3).
[0369] The unmapping unit 242 determines whether the data of all sectors in the cluster are invalidated by the invalidation (step S232B-4).
[0370] When the data of all sectors in the cluster are invalidated (Yes in step S232B-4), the demapping unit 242 executes a demapping operation to invalidate the data of the cluster (step S232B-5).
[0371] After step S232B-5, if the cluster contains a sector that has not been invalidated (i.e., if the cluster stores valid data of one or more non-secure erase target sectors) ("No" in step S232B-4), or if the cluster to be processed does not contain a secure erase target sector ("No" in step S232B-1), the GC unit 243 copies the valid data in the cluster (i.e., valid data of one or more non-secure erase target sectors) from the copy source block to the copy destination block (step S232B-6). At this time, the GC unit 243 replaces the data of the invalidated sectors in the cluster with appropriate values in the same manner as in the third embodiment. In step S232B-5, if all sectors in the cluster are valid, the GC unit 243 copies the data of all sectors to the copy destination block, and the GC unit 243 updates the L2P table 37, and updates the physical address of the copy source cluster to the physical address of the copy destination cluster.
[0372] The GC unit 243 determines whether the operation of copying the mapping information, the operation of releasing the mapping, and the GC operation are completed for all clusters including the valid sectors (step S232B-7).
[0373] If there is a cluster for which these operations have not been completed (No in step S232B- 7 ), the GC unit 243 performs the determination in step S232B- 1 on the next cluster for which these operations have not been completed.
[0374] When the operation of copying mapping information, the operation of releasing mapping, and the GC operation are completed for all clusters (Yes in step S232B-7), the process executed by the GC unit 243 proceeds to step S222.
[0375] Finally, all valid data is copied to the copy destination block, and the copy source block becomes a free block. Thus, the data of the secure erase target LBA no longer exists outside the free block. In other words, the data (invalid data) of the secure erase target LBA only exists in a few free blocks.
[0376] return Fig.16A After executing the GC work (step S232), similarly to the third embodiment, the end condition of the GC work is determined (step S222), the block erase work is executed (step S224), the command completion is notified to the host 2 (step S226), and the Audit function (step S228) is performed.
[0377] The handling of the I / O command when the second specific command is executed and the processing related to the audit function are the same as those in the third embodiment, and thus the description thereof is omitted.
[0378] In the fourth embodiment as well, the same effects as those of the third embodiment can be obtained.
[0379] As described above, according to the first to fourth embodiments, by using the secure erasure work of the GC work, the secure erasure object data associated with the logical area identifier of the secure erasure object logical area can be securely erased, and after the secure erasure work using the GC work is completed, an audit function can be performed to confirm whether the secure erasure of the secure erasure object data has been correctly performed.
[0380] Several embodiments of the present invention have been described above, but these embodiments are provided as examples and are not intended to limit the scope of the invention. These new embodiments can be implemented in various other ways, and various omissions, substitutions, and changes can be made without departing from the gist of the invention. These embodiments and / or their variations are included in the scope and gist of the invention, and are included in the invention described in the claims and the scope of their equivalents.
[0381] For example, the controller 4 may also use other means to send a completion response indicating that a specific command has been received and a completion response indicating that the execution of the specific command has been completed to the host 2.
Claims
1. A storage system comprising: a nonvolatile memory including a plurality of blocks each being a unit of data erasure operation; and a controller, electrically connected to the non-volatile memory, The controller is configured as follows: managing a first table that holds mapping information indicating mappings between each of the one or more logical area identifiers and each of the one or more physical addresses of the nonvolatile memory, In response to receiving a first command from a host requesting secure erasure of secure erasure target data associated with a first logical area identifier, holding a copy of first mapping information corresponding to the first logical area identifier among the mapping information included in the first table, determining one or more first blocks among the plurality of blocks storing secure erasure target data associated with the first logical area identifier, At least for the one or more first blocks, at least the data erasing operation is performed, After performing the data erasing operation on the one or more first blocks, the first mode is switched to the first mode. In the first mode, data is read from a storage location in the nonvolatile memory corresponding to a first physical address mapped to the first logical area identifier in the copy of the first mapping information in response to a read command specifying the first logical area identifier received from the host.
2. The storage system according to claim 1, The controller is further configured as follows: In response to receiving the first command from the host, invalidating the secure erasure target data associated with the first logical area identifier among the valid data stored in the one or more first blocks, executing a copy operation of copying valid data other than the secure erase target data associated with the first logical area identifier among the valid data stored in the one or more first blocks to one or more copy destination blocks among the plurality of blocks, After executing the copying operation, the data erasing operation is performed on the one or more first blocks.
3. The storage system according to claim 1, The controller is further configured as follows: In the first mode, In response to receiving a read command from the host specifying a second logical area identifier that is different from the first logical area identifier, data is read from a storage area in the non-volatile memory corresponding to a second physical address mapped to the second logical area identifier in the mapping information contained in the first table, and the read data is sent to the host.
4. The storage system according to claim 1, The controller is further configured as follows: The first mode is exited in response to receiving a command requesting the end of the first mode or a write command designating the first logical area identifier from the host.
5. The storage system according to claim 4, The controller is further configured as follows: holding the first logical area identifier specified by the first command, The first logical area identifier is discarded in response to reception of a command requesting the end of the first mode or a write command designating the first logical area identifier from the host.
6. The storage system according to claim 4, The controller is further configured as follows: The copy of the first mapping information is discarded in response to reception of a command requesting the end of the first mode or a write command designating the first logical area identifier from the host.
7. The storage system according to claim 1, The controller is further configured as follows: In the case where the one or more first blocks include a plurality of first blocks, performing the data erasing operation on a second block which is one of the plurality of first blocks, A copy operation is performed to copy valid data stored in a third block different from the second block among the plurality of first blocks, excluding secure erasure target data associated with the first logical area identifier, from the third block to the second block on which the data erasure operation has been performed.
8. The storage system according to claim 1, The controller is further configured as follows: In response to receiving the first command from the host, invalidating the secure erasure target data associated with the first logical area identifier; The data erasing operation is performed on at least one or more blocks among the plurality of blocks which do not store valid data before the secure erasure target data associated with the first logical area identifier is invalidated and which store invalid data among the secure erasure target data associated with the first logical area identifier.
9. The storage system according to claim 1, The controller is configured to manage a plurality of namespaces respectively identified by a plurality of namespace identifiers. The first logical area identifier is a namespace identifier that identifies a secure erase target namespace.
10. The storage system according to claim 1, The first logical area identifier includes one or more logical addresses identifying one or more secure erase target sectors.
11. The storage system according to claim 1, The first logical area identifier includes one or more keys that identify one or more secure erase target values.
12. The storage system according to claim 1, The controller is configured as follows: The copy of the first mapping information is stored in the nonvolatile memory.
13. The storage system according to claim 12, the controller, The data erasing operation is performed on a second block which is one of the one or more first blocks. The copy of the first mapping information is stored in the second block on which the data erasure operation is performed.
14. The storage system according to claim 1, The controller is further configured as follows: invalidating the secure erasure target data associated with the first logical area identifier by deleting from the mapping information the third physical address mapped to the first logical area identifier in the mapping information included in the first table, When the third physical address is deleted from the mapping information, a portion of the mapping information including the third physical address is retained as the copy.
15. The storage system according to claim 1, The secure erasure target data associated with the first logical area identifier includes invalid data.
16. The storage system according to claim 1, The controller is further configured as follows: A response indicating that error correction of the data read from the storage location corresponding to the first physical address has failed is transmitted to the host as a response to the read command.
17. The storage system according to claim 1, The controller is configured as follows: The data is read from a storage position corresponding to the first physical address that has been put into an erased state by execution of a data erase operation on the one or more first blocks.
18. The storage system according to claim 1, The controller is further configured as follows: After performing data erasing operations on the one or more first blocks, writing data having a specific data pattern for overwriting data to a storage location corresponding to the first physical address, In response to receiving the read command from the host, data having the specific data pattern is read from a storage location corresponding to the first physical address.
19. The storage system according to claim 1, The controller is further configured as follows: A response indicating that the data read from the storage location corresponding to the first physical address is abnormal data is transmitted to the host as a response to the read command.
Citation Information
Cited By
Memory control method and storage device
CN121412151A
