CN117056125A - Management data backup method, memory storage device and memory controller - Google Patents

Management data backup method, memory storage device and memory controller Download PDF

Info

Publication number
CN117056125A
CN117056125A CN202311046467.5A CN202311046467A CN117056125A CN 117056125 A CN117056125 A CN 117056125A CN 202311046467 A CN202311046467 A CN 202311046467A CN 117056125 A CN117056125 A CN 117056125A
Authority
CN
China
Prior art keywords
data
memory module
memory
backup
entity unit
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202311046467.5A
Other languages
Chinese (zh)
Inventor
黄学楼
吴宗霖
陈东林
和顺芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hosin Global Electronics Co Ltd
Original Assignee
Hosin Global Electronics Co Ltd
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 Hosin Global Electronics Co Ltd filed Critical Hosin Global Electronics Co Ltd
Priority to CN202311046467.5A priority Critical patent/CN117056125A/en
Publication of CN117056125A publication Critical patent/CN117056125A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1008Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1435Saving, restoring, recovering or retrying at system level using file system or storage system metadata

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The invention provides a management data backup method, a memory storage device and a memory controller. The method comprises the following steps: monitoring the state of the memory module; and executing a backup operation on management data related to a file system in the memory module in response to the state of the memory module meeting a preset condition, wherein the management data is stored in a first entity unit in the memory module, and the host system manages user data stored in the memory module through the file system. The backup operation includes: selecting a second entity unit from at least one candidate entity unit in the memory module, wherein the candidate entity unit is not used for storing user data; and storing backup data corresponding to the management data in a second entity unit. Thus, the operation stability of the memory storage device can be improved.

Description

