TWI768737B - Skipped data clean method and data storage system - Google Patents

Skipped data clean method and data storage system Download PDF

Info

Publication number
TWI768737B
TWI768737B TW110107203A TW110107203A TWI768737B TW I768737 B TWI768737 B TW I768737B TW 110107203 A TW110107203 A TW 110107203A TW 110107203 A TW110107203 A TW 110107203A TW I768737 B TWI768737 B TW I768737B
Authority
TW
Taiwan
Prior art keywords
data
logical block
command
skip
logical
Prior art date
Application number
TW110107203A
Other languages
Chinese (zh)
Other versions
TW202236094A (en
Inventor
黃意中
傅子瑜
Original Assignee
宏碁股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 宏碁股份有限公司 filed Critical 宏碁股份有限公司
Priority to TW110107203A priority Critical patent/TWI768737B/en
Application granted granted Critical
Publication of TWI768737B publication Critical patent/TWI768737B/en
Publication of TW202236094A publication Critical patent/TW202236094A/en

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Storing Facsimile Image Data (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Communication Control (AREA)

Abstract

A skipped data clean method and a data storage system are disclosed. The method includes: receiving data clean command from a host system, wherein the data clean command is configured to clean data belonging to a target logical range; and performing a skipped data clean operation in response to the data clean command. The skipped data clean operation includes: writing default data to a plurality of non-sequential logical block addresses within the target logical range.

Description

跳躍式資料清除方法與資料儲存系統Jump data clearing method and data storage system

本發明是有關於一種資料清除技術,且特別是有關於一種跳躍式資料清除方法與資料儲存系統。The present invention relates to a data clearing technology, and more particularly, to a skip data clearing method and a data storage system.

一般來說,儲存於記憶體裝置中的資料可經由多種方式清除。例如,最常見且最快速的資料清除方式是藉由修改或清除特定邏輯區塊位址與實體區塊位址之間的映射關係。但是,這種資料清除方式並沒有真正將資料清除,實務上存在安全性風險。或者,也可以藉由下達全碟清除指令或指定邏輯範圍的清除指令給記憶體裝置,使記憶體裝置對全碟或在指定的邏輯範圍內執行亂數資料的覆寫,以達到實際清除資料的效果。Generally, data stored in a memory device can be erased in a variety of ways. For example, the most common and fastest way to clear data is by modifying or clearing the mapping relationship between specific logical block addresses and physical block addresses. However, this data clearing method does not really clear the data, and there is a security risk in practice. Alternatively, it is also possible to issue a clear command of the entire disk or a clear command of a specified logical range to the memory device, so that the memory device can overwrite the random data on the entire disk or within the specified logical range, so as to actually clear the data. Effect.

但是,無論是全碟清除或指定邏輯範圍內的資料清除,記憶體裝置預設都是執行循序寫入(sequential write)。實務上,這種大範圍的循序寫入,容易使得記憶體裝置內部預設優先使用的快取區被快速用盡,從而導致記憶體裝置在中後期的資料清除速度大幅下降。However, whether it is a full-disk erasure or a data erasure within a specified logical range, the memory device defaults to perform sequential write. In practice, such large-scale sequential writing tends to quickly exhaust the cache area that is used by default in the memory device, thereby causing the data clearing speed of the memory device to drop significantly in the middle and later stages.

本發明提供一種跳躍式資料清除方法與資料儲存系統,可提高記憶體裝置的資料清除效率。The present invention provides a skip data clearing method and data storage system, which can improve the data clearing efficiency of a memory device.

本發明的實施例提供一種跳躍式資料清除方法,其用於記憶體裝置。所述跳躍式資料清除方法包括:從主機系統接收資料清除指令,其中所述資料清除指令用以清除屬於目標邏輯範圍內的資料;以及響應於所述資料清除指令,執行跳躍式資料清除操作。所述跳躍式資料清除操作包括將預設資料寫入至所述目標邏輯範圍內的多個不連續的邏輯區塊位址。Embodiments of the present invention provide a skip data clearing method, which is used in a memory device. The skip data clearing method includes: receiving a data clear command from a host system, wherein the data clear command is used to clear data belonging to a target logic range; and in response to the data clear command, executing a skip data clear operation. The skip data clearing operation includes writing preset data to a plurality of discrete logical block addresses within the target logical range.

本發明的實施例另提供一種資料儲存系統,其包括主機系統與記憶體裝置。所述記憶體裝置耦接至所述主機系統。所述主機系統用以傳送資料清除指令至所述記憶體裝置。所述資料清除指令用以清除屬於目標邏輯範圍內的資料。響應於所述資料清除指令,所述記憶體裝置用以執行跳躍式資料清除操作。所述跳躍式資料清除操作包括將預設資料寫入至所述目標邏輯範圍內的多個不連續的邏輯區塊位址。Embodiments of the present invention further provide a data storage system, which includes a host system and a memory device. The memory device is coupled to the host system. The host system is used for transmitting a data clearing command to the memory device. The data clearing instruction is used to clear the data belonging to the target logic range. In response to the data clearing command, the memory device is configured to perform a skip data clearing operation. The skip data clearing operation includes writing preset data to a plurality of discrete logical block addresses within the target logical range.

基於上述,在從主機系統接收對應於目標邏輯範圍的資料清除指令後,記憶體裝置可自動執行跳躍式資料清除操作。特別是,所述跳躍式資料清除操作包括將預設資料寫入至所述目標邏輯範圍內的多個不連續的邏輯區塊位址。藉此,可有效提高記憶體裝置的資料清除效率。Based on the above, after receiving the data clearing command corresponding to the target logical range from the host system, the memory device can automatically perform the skip data clearing operation. In particular, the skip data clearing operation includes writing preset data to a plurality of discrete logical block addresses within the target logical range. Thereby, the data clearing efficiency of the memory device can be effectively improved.

圖1是根據本發明的一實施例所繪示的資料儲存系統的示意圖。請參照圖1,資料儲存系統10包括主機系統11與記憶體裝置12。主機系統11可為任意型態的電腦系統。例如。主機系統11可為筆記型電腦、桌上型電腦、智慧型手機、平板電腦或工業電腦等。記憶體裝置12耦接至主機系統11並用以儲存來自主機系統11的資料。例如,記憶體裝置12可包括固態硬碟、隨身碟或其他類型的非揮發性記憶體儲存裝置。FIG. 1 is a schematic diagram of a data storage system according to an embodiment of the present invention. Referring to FIG. 1 , the data storage system 10 includes a host system 11 and a memory device 12 . The host system 11 can be any type of computer system. E.g. The host system 11 can be a notebook computer, a desktop computer, a smart phone, a tablet computer, an industrial computer, or the like. The memory device 12 is coupled to the host system 11 and used to store data from the host system 11 . For example, memory device 12 may include a solid state drive, a pen drive, or other type of non-volatile memory storage device.

主機系統11可經由序列先進附件(Serial Advanced Technology Attachment, SATA)介面、高速周邊零件連接介面(Peripheral Component Interconnect Express, PCI Express)、通用序列匯流排(Universal Serial Bus, USB)或其他類型的連接介面電性連接至記憶體裝置12。因此,主機系統11可將資料儲存至記憶體裝置12及/或從記憶體裝置12讀取資料。The host system 11 can be connected via a Serial Advanced Technology Attachment (SATA) interface, a high-speed peripheral component connection interface (Peripheral Component Interconnect Express, PCI Express), a Universal Serial Bus (USB), or other types of connection interfaces Electrically connected to the memory device 12 . Thus, the host system 11 can store data to and/or read data from the memory device 12 .

記憶體裝置12可包括連接介面121、記憶體模組122及記憶體控制器123。連接介面121用以將記憶體裝置12連接至主機系統11。例如,連接介面121可支援SATA、PCI Express或USB等連接介面標準。記憶體裝置12可經由連接介面121與主機系統11通信。在一實施例中,連接介面121也支援NVM Express (NVMe)標準。The memory device 12 may include a connection interface 121 , a memory module 122 and a memory controller 123 . The connection interface 121 is used to connect the memory device 12 to the host system 11 . For example, the connection interface 121 may support connection interface standards such as SATA, PCI Express, or USB. The memory device 12 can communicate with the host system 11 via the connection interface 121 . In one embodiment, the connection interface 121 also supports the NVM Express (NVMe) standard.

記憶體模組122用以儲存資料。記憶體模組122可包括可複寫式非揮發性記憶體模組。記憶體模組122包括記憶胞陣列。例如,記憶體模組122可包括單階記憶胞(Single Level Cell, SLC)NAND型快閃記憶體模組(即,一個記憶胞可儲存1個位元的快閃記憶體模組)、多階記憶胞(Multi Level Cell, MLC)NAND型快閃記憶體模組(即,一個記憶胞可儲存2個位元的快閃記憶體模組)、三階記憶胞(Triple Level Cell, TLC)NAND型快閃記憶體模組(即,一個記憶胞可儲存3個位元的快閃記憶體模組)、四階記憶胞(Quad Level Cell, QLC)NAND型快閃記憶體模組(即,一個記憶胞可儲存4個位元的快閃記憶體模組)或其他具有相似特性的記憶體模組。此外,記憶體模組122中的記憶胞是以臨界電壓的改變來儲存資料。The memory module 122 is used for storing data. The memory module 122 may include a rewritable non-volatile memory module. The memory module 122 includes a memory cell array. For example, the memory module 122 may include a single-level cell (SLC) NAND-type flash memory module (ie, a flash memory module in which one memory cell can store 1 bit), multiple Multi Level Cell (MLC) NAND flash memory modules (ie, a memory cell can store 2 bits of flash memory modules), Triple Level Cell (TLC) NAND type flash memory module (ie, a memory cell can store 3 bits of flash memory module), Quad Level Cell (Quad Level Cell, QLC) NAND type flash memory module (ie , a memory cell can store a 4-bit flash memory module) or other memory modules with similar characteristics. In addition, the memory cells in the memory module 122 store data by changing the threshold voltage.

記憶體控制器123連接至連接介面121與記憶體模組122。記憶體控制器123可用以控制記憶體裝置12。例如,記憶體控制器123可控制連接介面121與記憶體模組122以進行資料存取與資料管理。例如,記憶體控制器123可包括中央處理單元(CPU)、或是其他可程式化之一般用途或特殊用途的微處理器、數位訊號處理器(Digital Signal Processor, DSP)、可程式化控制器、特殊應用積體電路(Application Specific Integrated Circuits, ASIC)、可程式化邏輯裝置(Programmable Logic Device, PLD)或其他類似裝置或這些裝置的組合。The memory controller 123 is connected to the connection interface 121 and the memory module 122 . The memory controller 123 may be used to control the memory device 12 . For example, the memory controller 123 can control the connection interface 121 and the memory module 122 for data access and data management. For example, the memory controller 123 may include a central processing unit (CPU), or other programmable general-purpose or special-purpose microprocessors, digital signal processors (DSPs), programmable controllers , Application Specific Integrated Circuits (ASIC), Programmable Logic Device (PLD) or other similar devices or combinations of these devices.

在一實施例中,記憶體控制器123亦稱為快閃記憶體控制器。在一實施例中,記憶體模組122亦稱為快閃記憶體模組。記憶體模組122可接收來自記憶體控制器123的指令序列並根據此指令序列存取儲存於記憶胞中的資料。In one embodiment, the memory controller 123 is also referred to as a flash memory controller. In one embodiment, the memory module 122 is also referred to as a flash memory module. The memory module 122 can receive the command sequence from the memory controller 123 and access the data stored in the memory cells according to the command sequence.

圖2是根據本發明的一實施例所繪示的管理記憶體模組的示意圖。請參照圖1與圖2,記憶體模組122包括多個實體單元201(1)~201(B)。實體單元201(1)~201(B)中的每一個實體單元皆包括多個記憶胞且用以非揮發性地儲存資料。例如,一個實體單元可包括一或多個實體頁、一或多個實體區塊或者其他的實體管理單元。一個實體頁中的多個記憶胞可被同時程式化以儲存資料。一個實體區塊中的多個記憶胞可被同時抹除。FIG. 2 is a schematic diagram of a management memory module according to an embodiment of the present invention. Please refer to FIG. 1 and FIG. 2 , the memory module 122 includes a plurality of physical units 201(1)-201(B). Each of the physical units 201(1)-201(B) includes a plurality of memory cells and is used for non-volatile storage of data. For example, an entity unit may include one or more entity pages, one or more entity blocks, or other entity management units. Multiple memory cells in a physical page can be programmed simultaneously to store data. Multiple memory cells in a physical block can be erased simultaneously.

在一實施例中,記憶體控制器123可將實體單元201(1)~201(A)劃分至儲存區210並將實體單元201(A+1)~201(B)劃分至閒置區220。當有來自於主機系統11的新資料需要儲存時,閒置區220中的一或多個實體單元可被選擇以儲存此資料並且被劃分至儲存區210。In one embodiment, the memory controller 123 may divide the physical units 201( 1 ) to 201(A) into the storage area 210 and divide the physical units 201(A+1) to 201(B) into the idle area 220 . When new data from the host system 11 needs to be stored, one or more physical units in the idle area 220 can be selected to store this data and allocated to the storage area 210 .

在一實施例中,記憶體控制器123可配置多個邏輯單元202(1)~202(C)來映射儲存區210中的實體單元。一個邏輯單元可包括一或多個邏輯區塊位址(Logical Block Address, LBA)。In one embodiment, the memory controller 123 may configure a plurality of logical units 202( 1 ) to 202(C) to map the physical units in the storage area 210 . A logical unit may include one or more logical block addresses (Logical Block Address, LBA).

在一實施例中,記憶體控制器123可將邏輯單元與實體單元之間的映射關係則可記載於映射表格(亦稱為邏輯至實體映射表格)。例如,所述映射表格可包括快閃轉譯層(Flash Translation Layer, FTL)的映射表格或類似的映射表格。記憶體控制器123可根據此映射表格中的映射資訊來存取記憶體模組122。In one embodiment, the memory controller 123 may record the mapping relationship between the logical unit and the physical unit in a mapping table (also referred to as a logical-to-physical mapping table). For example, the mapping table may include a Flash Translation Layer (FTL) mapping table or a similar mapping table. The memory controller 123 can access the memory module 122 according to the mapping information in the mapping table.

在一實施例中,儲存區210中的實體單元201(1)~201(A)可儲存有效資料與無效資料。有效資料是屬於某一個邏輯單元的最新資料。無效資料則不是屬於任一個邏輯單元的最新資料。例如,若主機系統11將一筆新資料寫入至某一邏輯單元而覆蓋掉此邏輯單元原先儲存的舊資料(即,更新屬於此邏輯單元的資料),則儲存至儲存區210中的此筆新資料即為屬於此邏輯單元的最新資料並且會被標記為有效,而被覆蓋掉的舊資料可能仍然儲存在儲存區210中但被標記為無效。In one embodiment, the physical units 201(1)-201(A) in the storage area 210 can store valid data and invalid data. Valid data is the latest data belonging to a logical unit. Invalid data is not the latest data belonging to any one logical unit. For example, if the host system 11 writes a new data into a certain logical unit and overwrites the old data originally stored in this logical unit (ie, updates the data belonging to this logical unit), the data stored in the storage area 210 will be The new data is the latest data belonging to the logical unit and will be marked as valid, while the overwritten old data may still be stored in the storage area 210 but marked as invalid.

在一實施例中,若屬於某一邏輯單元的資料被更新,則記憶體控制器123可將此邏輯單元與儲存有屬於此邏輯單元之舊資料的實體單元之間的映射關係從所述映射表格中移除。同時,記憶體控制器123可建立此邏輯單元與儲存有屬於此邏輯單元之最新資料的實體單元之間的新的映射關係並將此新的映射關係儲存於所述映射表格中。In one embodiment, if the data belonging to a logical unit is updated, the memory controller 123 can change the mapping relationship between the logical unit and the physical unit storing the old data belonging to the logical unit from the mapping removed from the table. At the same time, the memory controller 123 can establish a new mapping relationship between the logical unit and the physical unit storing the latest data belonging to the logical unit and store the new mapping relationship in the mapping table.

在一實施例中,記憶體控制器123可將未儲存有效資料的一或多個實體單元關聯至閒置區220並可將此些實體單元抹除。被抹除的實體單元所儲存的資料將被清除。In one embodiment, the memory controller 123 may associate one or more physical units that do not store valid data to the idle area 220 and may erase these physical units. The data stored in the erased physical unit will be erased.

在一實施例中,記憶體控制器123可從主機系統11接收寫入指令。此寫入指令可指示將來自主機系統11的資料儲存於一或多個邏輯區塊位址。記憶體控制器123可根據此寫入指令將此寫入指令所攜帶的資料寫入至此寫入指令所指定的邏輯區塊位址。須注意的是,在將此寫入指令所攜帶的資料寫入至此寫入指令所指定的邏輯區塊位址的過程中,記憶體控制器123可指示記憶體模組122將此寫入指令所攜帶的資料儲存至一或多個實體單元。然後,記憶體控制器123可將此寫入指令所指定的邏輯區塊位址映射至用於儲存此寫入指令所攜帶的資料的實體單元。同時,記憶體控制器123可將此寫入指令所指定的邏輯區塊位址與用於儲存此資料的實體單元之間的映射關係儲存於所述映射表格。藉此,記憶體控制器123可完成對應於此寫入指令的資料寫入操作。In one embodiment, the memory controller 123 may receive write commands from the host system 11 . The write command may instruct data from host system 11 to be stored at one or more logical block addresses. The memory controller 123 can write the data carried by the write command to the logical block address specified by the write command according to the write command. It should be noted that in the process of writing the data carried by the write command to the logical block address specified by the write command, the memory controller 123 may instruct the memory module 122 to write the write command The carried data is stored in one or more physical units. Then, the memory controller 123 can map the logical block address specified by the write command to a physical unit for storing the data carried by the write command. At the same time, the memory controller 123 may store the mapping relationship between the logical block address specified by the write command and the physical unit for storing the data in the mapping table. Thereby, the memory controller 123 can complete the data writing operation corresponding to the writing command.

在一實施例中,主機系統11可傳送資料清除指令至記憶體裝置12。記憶體控制器123可從主機系統11接收此資料清除指令。此資料清除指令用以清除屬於某一邏輯範圍(亦稱為目標邏輯範圍)內的資料。響應於此資料清除指令,記憶體控制器123可執行跳躍式資料清除操作。須注意的是,此跳躍式資料清除操作包括將預設資料寫入至此目標邏輯範圍內的多個不連續的邏輯區塊位址。例如,此預設資料可包括不屬於使用者資料的亂數資料或無意義資料。In one embodiment, the host system 11 may transmit a data clear command to the memory device 12 . The memory controller 123 may receive the data clear command from the host system 11 . The data clearing command is used to clear data belonging to a certain logical range (also called the target logical range). In response to this data clearing command, the memory controller 123 may perform a skip data clearing operation. It should be noted that the skip data clearing operation includes writing default data to a plurality of discontinuous logical block addresses within the target logical range. For example, the default data may include random data or meaningless data not belonging to the user data.

在一實施例中,所述資料清除指令可包括至少一寫入指令。此至少一寫入指令可指示將所述預設資料寫入至所述目標邏輯範圍內的所有邏輯區塊位址。須注意的是,雖然所述資料清除指令(或寫入指令)是指示將所述預設資料寫入至所述目標邏輯範圍內的所有邏輯區塊位址,但是,記憶體控制器123並不會完全依照主機系統11的指示而將所述預設資料寫入至所述目標邏輯範圍內的所有邏輯區塊位址。In one embodiment, the data clear command may include at least one write command. The at least one write command may instruct to write the default data to all logical block addresses within the target logical range. It should be noted that although the data clear command (or write command) is to instruct to write the default data to all logical block addresses within the target logical range, the memory controller 123 does not The default data is not written to all logical block addresses within the target logical range completely in accordance with the instructions of the host system 11 .

在一實施例中,在跳躍式資料清除操作中,記憶體控制器123可將所述預設資料寫入至所述目標邏輯範圍內的某一邏輯區塊位址(亦稱為第一邏輯區塊位址)與另一邏輯區塊位址(亦稱為第二邏輯區塊位址)。第一邏輯區塊位址與第二邏輯區塊位址之間存在P個邏輯區塊位址。這P個邏輯區塊位址不被寫入所述預設資料,且P為正整數。In one embodiment, in a skip data clear operation, the memory controller 123 may write the default data to a certain logical block address (also referred to as the first logical block) within the target logical range block address) and another logical block address (also called the second logical block address). There are P logical block addresses between the first logical block address and the second logical block address. The P logical block addresses are not written into the default data, and P is a positive integer.

換言之,在跳躍式資料清除操作中,記憶體控制器123可以跳躍式的寫入方式來略過所述目標邏輯範圍內的部分邏輯區塊位址,而僅對所述目標邏輯範圍內的一部分不連續的邏輯區塊位址進行跳躍式的資料寫入。藉此,可加快對所述目標邏輯範圍內的舊資料的覆寫速度。In other words, in the skip data clearing operation, the memory controller 123 can skip part of the logical block addresses in the target logical range in a skip write manner, and only write to a part of the target logical range. Non-consecutive logical block addresses perform skip data writing. In this way, the overwriting speed of the old data within the target logical range can be accelerated.

圖3是根據本發明的一實施例所繪示的資料清除指令所指示清除的邏輯區塊位址的示意圖。請參照圖3,在一實施例中,來自圖1的主機系統11的資料清除指令指示將預設資料寫入至連續的9個邏輯區塊位址N~N+8。也就是說,對於主機系統11而言,主機系統11是想要藉由此資料清除指令來指示記憶體裝置12對邏輯區塊位址N~N+8進行所述預設資料的循序寫入,從而清除涵蓋邏輯區塊位址N~N+8的邏輯範圍內的舊資料。響應於此資料清除指令,記憶體控制器123可對此邏輯範圍內的邏輯區塊位址N~N+8執行跳躍式資料清除操作。FIG. 3 is a schematic diagram of logical block addresses to be cleared by a data clearing command according to an embodiment of the present invention. Referring to FIG. 3 , in one embodiment, the data clear command from the host system 11 of FIG. 1 instructs to write the default data to consecutive 9 logical block addresses N˜N+8. That is to say, for the host system 11, the host system 11 wants to instruct the memory device 12 to perform sequential writing of the preset data to the logical block addresses N~N+8 through the data clear command. , thereby clearing the old data in the logical range covering logical block addresses N~N+8. In response to the data clear command, the memory controller 123 may perform a skip data clear operation for logical block addresses N~N+8 within the logical range.

圖4是根據本發明的一實施例所繪示的跳躍式資料清除操作的示意圖。請參照圖4,接續於圖3的實施例,在跳躍式資料清除操作中,記憶體控制器123可略過所述邏輯範圍內的邏輯區塊位址N+1~N+3及N+5~N+7,而僅對所述邏輯範圍內的邏輯區塊位址N、N+4及N+8執行跳躍式的資料寫入,以將所述預設資料寫入至邏輯區塊位址N、N+4及N+8。FIG. 4 is a schematic diagram illustrating a skip data clearing operation according to an embodiment of the present invention. Referring to FIG. 4 , following the embodiment of FIG. 3 , in the skip data clearing operation, the memory controller 123 can skip logical block addresses N+1 to N+3 and N+ within the logical range. 5~N+7, and only perform skip data writing to logical block addresses N, N+4 and N+8 within the logical range to write the default data to the logical block Addresses N, N+4 and N+8.

須注意的是,在圖4的實施例中,是假設P為3(即連續寫入的兩個邏輯區塊位址之間存在3個被略過的邏輯區塊位址)。然而,在另一實施例中,P也可以是其他正整數(例如1或4等等)。It should be noted that, in the embodiment of FIG. 4 , it is assumed that P is 3 (that is, there are three skipped logical block addresses between two logical block addresses that are continuously written). However, in another embodiment, P may also be other positive integers (eg, 1 or 4, etc.).

在一實施例中,以相同或相似於圖4的跳躍式資料清除操作來跳躍式的覆蓋此目標邏輯範圍內的部分舊資料,可達到破壞此目標邏輯範圍內的舊資料的效果。此外,相較於完整對此目標邏輯範圍內的所有資料或所有邏輯區塊位址進行資料覆寫,所述跳躍式資料清除操作可有效減少所需寫入的資料量。In one embodiment, the same or similar to the skip data clearing operation shown in FIG. 4 is used to skip over some old data in the target logical range, so as to destroy the old data in the target logical range. In addition, the skip data clearing operation can effectively reduce the amount of data to be written compared to completely overwriting all data or all logical block addresses within the target logical range.

在一實施例中,在跳躍式資料清除操作中,在對所述目標邏輯範圍內的某一邏輯區塊位址進行資料寫入(即資料覆寫)之前,記憶體控制器123還可判斷此邏輯區塊位址是否有儲存有效資料。若此邏輯區塊位址有儲存有效資料,則記憶體控制器123可將所述預設資料寫入至此邏輯區塊位址,以覆蓋所述有效資料。然而,若此邏輯區塊位址未儲存有效資料,則記憶體控制器123可略過此邏輯區塊位址而不將所述預設資料寫入至此邏輯區塊位址。藉此,可減少無意義的資料覆寫行為。In one embodiment, in the skip data clearing operation, before data writing (ie, data overwriting) is performed to a certain logical block address within the target logical range, the memory controller 123 may also determine that Whether this logical block address has valid data stored. If valid data is stored in the logical block address, the memory controller 123 can write the default data to the logical block address to overwrite the valid data. However, if the logical block address does not store valid data, the memory controller 123 may skip the logical block address without writing the default data to the logical block address. In this way, meaningless data overwriting behavior can be reduced.

在一實施例中,在跳躍式資料清除操作中,在對所述目標邏輯範圍內的某一邏輯區塊位址進行資料寫入(即資料覆寫)之前,記憶體控制器123還可判斷此邏輯區塊位址的映射資訊是否存在於所述映射表格中。若此邏輯區塊位址的映射資訊存在於所述映射表格中(即所述映射表格中有記載與此邏輯區塊位址有關的映射資訊),表示此邏輯區塊位址當前有儲存有效資料。因此,記憶體控制器123可將所述預設資料寫入至此邏輯區塊位址,以覆蓋所述有效資料。然而,若此邏輯區塊位址的映射資訊不存在於所述映射表格中(即所述映射表格中未記載與此邏輯區塊位址有關的映射資訊),表示此邏輯區塊位址當前未儲存有效資料。因此,記憶體控制器123可略過此邏輯區塊位址而不將所述預設資料寫入至此邏輯區塊位址。In one embodiment, in the skip data clearing operation, before data writing (ie, data overwriting) is performed to a certain logical block address within the target logical range, the memory controller 123 may also determine that Whether the mapping information for this logical block address exists in the mapping table. If the mapping information of the logical block address exists in the mapping table (that is, the mapping table contains the mapping information related to the logical block address), it means that the logical block address is currently stored and valid material. Therefore, the memory controller 123 can write the default data to this logical block address to overwrite the valid data. However, if the mapping information of the logical block address does not exist in the mapping table (that is, the mapping table does not record the mapping information related to the logical block address), it means that the logical block address is currently No valid data saved. Therefore, the memory controller 123 can skip the logical block address without writing the default data to the logical block address.

在一實施例中,在從主機系統11接收所述資料清除指令之前,主機系統11可先傳送一個致能(enable)指令至記憶體裝置12。記憶體控制器123可從主機系統11接收此致能指令。響應於此致能指令,記憶體控制器123可致能所述跳躍式資料清除操作。例如,記憶體控制器123可根據此致能指令而將對應於所述跳躍式資料清除操作的一個控制參數設定為致能狀態。在此控制參數處於致能狀態的狀態下,當從主機系統11接收到所述資料清除指令(或寫入指令)時,記憶體控制器123可根據所述資料清除指令(或寫入指令)執行所述跳躍式資料清除操作。In one embodiment, the host system 11 may send an enable command to the memory device 12 before receiving the data clear command from the host system 11 . The memory controller 123 may receive the enable command from the host system 11 . In response to the enable command, the memory controller 123 may enable the skip data clearing operation. For example, the memory controller 123 may set a control parameter corresponding to the skip data clearing operation to an enabled state according to the enable command. When the control parameter is in the enabled state, when the data clear command (or write command) is received from the host system 11, the memory controller 123 can execute the data clear command (or write command) according to the data clear command (or write command). The skip data clearing operation is performed.

在一實施例中,在記憶體裝置12完成所述跳躍式資料清除操作後,主機系統11可傳送一個禁能(disable)指令至記憶體裝置12。響應於此禁能指令,記憶體控制器123可禁能所述跳躍式資料清除操作。例如,記憶體控制器123可根據此禁能指令而將對應於所述跳躍式資料清除操作的一個控制參數設定為禁能狀態。在此控制參數處於禁能狀態的狀態下,當從主機系統11接收到寫入指令時,記憶體控制器123可根據此寫入指令執行正常的資料寫入操作。在正常的資料寫入操作中,記憶體控制器123可依照寫入指令的指示,將資料寫入至寫入指令所指示的所有邏輯區塊位址。以圖3為例,當接收到指示將資料寫入至邏輯區塊位址N~N+8的寫入指令時,在正常的資料寫入操作中,記憶體控制器123可對邏輯區塊位址N~N+8執行完整的循序寫入,而非如圖4所示的跳躍式的資料寫入。In one embodiment, after the memory device 12 completes the skip data clearing operation, the host system 11 may send a disable command to the memory device 12 . In response to this disable command, the memory controller 123 may disable the skip data clear operation. For example, the memory controller 123 may set a control parameter corresponding to the skip data clearing operation to a disabled state according to the disable command. When the control parameter is in the disabled state, when a write command is received from the host system 11, the memory controller 123 can perform a normal data write operation according to the write command. In a normal data write operation, the memory controller 123 can write data to all the logical block addresses indicated by the write command according to the instruction of the write command. Taking FIG. 3 as an example, when a write command instructing to write data to logical block addresses N~N+8 is received, in a normal data write operation, the memory controller 123 can write data to the logical block. Addresses N~N+8 perform a complete sequential write instead of a skip data write as shown in FIG. 4 .

圖5是根據本發明的一實施例所繪示的跳躍式資料清除方法的流程圖。請參照圖5,在步驟S501中,從主機系統接收資料清除指令,其中所述資料清除指令用以清除屬於目標邏輯範圍內的資料。在步驟S502中,響應於所述資料清除指令,執行跳躍式資料清除操作。所述跳躍式資料清除操作包括將預設資料寫入至所述目標邏輯範圍內的多個不連續的邏輯區塊位址。FIG. 5 is a flowchart of a skip data clearing method according to an embodiment of the present invention. Referring to FIG. 5, in step S501, a data clearing command is received from the host system, wherein the data clearing command is used to clear data belonging to the target logic range. In step S502, in response to the data clearing instruction, a skip data clearing operation is performed. The skip data clearing operation includes writing preset data to a plurality of discrete logical block addresses within the target logical range.

然而,圖5中各步驟已詳細說明如上,在此便不再贅述。值得注意的是,圖5中各步驟可以實作為多個程式碼或是電路,本發明不加以限制。此外,圖5的方法可以搭配以上範例實施例使用,也可以單獨使用,本發明不加以限制。However, the steps in FIG. 5 have been described in detail as above, and will not be repeated here. It should be noted that each step in FIG. 5 can be implemented as a plurality of program codes or circuits, which is not limited by the present invention. In addition, the method of FIG. 5 can be used in conjunction with the above exemplary embodiments, and can also be used alone, which is not limited in the present invention.

綜上所述,在從主機系統接收用以清除屬於目標邏輯範圍內的資料的資料清除指令後,記憶體裝置可自動執行跳躍式資料清除操作。特別是,所述跳躍式資料清除操作包括將預設資料寫入至所述目標邏輯範圍內的多個不連續的邏輯區塊位址。藉此,可有效提高記憶體裝置的資料清除效率。To sum up, after receiving the data clearing command from the host system for clearing the data belonging to the target logical range, the memory device can automatically perform the skip data clearing operation. In particular, the skip data clearing operation includes writing preset data to a plurality of discrete logical block addresses within the target logical range. Thereby, the data clearing efficiency of the memory device can be effectively improved.

雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。Although the present invention has been disclosed above by the embodiments, it is not intended to limit the present invention. Anyone with ordinary knowledge in the technical field can make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, The protection scope of the present invention shall be determined by the scope of the appended patent application.

10:資料儲存系統 11:主機系統 12:記憶體裝置 121:連接介面 122:記憶體模組 123:記憶體控制器 210:儲存區 220:閒置區 201(1)~201(B):實體單元 202(1)~202(C):邏輯單元 S501、S502:步驟 10: Data storage system 11: Host system 12: Memory device 121: Connection interface 122: Memory module 123: Memory Controller 210: Storage area 220: idle area 201(1)~201(B): Entity unit 202(1)~202(C): Logic Unit S501, S502: steps

圖1是根據本發明的一實施例所繪示的資料儲存系統的示意圖。 圖2是根據本發明的一實施例所繪示的管理記憶體模組的示意圖。 圖3是根據本發明的一實施例所繪示的資料清除指令所指示清除的邏輯區塊位址的示意圖。 圖4是根據本發明的一實施例所繪示的跳躍式資料清除操作的示意圖。 圖5是根據本發明的一實施例所繪示的跳躍式資料清除方法的流程圖。 FIG. 1 is a schematic diagram of a data storage system according to an embodiment of the present invention. FIG. 2 is a schematic diagram of a management memory module according to an embodiment of the present invention. FIG. 3 is a schematic diagram of logical block addresses to be cleared by a data clearing command according to an embodiment of the present invention. FIG. 4 is a schematic diagram illustrating a skip data clearing operation according to an embodiment of the present invention. FIG. 5 is a flowchart of a skip data clearing method according to an embodiment of the present invention.

S501、S502:步驟 S501, S502: steps

Claims (9)

一種跳躍式資料清除方法,用於一記憶體裝置,且該跳躍式資料清除方法包括:從一主機系統接收一資料清除指令,其中該資料清除指令用以清除屬於一目標邏輯範圍內的資料;以及響應於該資料清除指令,執行一跳躍式資料清除操作,其中該跳躍式資料清除操作包括:將一預設資料寫入至該目標邏輯範圍內的多個不連續的邏輯區塊位址;判斷該目標邏輯範圍內的一特定邏輯區塊位址是否有儲存有效資料;以及若該特定邏輯區塊位址未儲存該有效資料,不將該預設資料寫入至該特定邏輯區塊位址。 A skip-type data clearing method for a memory device, and the skip-type data clearing method comprises: receiving a data clearing command from a host system, wherein the data clearing instruction is used to clear data belonging to a target logic range; and in response to the data clearing instruction, executing a skip data clearing operation, wherein the skipping data clearing operation includes: writing a preset data to a plurality of discontinuous logical block addresses within the target logical range; Determine whether a specific logical block address within the target logical range has stored valid data; and if the specific logical block address does not store the valid data, do not write the default data to the specific logical block site. 如請求項1所述的跳躍式資料清除方法,其中該資料清除指令包括至少一寫入指令,且該至少一寫入指令指示將該預設資料寫入至該目標邏輯範圍內的所有邏輯區塊位址。 The skip data clearing method according to claim 1, wherein the data clearing command includes at least one writing command, and the at least one writing command instructs to write the default data to all logical areas within the target logical range block address. 如請求項1所述的跳躍式資料清除方法,其中該預設資料包括亂數資料或無意義資料。 The skip data clearing method as claimed in claim 1, wherein the default data includes random data or meaningless data. 如請求項1所述的跳躍式資料清除方法,其中將該預設資料寫入至該目標邏輯範圍內的該多個不連續的邏輯區塊位址的步驟包括:將該預設資料寫入至該目標邏輯範圍內的一第一邏輯區塊位 址與一第二邏輯區塊位址,其中該第一邏輯區塊位址與該第二邏輯區塊位址之間存在P個邏輯區塊位址,該P個邏輯區塊位址不被寫入該預設資料,且P為正整數。 The skip data clearing method as claimed in claim 1, wherein the step of writing the default data to the plurality of discontinuous logical block addresses within the target logical range comprises: writing the default data to a first logic block bit within the target logic range address and a second logical block address, wherein there are P logical block addresses between the first logical block address and the second logical block address, and the P logical block addresses are not Write the default data, and P is a positive integer. 如請求項1所述的跳躍式資料清除方法,其中判斷該目標邏輯範圍內的該特定邏輯區塊位址是否已儲存該有效資料的步驟包括:判斷該特定邏輯區塊位址的一映射資訊是否存在於一映射表格中。 The skip data clearing method according to claim 1, wherein the step of judging whether the specific logical block address in the target logical range has stored the valid data comprises: judging a mapping information of the specific logical block address exists in a mapping table. 如請求項1所述的跳躍式資料清除方法,更包括:在從該主機系統接收該資料清除指令之前,從該主機系統接收一致能指令;以及響應於該致能指令,致能該跳躍式資料清除操作。 The skip data clearing method as claimed in claim 1, further comprising: before receiving the data clear command from the host system, receiving an enabling command from the host system; and enabling the skipping in response to the enabling command Data clear operation. 一種資料儲存系統,包括:一主機系統;以及一記憶體裝置,耦接至該主機系統,其中該主機系統用以傳送一資料清除指令至該記憶體裝置,該資料清除指令用以清除屬於一目標邏輯範圍內的資料,並且響應於該資料清除指令,該記憶體裝置用以執行一跳躍式資料清除操作,其中該跳躍式資料清除操作包括:將一預設資料寫入至該目標邏輯範圍內的多個不連續的 邏輯區塊位址;判斷該目標邏輯範圍內的一特定邏輯區塊位址是否有儲存有效資料;以及若該特定邏輯區塊位址未儲存該有效資料,不將該預設資料寫入至該特定邏輯區塊位址。 A data storage system includes: a host system; and a memory device coupled to the host system, wherein the host system is used to transmit a data clearing command to the memory device, the data clearing command is used to clear a data within the target logical range, and in response to the data clearing command, the memory device is configured to perform a skip data clearing operation, wherein the skip data clearing operation includes: writing a preset data to the target logical range multiple discontinuities within logical block address; determine whether a specific logical block address within the target logical range has stored valid data; and if the specific logical block address does not store the valid data, do not write the default data to The specific logical block address. 如請求項7所述的資料儲存系統,其中將該預設資料寫入至該目標邏輯範圍內的該多個不連續的邏輯區塊位址的操作包括:將該預設資料寫入至該目標邏輯範圍內的一第一邏輯區塊位址與一第二邏輯區塊位址,其中該第一邏輯區塊位址與該第二邏輯區塊位址之間存在P個邏輯區塊位址,該P個邏輯區塊位址不被寫入該預設資料,且P為正整數。 The data storage system of claim 7, wherein the operation of writing the default data to the plurality of discontinuous logical block addresses within the target logical range comprises: writing the default data to the A first logical block address and a second logical block address within the target logical range, wherein there are P logical block bits between the first logical block address and the second logical block address address, the P logical block addresses are not written into the default data, and P is a positive integer. 一種跳躍式資料清除方法,用於一記憶體裝置,且該跳躍式資料清除方法包括:從一主機系統接收一致能指令;響應於該致能指令,致能一跳躍式資料清除操作;從該主機系統接收一資料清除指令,其中該資料清除指令用以清除屬於一目標邏輯範圍內的資料;以及響應於該資料清除指令,執行該跳躍式資料清除操作,其中該跳躍式資料清除操作包括將一預設資料寫入至該目標邏輯範圍內的多個不連續的邏輯區塊位址。 A skip-type data clearing method for a memory device, and the skip-type data clearing method comprises: receiving an enabling command from a host system; in response to the enabling instruction, enabling a skip-type data clearing operation; The host system receives a data clearing command, wherein the data clearing command is used to clear data belonging to a target logic range; and in response to the data clearing command, executes the skip data clearing operation, wherein the skipping data clearing operation includes: A predetermined data is written to a plurality of discontinuous logical block addresses within the target logical range.
TW110107203A 2021-03-02 2021-03-02 Skipped data clean method and data storage system TWI768737B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW110107203A TWI768737B (en) 2021-03-02 2021-03-02 Skipped data clean method and data storage system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW110107203A TWI768737B (en) 2021-03-02 2021-03-02 Skipped data clean method and data storage system

Publications (2)

Publication Number Publication Date
TWI768737B true TWI768737B (en) 2022-06-21
TW202236094A TW202236094A (en) 2022-09-16

Family

ID=83104013

Family Applications (1)

Application Number Title Priority Date Filing Date
TW110107203A TWI768737B (en) 2021-03-02 2021-03-02 Skipped data clean method and data storage system

Country Status (1)

Country Link
TW (1) TWI768737B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541464A (en) * 2010-12-30 2012-07-04 慧荣科技股份有限公司 Flash storage device and data writing method thereof
TW201351141A (en) * 2012-06-13 2013-12-16 Silicon Motion Inc Data storage device and data trimming method
TW201721632A (en) * 2015-12-11 2017-06-16 捷鼎國際股份有限公司 Accelerated computer system and method for writing data into discrete pages
CN106874216A (en) * 2015-12-11 2017-06-20 捷鼎国际股份有限公司 Accelerate the computer system and its method in discontinuous page write-in data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541464A (en) * 2010-12-30 2012-07-04 慧荣科技股份有限公司 Flash storage device and data writing method thereof
TW201351141A (en) * 2012-06-13 2013-12-16 Silicon Motion Inc Data storage device and data trimming method
TW201721632A (en) * 2015-12-11 2017-06-16 捷鼎國際股份有限公司 Accelerated computer system and method for writing data into discrete pages
CN106874216A (en) * 2015-12-11 2017-06-20 捷鼎国际股份有限公司 Accelerate the computer system and its method in discontinuous page write-in data

Also Published As

Publication number Publication date
TW202236094A (en) 2022-09-16

Similar Documents

Publication Publication Date Title
US10296224B2 (en) Apparatus, system and method for increasing the capacity of a storage device available to store user data
TWI575374B (en) Mapping table updating method, memory storage device and memory control circuit unit
JP4524309B2 (en) Memory controller for flash memory
TWI409633B (en) Flash memory storage device, controller thereof, and method for programming data
CN110908925B (en) High-efficiency garbage collection method, data storage device and controller thereof
US9037782B2 (en) Method of programming memory cells and reading data, memory controller and memory storage apparatus using the same
US10496334B2 (en) Solid state drive using two-level indirection architecture
US8417875B2 (en) Non-volatile memory controller processing new request before completing current operation, system including same, and method
US9304900B2 (en) Data reading method, memory controller, and memory storage device
US9721669B2 (en) Data protection method, memory control circuit unit and memory storage apparatus
TWI698749B (en) A data storage device and a data processing method
US20220137817A1 (en) Memory system and method of operating the same
US11513949B2 (en) Storage device, and control method and recording medium thereof
CN106445401B (en) Table updating method, memory storage device and memory control circuit unit
CN112328507B (en) Memory subsystem for managing flash translation layer table updates based on unmap commands
US20200356491A1 (en) Data storage device and method for loading logical-to-physical mapping table thereof
TW201401050A (en) Data writing method, memory controller and memory storage device
TWI540428B (en) Data writing method, memory controller and memory storage apparatus
US10776280B1 (en) Data storage device and method for updating logical-to-physical mapping table
CN113885808A (en) Mapping information recording method, memory control circuit unit and memory device
TWI749279B (en) A data storage device and a data processing method
TWI768737B (en) Skipped data clean method and data storage system
TWI697778B (en) A data storage device and a data processing method
US9778864B2 (en) Data storage device using non-sequential segment access and operating method thereof
CN115079928A (en) Jumping type data clearing method and data storage system