Management data backup method, memory storage device and memory controller
Technical Field
The present invention relates to a memory management technology, and in particular, to a management data backup method, a memory storage device and a memory controller.
Background
A rewritable non-volatile memory (rewritable non-volatile memory) has characteristics of data non-volatility, power saving, small size, no mechanical structure, and the like, and thus is widely used in various electronic devices. The rewritable nonvolatile memory has a plurality of physical blocks (physical blocks), and each physical block has a plurality of physical pages (physical pages). The physical block is the minimum unit of data erasing, and the physical page is the minimum unit of data writing. Rewritable nonvolatile memories are widely used in storage fields such as solid state disks.
A file system (file system) table and a user data table are generally stored in the solid state disk. The file system table in the solid state disk refers to a table of each file and directory structure of the record file system stored on the hard disk. It records information such as names, sizes, creation times, modification times, access rights, etc. of files and directories so that an Operating System (OS) can properly manage and access the files. Common file system tables include FAT16/32, NTFS, EXTFAT, and the like. On the other hand, the user data table in the solid state disk is used for recording the data table of the information such as the position, the size, the authority and the like of the file and the folder. The system is an important component in the solid state disk, and can help an operating system to quickly locate and access user data. The user data table is typically managed by firmware in the controller chip, and may be optimized and improved by firmware upgrades or the like.
In the related art, a user data table, a file system table, and user data are stored together, and thus a problem of erroneous deletion of the user data table and the file system table often occurs. In addition, when the memory storage device is abnormally powered off, errors in the user data table and the file system table are easily caused. At present, a log file system is generally utilized to solve the problems, but in a practical application environment, although the file system uses a log recording mode, the problem that a file cannot be mounted normally due to a file error still occurs, and particularly, a subsequent series of problems may be caused by a mounting failure in a starting process.
Disclosure of Invention
The invention provides a management data backup method, a memory storage device and a memory controller, which can improve the operation stability of the memory storage device.
The embodiment of the invention provides a management data backup method which is used for a memory module. The management data backup method comprises the following steps: monitoring a state of the memory module; and performing a backup operation on management data related to a file system in the memory module in response to the state of the memory module meeting a preset condition, wherein the management data is stored in a first entity unit in the memory module, and the host system manages user data stored in the memory module through the file system, wherein the backup operation comprises: selecting a second entity unit from at least one candidate entity unit in the memory module, wherein the at least one candidate entity unit is not used for storing the user data; and storing backup data corresponding to the management data into the second entity unit.
The embodiment of the invention further provides a memory storage device, which comprises a connection interface, a memory module and a memory controller. The connection interface is used for connecting to a host system. The memory controller is connected to the connection interface and the memory module. The memory controller is to: monitoring a state of the memory module; and performing a backup operation on management data related to a file system in the memory module in response to the state of the memory module meeting a preset condition, wherein the management data is stored in a first entity unit in the memory module, and the host system manages user data stored in the memory module through the file system, wherein the backup operation comprises: selecting a second entity unit from at least one candidate entity unit in the memory module, wherein the at least one candidate entity unit is not used for storing the user data; and storing backup data corresponding to the management data into the second entity unit.
The embodiment of the invention further provides a memory controller for controlling the memory module. The memory controller includes a host interface, a memory interface, and a memory control circuit. The host interface is configured to connect to a host system. The memory interface is configured to connect to a memory module. The memory control circuit is connected to the host interface and the memory interface. The memory control circuit is to: monitoring a state of the memory module; and performing a backup operation on management data related to a file system in the memory module in response to the state of the memory module meeting a preset condition, wherein the management data is stored in a first entity unit in the memory module, and the host system manages user data stored in the memory module through the file system, wherein the backup operation comprises: selecting a second entity unit from at least one candidate entity unit in the memory module, wherein the at least one candidate entity unit is not used for storing the user data; and storing backup data corresponding to the management data into the second entity unit.
Based on the above, if the state of the memory module meets the preset condition, the management data related to the file system in the memory module may be automatically backed up, including backing up the backup data corresponding to the management data of the first entity unit originally stored in the memory module to the second entity unit in the candidate entity unit. Wherein the candidate entity units are not used for storing user data. Therefore, the problem that the device cannot be started normally due to the damage or loss of management data related to a file system in the memory module can be reduced, and the operation stability of the memory storage device is improved.
Drawings
FIG. 1 is a schematic diagram of a memory storage device according to an embodiment of the invention;
FIG. 2 is a schematic diagram of a memory controller shown according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a managed memory module shown in accordance with an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating performing a backup operation on management data related to a file system, according to an embodiment of the invention;
fig. 5 is a flowchart illustrating a method of managing data backup according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to the exemplary embodiments of the present invention, examples of which are illustrated in the accompanying drawings. Wherever possible, the same reference numbers will be used throughout the drawings and the description to refer to the same or like parts.
FIG. 1 is a schematic diagram of a memory storage device according to an embodiment of the present invention. Referring to fig. 1, a memory storage system 10 includes a host system 11 and a memory storage device 12. Host system 11 may be any type of computer system. For example. The host system 11 may be a notebook computer, a desktop computer, a smart phone, a tablet computer, an industrial computer, a server, a game console, or a digital camera.
The memory storage device 12 is used to store data from the host system 11. For example, memory storage 12 may include a solid state disk, a USB flash drive, a memory card, or other type of non-volatile storage. Host system 11 may be electrically connected to memory storage device 12 through a serial advanced technology attachment (Serial Advanced Technology Attachment, SATA) interface, a peripheral component interconnect Express (Peripheral Component Interconnect Express, PCI Express), a universal serial bus (Universal Serial Bus, USB), or other type of connection interface. Thus, host system 11 may store data to memory storage device 12 and/or read data from memory storage device 12.
Memory storage 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 storage device 12 to the host system 11. For example, connection interface 121 may support connection interface standards such as SATA, PCI Express, or USB. Memory storage 12 may communicate with host system 11 through connection interface 121.
The memory module 122 is used for storing data. For example, the memory module 122 may include a rewritable nonvolatile memory module. The memory module 122 may include an array of memory cells. The memory cells in the memory module 122 store data in the form of voltages. For example, the memory module 122 may include a single Level Cell (Single Level Cell, SLC) NAND-type flash memory module, a Multi Level Cell (MLC) NAND-type flash memory module, a third Level Cell (Triple Level Cell, TLC) NAND-type flash memory module, a Quad Level Cell (QLC) NAND-type flash memory module, and/or other memory modules having similar characteristics.
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 storage device 12. For example, the memory controller 123 may 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 (Central Processing Unit, CPU), or other programmable general purpose or special purpose microprocessor, digital signal processor (Digital Signal Processor, DSP), programmable controller, application specific integrated circuit (Application Specific Integrated Circuits, ASIC), programmable logic device (Programmable Logic Device, PLD), or other similar device or combination of devices.
In one embodiment, 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 may receive a sequence of instructions from the memory controller 123 and perform data writing, reading, and erasing on the memory cells in the memory module 122 according to the sequence of instructions.
FIG. 2 is a schematic diagram of a memory controller according to an embodiment of the invention. Referring to fig. 1 and 2, the memory controller 123 includes a host interface 21, a memory interface 22, and a memory control circuit 23. The host interface 21 is used to connect to the host system 11 through the connection interface 121 to communicate with the host system 11. The memory interface 22 is used to connect to the memory module 122 to access the memory module 122.
The memory control circuit 23 is connected to the host interface 21 and the memory interface 22. The memory control circuit 23 may communicate with the host system 11 through the host interface 21 and access the memory module 122 through the memory interface 22. For example, the memory control circuit 23 may receive various operation instructions (e.g. a read instruction, a write instruction, or an erase instruction) from the host system 11 through the host interface 21 and issue corresponding instruction sequences (e.g. a read instruction sequence, a write instruction sequence, or an erase instruction sequence) to the memory module 122 through the memory interface 22. In addition, the memory control circuit 23 may transfer data to the host system 11 through the host interface 21.
In one embodiment, the memory control circuit 23 may also be considered a control core of the memory controller 123. In the following embodiment, the explanation of the memory control circuit 23 is equivalent to the explanation of the memory controller 123. In addition, the memory control circuit 23 may include one or more buffer memories for temporarily storing data.
FIG. 3 is a schematic diagram illustrating managing memory modules according to an embodiment of the invention. Referring to fig. 1 to 3, the memory module 122 includes a plurality of physical units 301 (1) to 301 (C). Each physical unit comprises a plurality of memory cells and is used for non-volatile storage of data. For example, a physical unit may include one or more physical blocks. Each entity unit may include a plurality of entity pages. Multiple memory cells in one physical page may be programmed simultaneously to store data. In addition, all memory cells in a physical cell (or physical block) can be erased simultaneously.
In one embodiment, the physical units 301 (1) -301 (A), 301 (A+1) -301 (B), and 301 (B+1) -301 (C) in the memory module 122 can be logically divided into a user data area 310, a system area 320, and a replacement area 330. The entity units 301 (1) -301 (a) in the user data area 310 are used to store data (also referred to as user data) from the host system 11. The entity units 301 (a+1) -301 (B) in the system area 320 are used to store system data, such as various system data related to firmware operation of the memory control circuit 23, including logic-to-entity (Logical to Physical, L2P) mapping tables and bad block management tables.
It should be noted that the physical units 301 (b+1) -301 (C) in the replacement area 330 are preset to perform bad block replacement (bad block replacement). For example, when a bad block (e.g., a physical unit with a Bit Error Rate (BER) higher than a threshold) occurs in the user data area 310 or the system area 320, the physical unit in the replacement area 330 may be used to replace the bad block in the user data area 310 or the system area 320. For example, the maximum capacity of the physical units 301 (b+1) -301 (C) in the replacement area 330 may be about 4% -5% of the total capacity of the memory module 122, but the present invention is not limited thereto.
The memory control circuit 23 may configure a plurality of logic cells 302 (1) -302 (D) to map physical cells in the user data area 310. For example, if a certain entity unit is currently mapped by a logical unit, it indicates that valid data is stored in the entity unit. However, if a certain physical unit is not currently mapped by any logical unit, it indicates that no valid data is stored in the physical unit.
In one embodiment, a logical unit may be composed of one or more logical addresses. For example, one logical address may include one or more logical block addresses (Logical Block Address, LBA). The mapping relationship between the logical unit and the physical unit may be recorded in the logical-to-physical mapping table. When receiving an access command from the host system 11, the memory control circuit 23 can access the physical units in the user data area 310 according to the logical-to-physical mapping table. For example, the memory control circuit 23 can perform data reading, writing or erasing on specific physical units in the user data area 310 according to the logic-to-physical mapping table and the access command from the host system 11.
In one embodiment, the memory module 122 may include multiple planes. Each plane may include a plurality of physical units. The memory control circuit 23 may perform a single plane access operation or a multi-plane access operation on the memory module 122. In a single plane access operation, the memory control circuit 23 performs data reading, writing, or erasing for only one or more physical cells in a single plane in the memory module 122. In a multi-plane access operation, the memory control circuit 23 may perform cross-plane data reads, writes, or erasures for a plurality of physical cells in a plurality of planes in the memory module 122.
In one embodiment, after the memory storage device 10 is powered up, the memory control circuit 23 may monitor the state of the memory module 122. For example, the state of the memory module 122 may reflect various operational behaviors such as whether the memory module 122 is performing a read operation, a write operation, an erase operation, a garbage collection (Garbage Collection, GC) operation, a wear leveling (wear leveling) operation, or a data refresh (data refresh) at a particular point in time.
In one embodiment, the memory module 122 may perform the aforementioned operations such as read operation, write operation, erase operation, garbage collection operation, wear leveling operation, or data refresh while busy. For example, assume that at some point in time (also referred to as a first point in time), the memory module 122 is performing the aforementioned operations of read operation, write operation, erase operation, garbage collection operation, wear leveling operation, or data refresh. The memory control circuit 23 may determine that the memory module 122 is in a busy state at a first point in time.
In one embodiment, the memory module 122 does not perform the above-described operations such as read operation, write operation, erase operation, garbage collection operation, wear leveling operation, or data refresh during the idle state. For example, assume that at another point in time (also referred to as a second point in time), the memory module 122 is not performing the aforementioned operations of read operation, write operation, erase operation, garbage collection operation, wear leveling operation, or data refresh. The memory control circuit 23 may determine that the memory module 122 is in an idle state at the second time point.
In one embodiment, the memory control circuit 23 can determine whether the state of the memory module 122 meets a specific condition (also referred to as a preset condition). For example, the memory control circuit 23 may obtain the length of time that the memory module 122 is in the idle state according to the state of the memory module 122. For example, the memory control circuit 23 may start a counter after the memory module 122 enters an idle state. The count value of this counter may reflect the length of time memory module 122 is in an idle state. For example, the count value of this counter may be positively correlated to the length of time that memory module 122 is in an idle state. That is, the count value of the counter may correspondingly increase as the length of time that the memory module 122 is in the idle state increases.
In one embodiment, the memory control circuit 23 can determine whether the state of the memory module 122 meets the preset condition according to the length of time the memory module 122 is in the idle state. For example, the memory control circuit 23 can determine whether the length of time the memory module 122 is in the idle state is greater than a threshold value. For example, the threshold may be 10 seconds, and the threshold may be adjusted according to the practical requirements.
In one embodiment, in response to the length of time that the memory module 122 is in the idle state being greater than the threshold, the memory control circuit 23 may determine that the state of the memory module 122 meets a preset condition. However, if the length of time that the memory module 122 is in the idle state is not greater than (e.g., less than or equal to) the threshold value, the memory control circuit 23 may determine that the state of the memory module 122 does not meet the predetermined condition.
In one embodiment, in response to the status of the memory module 122 meeting a predetermined condition, the memory control circuit 23 may perform a backup operation on management data related to a file system (file system) in the memory module 122. For example, such management data may be stored in a particular physical unit (also referred to as a first physical unit) in the memory module 122. In particular, host system 11 may manage user data stored in memory module 122 through this file system.
In an embodiment, the management data related to the file system includes a file system table and a user data table. This file system table may include a table stored in the memory module 122 and used to record various files and directory structures of the file system. For example, the file system table may record management information such as names, sizes, creation times, modification times, access rights, and the like of the respective files and directories. An Operating System (OS) of the host System 11 can manage and access such files according to such management information. For example, common file system tables include FAT16/32, NTFS, EXTFAT, and the like. On the other hand, the user data table is used for recording management information such as the position, the size, the authority and the like of each file (or folder) in the file system. Similar to the file system table, the user data table may be used to assist the operating system of host system 11 in locating and accessing specific user data quickly.
In one embodiment, after the memory storage device 10 is powered up, the memory control circuit 23 may run a boot program to perform an initialization operation on the memory storage device 10. For example, in this boot-up procedure, the memory control circuit 23 may read the management data related to the file system from the first physical unit. Host system 11 may request such management data from memory storage device 10 to complete initialization (e.g., mount settings) of the file system and memory storage device 10. After initialization of the file system and memory storage device 10 is completed, host system 11 may access memory storage device 10 based on this file system.
In one embodiment, in the boot-up procedure, if the host system 11 cannot successfully obtain the management data related to the file system, the host system 11 cannot complete the initialization of the file system and the memory storage device 10 (and the memory storage device 10 cannot be successfully booted up). In this case, the host system 11 will not be able to access the memory storage device 10.
In an embodiment, the entity unit (i.e., the first entity unit) for storing the management data may be located in the user data area 310 before performing a backup operation on the management data related to the file system. In this case, the management data related to the file system is stored in the user data area 310 in a intermixed manner with other user data from the host system 11. Thus, the host system 11 may erroneously delete or erroneously modify the management data related to the file system at any time. Once the data content of the management data is erroneous or even lost, it may result in a failure to initialize the file system and the memory storage device 10.
In one embodiment, in response to the status of the memory module 122 meeting a predetermined condition (e.g., after the memory module 122 has been idle for a period of time), the memory control circuit 23 may perform a backup operation on the management data related to the file system in the memory module 122 to store the backup data of the management data separately from other user data. By storing the backup data of the management data separately from other user data, the problem that the device cannot be started up normally due to the damage or loss of the management data can be reduced, thereby improving the operation stability of the memory storage device 10.
In one embodiment, in the backup operation, the memory control circuit 23 may select one or more physical units (also referred to as second physical units) from among the specific physical units (also referred to as candidate physical units) in the memory module 122. In particular, the candidate entity units are not used for storing user data. The memory control circuit 23 may then instruct the memory module 122 to store backup data corresponding to the management data into the second entity unit. In an embodiment, in the backup operation, the memory control circuit 23 may instruct the memory module 122 to perform a read operation on the first entity unit to obtain backup data corresponding to the management data.
In one embodiment, the candidate entity units are located in the replacement area 330 of FIG. 3 and are preset to perform bad block replacement. In one embodiment, after dividing the replacement area 330, the memory control circuit 23 may further set one or more entity units preset in the replacement area 330 for performing bad block replacement to belong to the candidate entity units.
In one embodiment, in response to a certain entity unit in the replacement area 330 being set as belonging to the candidate entity unit, the entity unit is reserved for storing backup data corresponding to the management data, but is not temporarily used for performing the bad block replacement. In one embodiment, the candidate entity may also be located in the system area 320 of fig. 3 or elsewhere, so long as it does not belong to the user data area 310. In addition, the total number of the candidate entity units may be one or more, which is not limited in the present invention.
FIG. 4 is a schematic diagram illustrating performing a backup operation on management data related to a file system, according to an embodiment of the present invention. Referring to fig. 1 to 4, it is assumed that the entity unit 410 is a first entity unit, and management data 401 related to a file system is stored in the entity unit 410. For example, the management data 401 includes a file system table and a user data table related to a file system.
In a backup operation, the memory control circuit 23 may instruct the memory module 122 to perform a read operation on the entity unit 410 to obtain backup data 402 corresponding to the management data 401. The memory control circuit 23 may select at least one entity unit 420 as the second entity unit from the entity units 420 (1) to 420 (E) belonging to the candidate entity units. The memory control circuit 23 may then instruct the memory module 122 to write the backup data 402 into the physical unit 420. Thus, one backup operation is completed.
In one embodiment, after the backup operation is completed, the memory control circuit 23 may instead read the backup data 402 from the entity unit 420 to obtain the file system table and the user data table related to the file system even if the management data 401 originally stored in the entity unit 410 is destroyed or lost. Therefore, the problem that the device cannot be started up normally due to the damage or the loss of the management data can be reduced as much as possible, and the operation stability of the memory storage device 10 is improved.
In one embodiment, the first physical unit and the second physical unit are located in the same plane in the memory module 112. In one embodiment, the first physical unit and the second physical unit may also be located in different planes in the memory module 112, which is not limited by the present invention.
In one embodiment, the memory control circuit 23 may repeatedly perform the backup operation in response to the status of the memory module 122 meeting a predetermined condition (e.g., after the memory module 122 has been idle for a period of time). For example, in one embodiment, the memory control circuit 23 may store the backup data corresponding to the management data to another entity unit (also referred to as a third entity unit) in a next backup operation. The third entity unit is different from the second entity unit, and the third entity unit is also selected from the candidate entity units. Thus, it is ensured that the information in the backup data is kept in the latest synchronization with the information in the management data.
In one embodiment, in the backup operation, the memory control circuit 23 may perform data compression on the backup data to obtain compressed data (also referred to as compressed data). In particular, the amount of data of this compressed data may be less than (or equal to) the original amount of data of the backup data. For example, the memory control circuit 23 may employ dictionary compression, blue-rivaroot-Wei Qu (Lempel-Ziv-Welch, LZW) encoding, or other types of data compression algorithms to perform the data compression, which are not described in detail herein. The memory control circuit 23 may then instruct the memory module 122 to store the compressed data into the second entity unit to reduce the data amount of the stored backup data. Later, when the backup data is to be read, the memory control circuit 23 can instruct the memory module 122 to read the compressed data from the second entity unit. The memory control circuit 23 may then perform decompression on this compressed data to restore the compressed data to the backup data.
In an embodiment, the memory control circuit 23 may detect a data modification behavior of the host system 11 for the management data related to the file system. For example, this data modification action includes modifying the data content of the management data and/or deleting the management data. In one embodiment, in response to this data modification behavior, the memory control circuit 23 may perform an alert action. For example, the alert action may include generating alert information corresponding to the data modification activity and/or logging (log) data corresponding to the data modification activity. For example, the alert information may be presented on a display of the host system 11, an email box to the manager, and/or by a particular application, etc., as the invention is not limited.
In an embodiment, the alert action may also include (temporarily) blocking or disabling the data modification action from being performed. For example, when the manager knows through the warning information that the host system 11 attempts to modify the management data related to the file system, the manager can perform a user operation through an input/output interface (e.g., a mouse, a keyboard, or a touch pad) of the host system 11. If the user operation reflects that the manager allows the data modification, the memory control circuit 23 may instruct the memory module 122 to perform the data modification. However, if the user operation reflects that the manager does not allow the data modification, the memory control circuit 23 may not instruct the memory module 122 to perform the data modification. Thus, the situation that the management data is accidentally modified or deleted by the user can be reduced.
In an embodiment, the memory control circuit 23 may also use additional data encryption techniques to protect the management data and/or the backup data corresponding to the management data. For example, in storing the management data and/or the backup data corresponding to the management data, the memory control circuit 23 may encrypt the management data and/or the backup data by an additional data encryption technique and/or by importing an additional encryption device. The encrypted management data and/or the backup data may then be stored into the memory module 122. When the management data or the backup data is to be read from the memory module 122, the memory control circuit 23 may decrypt the read management data or backup data by the additional data encryption technology and/or the additional encryption device to restore the original management data or backup data. Thereby, the data protection capability for the management data and/or the backup data can be further improved.
Fig. 5 is a flowchart illustrating a method of managing data backup according to an embodiment of the present invention. Referring to fig. 5, in step S510, the status of the memory module is monitored. In step S520, it is determined whether the status of the memory module meets the preset condition. If the status of the memory module meets the preset condition, in step S530, a backup operation is performed on management data related to the file system in the memory module, wherein the management data is stored in the first entity unit in the memory module, and the host system can manage the user data stored in the memory module through the file system.
Further, step S530 includes steps S531 and S532. In step S531, a second entity unit is selected from at least one candidate entity unit in the memory module. In particular, the candidate entity units are not used for storing user data. In step S532, backup data corresponding to the management data is stored in the second entity unit.
However, the steps in fig. 5 are described in detail above, and will not be described again here. It should be noted that each step in fig. 5 may be implemented as a plurality of program codes or circuits, and the present invention is not limited thereto. In addition, the method of fig. 5 may be used with the above exemplary embodiments, or may be used alone, and the present invention is not limited thereto.
In summary, the management data backup method, the memory storage device and the memory controller provided by the embodiments of the present invention can effectively reduce the problem that the device cannot be started up normally due to the damage or loss of the management data related to the file system in the memory module, thereby improving the operation stability of the memory storage device.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.

Claims (21)

1. A method of managing data backup for a memory module, the method comprising:
monitoring a state of the memory module; and
in response to the status of the memory module meeting a preset condition, performing a backup operation on management data in the memory module related to a file system, wherein the management data is stored in a first physical unit in the memory module, and a host system manages user data stored in the memory module through the file system,
wherein the backup operation comprises:
selecting a second entity unit from at least one candidate entity unit in the memory module, wherein the at least one candidate entity unit is not used for storing the user data; and
and storing backup data corresponding to the management data into the second entity unit.
2. The method of claim 1, wherein the at least one candidate entity unit is pre-set for performing bad block replacement.
3. The management data backup method of claim 1, further comprising:
and judging whether the state of the memory module accords with the preset condition according to the time length of the memory module in the idle state.
4. The management data backup method of claim 3 wherein determining whether the state of the memory module meets the preset condition based on the length of time the memory module is in the idle state comprises:
and in response to the length of time the memory module is in the idle state being greater than a threshold, determining that the state of the memory module meets the preset condition.
5. The method of managing data backup of claim 1 wherein the backup operation further comprises:
and executing a reading operation on the first entity unit to obtain the backup data.
6. The management data backup method of claim 1, wherein storing the backup data corresponding to the management data into the target entity unit comprises:
performing data compression on the backup data to obtain compressed data, wherein the data amount of the compressed data is smaller than the original data amount of the backup data; and
and storing the compressed data into the second entity unit.
7. The management data backup method of claim 1, further comprising:
detecting data modification behavior of the host system for the management data; and
and executing an alarm action in response to the data modification behavior.
8. A memory storage device, comprising:
a connection interface for connecting to a host system;
a memory module; and
a memory controller connected to the connection interface and the memory module,
wherein the memory controller is to:
monitoring a state of the memory module; and
in response to the status of the memory module meeting a preset condition, performing a backup operation on management data in the memory module related to a file system, wherein the management data is stored in a first physical unit in the memory module, and the host system manages user data stored in the memory module through the file system,
wherein the backup operation comprises:
selecting a second entity unit from at least one candidate entity unit in the memory module, wherein the at least one candidate entity unit is not used for storing the user data; and
and storing backup data corresponding to the management data into the second entity unit.
9. The memory storage device of claim 8, wherein the at least one candidate entity unit preset is for performing bad block replacement.
10. The memory storage device of claim 8, wherein the memory controller is further to:
and judging whether the state of the memory module accords with the preset condition according to the time length of the memory module in the idle state.
11. The memory storage device of claim 10, wherein the operation of the memory controller determining whether the state of the memory module meets the preset condition based on the length of time the memory module is in the idle state comprises:
and in response to the length of time the memory module is in the idle state being greater than a threshold, determining that the state of the memory module meets the preset condition.
12. The memory storage device of claim 8, wherein the backup operation further comprises:
and executing a reading operation on the first entity unit to obtain the backup data.
13. The memory storage device of claim 8, wherein the operation of the memory controller storing the backup data corresponding to the management data into the target entity unit comprises:
performing data compression on the backup data to obtain compressed data, wherein the data amount of the compressed data is smaller than the original data amount of the backup data; and
and storing the compressed data into the second entity unit.
14. The memory storage device of claim 8, wherein the memory controller is further to:
detecting data modification behavior of the host system for the management data; and
and executing an alarm action in response to the data modification behavior.
15. A memory controller for controlling a memory module, the memory controller comprising:
a host interface for connecting to a host system;
a memory interface for connecting to the memory module; and
a memory control circuit connected to the host interface and the memory interface,
wherein the memory control circuit is to:
monitoring a state of the memory module; and
in response to the status of the memory module meeting a preset condition, performing a backup operation on management data in the memory module related to a file system, wherein the management data is stored in a first physical unit in the memory module, and the host system manages user data stored in the memory module through the file system,
wherein the backup operation comprises:
selecting a second entity unit from at least one candidate entity unit in the memory module, wherein the at least one candidate entity unit is not used for storing the user data; and
and storing backup data corresponding to the management data into the second entity unit.
16. The memory controller of claim 15, wherein the at least one candidate entity unit preset is for performing bad block replacement.
17. The memory controller of claim 15, wherein the memory control circuitry is further to:
and judging whether the state of the memory module accords with the preset condition according to the time length of the memory module in the idle state.
18. The memory controller of claim 17, wherein the operation of the memory control circuit to determine whether the state of the memory module meets the preset condition based on the length of time the memory module is in the idle state comprises:
and in response to the length of time the memory module is in the idle state being greater than a threshold, determining that the state of the memory module meets the preset condition.
19. The memory controller of claim 15, wherein the backup operation further comprises:
and executing a reading operation on the first entity unit to obtain the backup data.
20. The memory controller of claim 15, wherein the operation of the memory control circuit to store the backup data corresponding to the management data into the target entity unit comprises:
performing data compression on the backup data to obtain compressed data, wherein the data amount of the compressed data is smaller than the original data amount of the backup data; and
and storing the compressed data into the second entity unit.
21. The memory controller of claim 15, wherein the memory control circuitry is further to:
detecting data modification behavior of the host system for the management data; and
and executing an alarm action in response to the data modification behavior.
CN202311046467.5A 2023-08-18 2023-08-18 Management data backup method, memory storage device and memory controller Pending CN117056125A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311046467.5A CN117056125A (en) 2023-08-18 2023-08-18 Management data backup method, memory storage device and memory controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311046467.5A CN117056125A (en) 2023-08-18 2023-08-18 Management data backup method, memory storage device and memory controller

Publications (1)

Publication Number Publication Date
CN117056125A true CN117056125A (en) 2023-11-14

Family

ID=88668885

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311046467.5A Pending CN117056125A (en) 2023-08-18 2023-08-18 Management data backup method, memory storage device and memory controller

Country Status (1)

Country Link
CN (1) CN117056125A (en)

Similar Documents

Publication Publication Date Title
US11113149B2 (en) Storage device for processing corrupted metadata and method of operating the same
US11474899B2 (en) Operation method of open-channel storage device
TWI524183B (en) Data writing method, memory control circuit unit and memory storage apparatus
US11138080B2 (en) Apparatus and method for reducing cell disturb in an open block of a memory system during a recovery procedure
CN108932107B (en) Data storage device and operation method thereof
CN103403691A (en) Information processing device, external storage device, host device, relay device, control program, and control method of information processing device
CN109144899B (en) Method for managing table recovery
KR20220001222A (en) Memory system for handling a bad block and operation method thereof
KR20170111386A (en) Data storage device and operating method thereof
US11294779B2 (en) Memory device providing fast data recovery
KR20160074025A (en) Operating method for data storage device
CN111198780B (en) Apparatus and method for performing a restore operation of a memory system
CN113741798A (en) Data storage device and operation method thereof
TWI651650B (en) Memory management method and storage controller using the same
US10635583B2 (en) Memory management method and storage controller
KR20160119607A (en) Data storage device and operating method thereof
US11256435B2 (en) Method and apparatus for performing data-accessing management in a storage server
US11314453B2 (en) Memory system managing map data based on risk of malware—infection of host, and operating method thereof
KR102687571B1 (en) Memory system and controller
CN117056125A (en) Management data backup method, memory storage device and memory controller
CN114968630A (en) Failed die management method for improving storage device availability
KR20230037255A (en) Method for managing event log, controller and storage device
CN110162493B (en) Memory management method and memory controller using same
CN109002265B (en) Data processing method and related device
KR20210142863A (en) Apparatus and method for increasing operation efficiency in a memory system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination