Storage device and electronic device including the same

By managing user area capacity based on the usage ratio in the storage controller, the problem of delaying change to read-only mode in the maximum bad block state is solved, and the continuity protection of data updates is achieved.

CN119620926APending Publication Date: 2025-03-14SAMSUNG ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411024665.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-09-13
Filing Date
2024-07-29
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

In devices that are essential for data updates, changing to read-only mode in the maximum bad block state can cause fatal problems and need to be postponed.

Method used

By configuring management of the user area and OP area in the storage controller, the capacity of the user area is reduced based on the usage ratio of the user area, without immediately changing to read-only mode, and sending replacement notifications to the host device if necessary.

Benefits of technology

The time point when the storage device changes from read-write mode to read-only mode is delayed, and equipment failures that may be caused by sudden conversion are avoided, ensuring the continuity of data updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119620926A_ABST
    Figure CN119620926A_ABST
Patent Text Reader

Abstract

The invention provides a storage device and an electronic device including the same. The storage device includes: a non-volatile memory including a plurality of memory blocks located in any one of a user area, a reservation area, and an over-provisioning (OP) area; the storage controller is configured to execute bad block management operation on the plurality of storage blocks, and the storage controller is further configured to determine whether the number of bad blocks is larger than the maximum number of bad blocks or not based on the fact that the storage blocks in the user area are detected to be bad blocks; and based on the number of bad blocks being greater than the maximum number of bad blocks, reducing a capacity of the user area based on a usage ratio of the user area and maintaining an OP capacity of the OP area as it is.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to a storage device capable of performing a bad block management operation and an electronic device including the storage device. Background Art

[0002] Storage devices are used to store data and are classified into volatile memory and non-volatile memory. Non-volatile memory such as NAND flash memory may include bad blocks that are physically damaged and cannot guarantee data reliability. Bad blocks may include initial bad blocks generated when the non-volatile memory is initially manufactured and runtime bad blocks generated when the non-volatile memory is used. The storage device may perform a bad block management operation to prevent data from being lost due to being written on such bad blocks.

[0003] In this case, in the maximum bad block state in which the number of bad blocks in the nonvolatile memory is greater than the maximum bad block number, the storage device may be changed to a read-only mode in which data writing is not further permitted. If the storage device is in the read-only mode, data updating is stopped, and the storage device needs to be replaced. However, in a device such as an autonomous vehicle where data updating is essential, stopping data updating by changing to the read-only mode due to the maximum bad block state may cause a fatal problem. Therefore, a method capable of postponing the change to the read-only mode in the maximum bad block state is required. Summary of the invention

[0004] One or more embodiments provide a storage device that can postpone changing to a read-only mode in a maximum bad block state.

[0005] According to one aspect of an example embodiment, a storage device includes: a nonvolatile memory, the nonvolatile memory including a plurality of storage blocks located in any one of a user area, a reserved area, and an over-provisioning (OP) area; and a storage controller, the storage controller being configured to perform a bad block management operation on the plurality of storage blocks, wherein the storage controller is further configured to: determine whether the number of bad blocks is greater than a maximum number of bad blocks based on a storage block in the user area being detected as a bad block; and based on the number of bad blocks being greater than the maximum number of bad blocks, reduce the capacity of the user area based on a usage ratio of the user area and maintain the OP capacity of the OP area as it is.

[0006] According to one aspect of an example embodiment, a storage device includes: a non-volatile memory, the non-volatile memory including multiple planes, each of the multiple planes including multiple storage blocks; and a storage controller, the storage controller configured to perform a bad block management operation on each of the multiple planes, wherein the multiple storage blocks in each of the multiple planes are located in any one of a user area, a reserved area, and an over-provisioning (OP) area, the multiple planes including a first plane, and the storage controller is further configured to: based on the storage blocks in the user area of ​​the first plane being detected as bad blocks, perform subsequent operations based on whether the number of bad blocks of the first plane is greater than a maximum number of bad blocks and a usage ratio of the user area of ​​the first plane, and the subsequent operations include reducing the capacity of the user area of ​​the first plane.

[0007] According to one aspect of an example embodiment, an electronic device includes: a host device, the host device being configured to generate a write request or a read request for data; and a storage device, the storage device being configured to perform an operation corresponding to the write request or the read request, wherein the storage device includes: a non-volatile memory, the non-volatile memory including a plurality of storage blocks located in any one of a user area, a reserved area, and an over-provisioning (OP) area; and a storage controller, the storage controller being configured to perform a bad block management operation on the plurality of storage blocks, and the storage controller being further configured to: determine whether the number of bad blocks is greater than a maximum number of bad blocks based on a storage block in the user area being detected as a bad block; and reduce the capacity of the user area based on a usage ratio of the user area and send a replacement notification to the host device based on the fact that the number of bad blocks is greater than the maximum number of bad blocks. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] Embodiments will be more clearly understood from the following detailed description taken in conjunction with the accompanying drawings, in which:

[0009] Figure 1 is a block diagram illustrating an electronic device including a storage device according to an embodiment;

[0010] Figure 2 An operation of detecting a bad block in a state where a first plane of a nonvolatile memory of a storage device is not in a maximum bad block state according to an embodiment is illustrated;

[0011] Figure 3 An operation of detecting a bad block in a state where a first plane of a nonvolatile memory of a storage device is in a maximum bad block state according to an embodiment is illustrated;

[0012] Figure 4is an example of a maximum reduction capacity reference table that can be used in a storage device according to an embodiment;

[0013] Figure 5 is an example of a detailed configuration of a replacement notification and a warning notification that can be sent from a storage device according to an embodiment;

[0014] Figure 6 is a flowchart illustrating an operating method of a storage device according to an embodiment;

[0015] Figure 7 is a flow chart illustrating an operation when a storage device is in a maximum bad block state according to an embodiment;

[0016] Figure 8 is a flowchart illustrating an operating method of a storage device according to another embodiment;

[0017] Fig. 9 is a signaling diagram illustrating an operating method of an electronic device according to an embodiment;

[0018] Fig.10 is a block diagram illustrating a solid state drive (SSD) system according to an embodiment; and

[0019] Fig.11 is a block diagram illustrating a mobile device according to an embodiment. DETAILED DESCRIPTION

[0020] Hereinafter, embodiments are described in detail with reference to the accompanying drawings.

[0021] Figure 1 is a block diagram illustrating an electronic device 10 including a storage device 200 according to an embodiment.

[0022] refer to Figure 1 , the electronic device 10 according to the embodiment may include a host device 100 and a storage device 200 .

[0023] In an embodiment, the electronic device 10 may include a personal computer (PC), a data server, an ultra mobile PC (UMPC), a workstation, a netbook, a network attached storage (NAS), a smart TV, an Internet of Things (IoT) device, a vehicle, or a portable electronic device. The portable electronic device may include a laptop computer, a mobile phone, a smart phone, a tablet PC, a personal digital assistant (PDA), an enterprise digital assistant (EDA), a digital still camera, a digital video camera, an audio device, a portable multimedia player (PMP), a personal navigation device (PND), an MP3 player, a handheld game console, an e-book, a wearable device, etc.

[0024] The host device 100 may store data in the storage device 200 and read data from the storage device 200. The host device 100 may include a data processing device capable of processing data, such as a central processing unit (CPU), a processor, a microprocessor, or an application processor (AP). For example, the host device 100 may include a system on chip (SoC).

[0025] The host device 100 may communicate with the storage device 200 through various interfaces. The host device 100 may generate a write request or a read request for data. The host device 100 may send a write request or a read request to the storage device 200.

[0026] The storage device 200 may perform an operation corresponding to a write request or a read request received from the host device 100. If the storage device 200 receives a write request from the host device 100, the storage device 200 may store data corresponding to the write request therein. If the storage device 200 receives a read request from the host device 100, the storage device 200 may search for data corresponding to the read request therein and send the data to the host device 100.

[0027] The storage device 200 may be implemented by one of various types of devices according to a host interface protocol connected to the host device 100. For example, the storage device 200 may be an internal memory embedded in the electronic device 10. For example, the storage device 200 may be implemented by one of various types of devices such as an embedded multimedia card (eMMC), an MMC, a solid state drive (SSD), a universal flash storage (UFS), an embedded UFS, a reduced size (RS)-MMC, a micro MMC-type MMC, a compact flash (CF) card, a secure digital (SD) card, a micro SD card, a mini SD card, an extreme digital (xD) card, a smart media card, and a memory stick.

[0028] The memory device 200 may include a non-volatile memory (NVM) 210 and a memory controller 220 .

[0029] The NVM 210 may store data therein. The NVM 210 may include a memory cell array including nonvolatile memory cells that can maintain data even when the power of the memory device 200 is cut off. In an embodiment, the NVM 210 may be a NAND flash memory. However, the embodiment is not limited thereto, and the NVM 210 may be any one of a resistive memory such as a resistive random access memory (ReRAM), a phase change RAM (PRAM), and a magnetic RAM (MRAM). However, hereinafter, description is made based on the assumption that the NVM 210 is a NAND flash memory.

[0030] The NVM 210 may include a plurality of planes PL1 to PLk (k is a natural number). Each of the plurality of planes PL1 to PLk may be connected to a page buffer (not shown). Each of the plurality of planes PL1 to PLk may include a plurality of memory blocks BLK1 to BLKn (n is a natural number).

[0031] In an embodiment, the NVM 210 may include a plurality of dies or a plurality of chips. For example, the NVM 210 may include a plurality of chips, each of which may include a plurality of dies, and each of which may include a plurality of planes PL1 to PLk.

[0032] In an embodiment, a plurality of storage blocks BLK1 to BLKn included in each of the plurality of planes PL1 to PLk of the NVM 210 may be included in any one of a user area, a reserved area, and an over-provision (OP) area. The user area may be an area for storing user data received from the host device 100. The reserved area may be an area for replacing a bad block detected from among the storage blocks included in the user area. The OP area may be an area used as a temporary working area when performing work such as useless unit collection, wear leveling, or bad block management on the user area. In this article, the number of storage blocks included in the user area may be greater than the number of storage blocks included in the reserved area and the number of storage blocks included in the OP area.

[0033] The storage controller 220 may control the NVM 210 so that data stored in the NVM 210 is read in response to a read request from the host device 100 or data is written on the NVM 210 in response to a write request from the host device 100. The storage controller 220 may include a buffer memory (not shown), and data received from the host device 100 or the NVM 210 may be temporarily stored in the buffer memory (not shown) and then transmitted to the NVM 210 or the host device 100.

[0034] The memory controller 220 may perform a bad block management operation on a plurality of memory blocks BLK1 to BLKn. In this case, the memory controller 220 may perform a bad block management operation on each of a plurality of planes PL1 to PLk. That is, the memory controller 220 may perform a bad block management operation in units of planes of the NVM 210. In the description to be made below, unless the context clearly indicates otherwise, the bad block management operation may be performed in units of planes of the NVM 210.

[0035] The memory controller 220 may manage memory blocks detected as bad blocks among the plurality of memory blocks BLK1 to BLKn included in the NVM 210 in a bad block list through a bad block management operation, thereby preventing data from being lost due to being written on the detected bad blocks.

[0036] If a storage block included in the user area is detected as a bad block, the storage controller 220 may perform a subsequent operation based on whether the number of bad blocks is greater than the maximum number of bad blocks and the usage ratio of the user area. Herein, the subsequent operation may include an operation of reducing the capacity of the user area.

[0037] In more detail, if a memory block included in the user area is detected as a bad block, the memory controller 220 may determine whether the number of bad blocks is greater than a maximum number of bad blocks.

[0038] The maximum number of bad blocks may be the maximum number of memory blocks included in the reserved area with which the memory blocks detected as bad blocks can be replaced. Therefore, the maximum number of bad blocks may be set to be the same as the number of memory blocks included in the reserved area.

[0039] If the number of bad blocks is greater than the maximum number of bad blocks, the storage controller 220 may be in a state where the storage blocks detected as bad blocks cannot be further replaced with storage blocks included in the reserved area. Therefore, if the number of bad blocks is greater than the maximum number of bad blocks, the storage controller 220 may reduce the capacity of the user area based on the usage ratio of the user area.

[0040] The usage ratio of the user area may indicate a ratio of a data write capacity of the user area to a total capacity. The storage controller 220 may reduce the capacity of the user area based on whether the usage ratio of the user area is greater than a reference usage ratio.

[0041] Herein, the reference usage ratio may be a ratio as a reference for determining whether a problem occurs in the operation of the storage device 200 when the capacity of the user area decreases due to writing too much data in the user area, and may be set to, for example, 90%.

[0042] When the usage ratio of the user area is greater than the reference usage ratio, if the capacity of the user area is reduced, a problem may occur in the operation of the storage device 200. Therefore, when the number of bad blocks is greater than the maximum number of bad blocks, if the usage ratio of the user area is greater than the reference usage ratio, the storage controller 220 may set the NVM 210 to a read-only mode.

[0043] If the usage ratio of the user area is less than or equal to the reference usage ratio, there may be no problem even when the capacity of the user area is reduced. Therefore, when the number of bad blocks is greater than the maximum number of bad blocks, if the usage ratio of the user area is less than or equal to the reference usage ratio, the storage controller 220 can reduce the capacity of the user area based on the current reduced capacity of the user area and the maximum reducible capacity of the user area.

[0044] The current reduced capacity of the user area may indicate a capacity of the user area that has been reduced due to bad blocks exceeding a maximum number of bad blocks having occurred.

[0045] The maximum reducible capacity of the user area may indicate a capacity of the user area that can ensure that no problem occurs in the operation of the storage device 200 even when the capacity of the user area is reduced. For example, the term "reducible" includes the meaning of "capable of being reduced". In this case, the maximum reducible capacity of the user area may be set based on a maximum reduction capacity reference table that indicates a reducible capacity according to a usage ratio of the user area. That is, the maximum reducible capacity of the user area may be set differently according to the usage ratio of the user area. Figure 4 Describes the maximum reduced capacity reference table.

[0046] If the current reduced capacity of the user area is less than the maximum reducible capacity of the user area, even when the capacity of the user area is additionally reduced, no problem occurs in the operation of the storage device 200. Therefore, if the current reduced capacity of the user area is less than the maximum reducible capacity of the user area, the storage controller 220 may reduce the capacity of the user area.

[0047] Otherwise, if the current reduced capacity of the user area is the same as the maximum reducible capacity of the user area, when the capacity of the user area is further reduced, a problem may occur in the operation of the storage device 200. Therefore, if the current reduced capacity of the user area is the same as the maximum reducible capacity of the user area, the storage controller 220 may set the NVM 210 to a read-only mode.

[0048] As described above, even when bad blocks occur when the number of bad blocks is greater than the maximum number of bad blocks, the storage controller 220 of the storage device 200 may not immediately change to the read-only mode, thereby preventing accidents that may occur due to the change to the read-only mode by postponing the time point when the storage device 200 is changed to the read-only mode.

[0049] In addition, when the number of bad blocks is greater than the maximum number of bad blocks, the storage controller 220 may maintain the capacity of the OP area as it is. That is, even when the number of bad blocks is greater than the maximum number of bad blocks, the storage controller 220 may not replace the storage blocks detected as bad blocks with the storage blocks in the OP area. As described above, the storage controller 220 may maintain the capacity of the OP area as it is, thereby preventing the performance degradation and latency increase of the storage device 200 caused by the reduction in the capacity of the OP area.

[0050] If the number of bad blocks is greater than the maximum number of bad blocks, the storage controller 220 may send a replacement notification to the host device 100. The replacement notification may be a notification for notifying that the storage device 200 needs to be replaced because the number of bad blocks is greater than the maximum number of bad blocks. Figure 5 Describes the detailed configuration of replacement notification.

[0051] If the replacement notification is received, the host device 100 may notify the user that the storage device 200 needs to be replaced through an output device such as a display or a speaker included in the electronic device 10. As described above, by notifying the user that the storage device 200 needs to be replaced, the electronic device 10 may guide the user to replace the storage device 200 before the storage device 200 included in the electronic device 10 is in the read-only mode.

[0052] If the number of bad blocks is less than or equal to the maximum number of bad blocks, this may indicate that at least one of the memory blocks included in the reserved area is left without replacing the bad blocks. Therefore, if the number of bad blocks is less than or equal to the maximum number of bad blocks, the memory controller 220 may replace the memory blocks detected as bad blocks with the memory blocks included in the reserved area.

[0053] When the number of bad blocks is less than or equal to the maximum number of bad blocks, if the number of bad blocks is greater than the reference ratio of the maximum number of bad blocks, the storage controller 220 may send a warning notification to the host device 100. That is, even when the number of bad blocks is less than the maximum number of bad blocks, if the number of bad blocks is greater than the reference ratio of the maximum number of bad blocks, the storage controller 220 may send a warning notification to the host device 100. In an embodiment, the reference ratio may be set to 90%, and in this case, if the number of bad blocks is greater than 90% of the maximum number of bad blocks, the storage controller 220 may send a warning notification to the host device 100.

[0054] The warning notification may be a notification for notifying that the storage device 200 will soon need to be replaced because the number of bad blocks will soon be greater than the maximum number of bad blocks even though the number of bad blocks is not greater than the maximum number of bad blocks. Figure 5 Describes the detailed configuration of warning notifications.

[0055] Upon receiving the warning notification, the host device 100 may notify the user that the storage device 200 will soon need to be replaced through an output device such as a display or a speaker included in the electronic device 10. As described above, by notifying the user in advance that the storage device 200 needs to be replaced before the exact timing of replacement, the electronic device 10 may guide the user to replace the storage device 200 before the storage device 200 included in the electronic device 10 is in the read-only mode.

[0056] Figure 2 An operation when a bad block is detected in a state where a first plane of an NVM of a memory device is not in a maximum bad block state according to an embodiment is illustrated.

[0057] refer to Figure 2 , shows an example of a structure of a first plane PL1 of the NVM 210. The first plane PL1 may include a plurality of user memory blocks UBLK1 to UBLKi (i is a natural number), a plurality of OP memory blocks OBLK1 to UBLKj (j is a natural number), and a plurality of reserved memory blocks RBLK1 to RBLKm (m is a natural number) included in a user area.

[0058] exist Figure 2 In the embodiment of the present invention, in the structure of the first plane PL1 shown on the left, the memory controller 220 may detect the second user memory block UBLK2 as a bad block (grey shading). As described above, if a memory block included in the user area of ​​the first plane PL1 is detected as a bad block, the memory controller 220 may perform subsequent operations based on whether the number of bad blocks of the first plane PL1 is greater than the maximum number of bad blocks and the usage ratio of the user area of ​​the first plane PL1.

[0059] exist Figure 2 In the embodiment of the present invention, the number of bad blocks of the first plane PL1 is 1 and is less than or equal to the maximum number of bad blocks m (the same as the number of reserved memory blocks RBLK1 to RBLKm), and therefore, the memory controller 220 can replace the second user memory block UBLK2 detected as a bad block with a memory block included in the reserved area of ​​the first plane PL1. Because all of the plurality of reserved memory blocks RBLK1 to RBLKm included in the reserved area of ​​the first plane PL1 are not bad blocks, the memory controller 220 can replace the second user memory block UBLK2 with any one of the plurality of reserved memory blocks RBLK1 to RBLKm included in the reserved area.

[0060] exist Figure 2In the embodiment of the present invention, as in the structure of the first plane PL1 shown on the right, the memory controller 220 may replace the second user memory block UBLK2 detected as a bad block with the first reserved memory block RBLK1 included in the reserved area. As described above, the operation of replacing the memory block detected as a bad block with the memory block included in the reserved area performed by the memory controller 220 may not be an operation of actually changing the position of the memory block, but an operation of changing the logical connection.

[0061] As described above, when the number of bad blocks of the first plane PL1 is less than or equal to the maximum number of bad blocks, even if a storage block included in the user area is detected as a bad block, the capacity of the user area is equally maintained as the sum of the capacities of the plurality of user storage blocks UBLK1 to UBLKi. In addition, the capacity of the OP area can be equally maintained as the sum of the capacities of the plurality of OP storage blocks OBLK1 to OBLKj.

[0062] Figure 3 An operation when a bad block is detected in a state where a first plane of an NVM of a memory device is in a maximum bad block state according to an embodiment is illustrated.

[0063] refer to Figure 3 , showing the first plane PL1 of the NVM 210 and the above reference Figure 2 Same structure as described.

[0064] exist Figure 3 In the embodiment of the present invention, in the structure of the first plane PL1 shown on the left, the memory controller 220 may detect the fourth user memory block UBLK4 as a bad block. As described above, if the memory blocks included in the user area of ​​the first plane PL1 are detected as bad blocks, the memory controller 220 may perform subsequent operations based on whether the number of bad blocks of the first plane PL1 is greater than the maximum number of bad blocks and the usage ratio of the user area of ​​the first plane PL1.

[0065] exist Figure 3 In the embodiment, the number of bad blocks of the first plane PL1 is m+1 (the fourth user memory block UBLK4 and the plurality of reserved memory blocks RBLK1 to RBLKm) and is greater than the maximum number of bad blocks m (the same as the number of reserved memory blocks RBLK1 to RBLKm), and therefore, the memory controller 220 cannot replace the fourth user memory block UBLK4 detected as a bad block with a memory block included in the reserved area of ​​the first plane PL1. In this case, the memory controller 220 may perform subsequent operations based on the usage ratio of the user area of ​​the first plane PL1.

[0066] If the usage ratio of the user area of ​​the first plane PL1 is greater than the reference usage ratio, the memory controller 220 may set the NVM 210 to a read-only mode.

[0067] Otherwise, if the usage ratio of the user area of ​​the first plane PL1 is less than or equal to the reference usage ratio, the memory controller 220 may perform subsequent operations based on the current reduced capacity of the user area and the maximum reducible capacity of the user area.

[0068] exist Figure 3 In the embodiment of FIG. 1 , the current reduced capacity is 0 and is therefore less than the maximum reducible capacity. Therefore, the memory controller 220 may reduce the capacity of the user area by setting the fourth user memory block UBLK4 as an unused block.

[0069] As described above, when the number of bad blocks of the first plane PL1 is greater than the maximum number of bad blocks, the capacity of the user area can be reduced to be less than the capacity of the plurality of user storage blocks UBLK1 to UBLKi. As described above, even when the number of bad blocks is greater than the maximum number of bad blocks, the storage device 200 can reduce the user area capacity without immediately changing to the read-only mode, thereby preventing accidents that may occur due to the change to the read-only mode by postponing the time point at which the storage device 200 changes to the read-only mode.

[0070] In this case, the capacity of the OP region may be equally maintained as the sum of the capacities of the plurality of OP memory blocks OBLK1 to OBLKj. Therefore, it is possible to prevent performance degradation and latency increase of the memory device 200 due to a capacity reduction of the OP region.

[0071] and Figure 3 Unlike the embodiment of the present invention, if the current reduced capacity is the same as the maximum reducible capacity, the storage controller 220 may set the NVM 210 to a read-only mode.

[0072] Figure 4 is an example of a maximum reduction capacity reference table that can be used in a storage device according to an embodiment.

[0073] refer to Figure 4 , shows an example of a maximum reduced capacity reference table indicating a reducible capacity according to a usage ratio of a user area.

[0074] First, if the usage ratio of the user area is greater than 90%, the reducible capacity may be zero storage blocks. In this case, 90% may be set as a reference usage ratio. Therefore, if the usage ratio of the user area is greater than the reference usage ratio (in Figure 4 ), the storage controller 220 may change the NVM 210 to a read-only mode without reducing the capacity of the user area.

[0075] If the usage rate of the user area is greater than 80% and less than or equal to 90%, the reducible capacity may be two memory blocks. In this case, the memory controller 220 may set two memory blocks as the maximum reducible capacity.

[0076] If the usage rate of the user area is greater than 70% and less than or equal to 80%, the reducible capacity may be four memory blocks. In this case, the memory controller 220 may set four memory blocks as the maximum reducible capacity.

[0077] If the usage rate of the user area is less than or equal to 70%, the reducible capacity may be eight memory blocks. In this case, the memory controller 220 may set eight memory blocks as the maximum reducible capacity.

[0078] Figure 5 is an example of a detailed configuration of a replacement notification and a warning notification that can be sent from a storage device according to an embodiment.

[0079] refer to Figure 5 , shows a table indicating values ​​that may be included for a replacement notification and a warning notification that may be sent from the storage device 200 to the host device 100.

[0080] The storage device 200 may notify the host device 100 of a target failure by sending a target failure response value in a response field. In an embodiment, the target failure may indicate the occurrence of exceeding a maximum number of bad blocks or exceeding a reference ratio of the maximum number of bad blocks. Figure 5 In the embodiment of the present invention, the target fault response value may be "01h".

[0081] The storage device 200 may send a condition check status value in the status field to notify the host device 100 that the status of the storage device 200 needs to be checked. In an embodiment, the condition check may indicate that the storage device 200 may be set to read-only mode due to exceeding a maximum number of bad blocks or exceeding a reference ratio of a maximum number of bad blocks. Figure 5 In the embodiment of the present invention, the condition check status value may be "02h".

[0082] The storage device 200 may send a replacement sense key value in a sense key field to notify the host device 100 that the storage device 200 needs to be replaced. In an embodiment, the replacement may indicate that the storage device 200 needs to be replaced due to exceeding a maximum number of bad blocks. Figure 5 In the embodiment of FIG. 5 , the replacement sense key value may be “09h”.

[0083] The storage device 200 may send a warning sense key value in the sense key field to notify the host device 100 that the storage device 200 will soon need to be replaced. In an embodiment, the warning may indicate that the storage device 200 will soon need to be replaced due to exceeding a reference ratio of the maximum number of bad blocks. Figure 5 In the embodiment of the present invention, the warning sense key value may be "0Ah".

[0084] In an embodiment, if the number of bad blocks is greater than the maximum number of bad blocks, the storage device 200 may send a replacement notification including a target fault response value, a condition check status value, and a replacement sense key value to the host device 100. In addition, in an embodiment, if the number of bad blocks is greater than a reference ratio of the maximum number of bad blocks, the storage device 200 may send a warning notification including a target fault response value, a condition check status value, and a warning sense key value to the host device 100. As described above, when sending a replacement notification and when sending a warning notification, the storage device 200 may send the same value in the response field and the status field, respectively, and send different values ​​in the sense key field.

[0085] Figure 6 is a flowchart illustrating an operating method of a storage device according to an embodiment.

[0086] refer to Figure 6 In operation S510, the memory device 200 may detect a bad block. If a program failure occurs when data is programmed on the NVM 210 in response to a write request received from the host device 100 through the memory controller 220, the memory device 200 may detect a bad block.

[0087] In operation S520 , the memory device 200 may determine whether the number of bad blocks is greater than a maximum number of bad blocks.

[0088] If it is determined that the number of bad blocks is greater than the maximum number of bad blocks, the method proceeds to operation S530, and the storage device 200 may reduce the capacity of the user area or set the NVM 210 to a read-only mode based on the usage ratio of the user area. Figure 7 The detailed operation of operation S530 is described.

[0089] If it is determined that the number of bad blocks is not greater than the maximum number of bad blocks, the method proceeds to operation S540, and the memory device 200 may replace the memory block detected as the bad block with the memory block included in the reserved area.

[0090] Figure 7 is a flow chart illustrating an operation of a storage device when it is in a maximum bad block state according to an embodiment.

[0091] refer to Figure 7 , showing that when Figure 6The operation is performed when it is determined in operation S520 that the number of bad blocks is greater than the maximum number of bad blocks.

[0092] In operation S610 , the storage device 200 may determine whether a usage ratio of a user area is greater than a reference usage ratio.

[0093] If it is determined that the usage ratio of the user area is not greater than the reference usage ratio, the operation may proceed to operation S620, and the storage device 200 may determine whether the current reduced capacity of the user area is less than the maximum reducible capacity of the user area.

[0094] If it is determined that the current reduced capacity of the user area is less than the maximum reducible capacity of the user area, the operation proceeds to operation S630, and the storage device 200 can reduce the capacity of the user area. As described above, even when the number of bad blocks is greater than the maximum number of bad blocks, the storage device 200 can reduce the capacity of the user area without immediately changing to the read-only mode, thereby preventing accidents that may occur due to changing to the read-only mode by postponing the time point when the storage device 200 changes to the read-only mode.

[0095] If it is determined that the current reduced capacity of the user area is not less than the maximum reducible capacity, the operation proceeds to operation S640, and the storage device 200 may set the NVM 210 to a read-only mode.

[0096] If it is determined in operation S610 that the usage ratio of the user area is greater than the reference usage ratio, the operation proceeds to operation S640 and the storage device 200 may set the NVM 210 to a read-only mode.

[0097] Figure 8 is a flowchart illustrating a method of operating a storage device according to another embodiment.

[0098] refer to Figure 8 , showing the Figure 6 The method is similar to the method of operating the storage device. Figure 8 Operations S710 to S730 may be performed with Figure 6 Operations S510 to S530 are the same.

[0099] After performing operation S730, in operation S740, the storage device 200 may send a replacement notification to the host device 100. As described above, if the number of bad blocks is greater than the maximum number of bad blocks, the storage device 200 may send a replacement notification to the host device 100 to guide the user to replace the storage device 200 before the storage device 200 included in the electronic device 10 is in the read-only mode.

[0100] Figure 8 Operation S750 can be performed with Figure 6 The operation S540 is the same as that of FIG.

[0101] After performing operation S750, the memory device 200 may determine whether the number of bad blocks is greater than a reference ratio of a maximum number of bad blocks in operation S760.

[0102] If the number of bad blocks is not greater than the reference ratio of the maximum number of bad blocks, the memory device 200 may not perform the additional operation.

[0103] If the number of bad blocks is greater than the reference ratio of the maximum number of bad blocks, in operation S770, the storage device 200 may send a warning notification to the host device 100. As described above, if the number of bad blocks is greater than the reference ratio of the maximum number of bad blocks, the storage device 200 may send a warning notification to the host device 100 to guide the user to replace the storage device 200 in advance before the NVM 210 included in the electronic device 10 has the most bad blocks.

[0104] Fig. 9 is a signaling diagram illustrating a method of operating an electronic device according to an embodiment.

[0105] refer to Fig. 9 , in operation S810 , the host device 100 may send a write request to the storage device 200 .

[0106] In operation S820 , the memory device 200 may transmit a ready response indicating that write data is receivable to the host device 100 in response to receiving the write request from the host device 100 .

[0107] In operation S830 , the host device 100 may transmit write data to the memory device 200 in response to receiving a ready response from the memory device 200 .

[0108] In operation S840, the memory device 200 may detect a bad block in the NVM 210. In this case, if a program failure occurs when the received write data is written on the NVM 210, the memory device 200 may detect the bad block.

[0109] In operation S850, the storage device 200 may determine that the number of bad blocks is greater than the maximum number of bad blocks. Therefore, the storage device 200 cannot replace the storage block detected as the bad block with the memory included in the reserved area, and thus may reduce the capacity of the user area based on the usage ratio of the user area or set the NVM 210 to a read-only mode.

[0110] In operation S860, the storage device 200 may send a replacement notification to the host device 100. In response to the storage device 200 sending the replacement notification, the host device 100 may notify the user through an output device such as a display or a speaker that the storage device 200 needs to be replaced.

[0111] Fig.10 is a block diagram illustrating an SSD system 2000 according to an embodiment.

[0112] refer to Fig.10 , the SSD system 2000 may include a host 2100 and an SSD 2200. The SSD 2200 may transmit and receive signals to and from the host 2100 through a signal connector SGL. The SSD 2200 may receive power from the host 2100 through a power connector (not shown).

[0113] The SSD 2200 may include an SSD controller 2210, a buffer memory 2220, and a plurality of storage devices 2230, 2240, and 2250 (shown as FLASH 1, FLASH 2, and FLASH n, respectively). Figures 1 to 9 The described storage device is implemented.

[0114] In particular, Figure 1 The storage device 200 may be applied as an SSD 2200. The SSD controller 2210 may communicate with the plurality of storage devices 2230, 2240, and 2250 through corresponding channels (shown as Ch1, Ch2, ..., Chn). The SSD controller 2210 may perform a bad block management operation on the plurality of storage devices 2230, 2240, and 2250, determine whether the number of bad blocks is greater than a maximum number of bad blocks if a storage block included in the user area is detected as a bad block, and reduce the capacity of the user area based on a usage ratio of the user area or set the plurality of storage devices 2230, 2240, and 2250 to a read-only mode if the number of bad blocks is greater than the maximum number of bad blocks.

[0115] The storage device 200 according to the above-described embodiment may be installed on or applicable to not only the SSD system 2000 but also a memory card system, a computing system, a UFS, etc. In addition, the bad block management method of the storage device 200 according to the embodiment may be applicable to various types of electronic systems on which an NVM is mounted.

[0116] Fig.11 is a block diagram illustrating a mobile device 3000 according to an embodiment.

[0117] refer to Fig.11 , the mobile device 3000 may include an application processor (AP) 3100 , a communication module 3200 , a display / touch module 3300 , a storage device 3400 , and a buffer RAM 3500 .

[0118] The AP 3100 may control general operations of the mobile device 3000. The communication module 3200 may be implemented to control wired / wireless communication with the outside. The display / touch module 3300 may display data processed by the AP 3100 or receive data through a touch panel.

[0119] The buffer RAM 3500 may be implemented to temporarily store data required for a processing operation of the mobile device 3000 .

[0120] The storage device 3400 may be implemented to store user data. The storage device 3400 may include a memory card, an eMMC, an SSD, or a UFS device. The storage device 3400 may be implemented as Figure 1 The storage device 200 is shown.

[0121] The storage device according to the embodiment can be installed using various forms of packaging. In an embodiment, the storage device according to the embodiment can be installed using packaging such as: stacked package (PoP), ball grid array (BGA) packaging, chip scale package (CSP), plastic lead chip carrier (PLCC) packaging, plastic dual in-line package (PDIP), die in waffle package, die in wafer form, chip on board (COB) packaging, ceramic dual in-line package (CERDIP), plastic metric quad flat package (MQFP), thin quad flat package (TQFP), small outline integrated circuit (SOIC) packaging, reduced outline package (SSOP), thin small outline package (TSOP), system-level package (SIP), multi-chip package (MCP), wafer-level manufacturing package (WFP) and wafer-level processing stacked package (WSP).

[0122] Various changes in form and details may be made therein without departing from the spirit and scope of the appended claims.

Claims

1. A storage device, comprising: a nonvolatile memory including a plurality of memory blocks located in any one of a user area, a reserved area, and an over-provisioning area; as well as a storage controller configured to perform bad block management operations on the plurality of storage blocks, Wherein, the storage controller is further configured as follows: Based on the storage blocks in the user area being detected as bad blocks, determining whether the number of bad blocks is greater than a maximum number of bad blocks; and Based on the fact that the number of bad blocks is greater than the maximum number of bad blocks, the capacity of the user area is reduced based on the usage ratio of the user area and the over-provisioned capacity of the over-provisioned area is maintained as it is.

2. The storage device according to claim 1, wherein: The storage controller is further configured to reduce the capacity of the user area based on a current reduced capacity of the user area and a maximum reducible capacity of the user area based on the usage ratio of the user area being less than or equal to a reference usage ratio and the number of bad blocks being greater than the maximum number of bad blocks.

3. The storage device according to claim 2, wherein: The storage controller is further configured to: reducing the capacity of the user area based on that the current reduced capacity of the user area is less than the maximum reducible capacity of the user area; as well as The non-volatile memory is set to a read-only mode based on the current reduced capacity of the user area being the same as the maximum reducible capacity of the user area.

4. The storage device according to claim 3, wherein: The maximum reducible capacity of the user area is set based on a maximum reduction capacity reference table indicating a reducible capacity according to a usage ratio of the user area.

5. The storage device according to claim 1, wherein: The storage controller is further configured to set the nonvolatile memory to a read-only mode based on the usage ratio of the user area being greater than a reference usage ratio and the number of bad blocks being greater than the maximum number of bad blocks.

6. The storage device according to claim 1, wherein: The storage controller is further configured to send a replacement notification to a host device based on the number of bad blocks being greater than the maximum number of bad blocks.

7. The storage device according to claim 6, wherein: The replacement notification includes a target fault response value, a condition check status value, and a replacement sense key value.

8. The storage device according to claim 1, wherein: The storage controller is further configured to replace the storage block detected as the bad block with a storage block in the reserved area based on the number of bad blocks being less than or equal to the maximum number of bad blocks.

9. The storage device according to claim 8, wherein: The storage controller is further configured to send a warning notification to a host device based on a reference ratio in which the number of bad blocks is greater than the maximum number of bad blocks and the number of bad blocks is less than or equal to the maximum number of bad blocks.

10. The storage device according to claim 9, wherein: The warning notification includes a target fault response value, a condition check state value, and a warning sense key value.

11. A storage device, comprising: A non-volatile memory, the non-volatile memory comprising a plurality of planes, each of the plurality of planes comprising a plurality of storage blocks; as well as a storage controller configured to perform bad block management operations on each of the plurality of planes, wherein the plurality of storage blocks in each of the plurality of planes are located in any one of a user area, a reserved area, and an over-provisioning area, the plurality of planes including a first plane, The storage controller is further configured to: based on the storage block in the user area of ​​the first plane being detected as a bad block, perform subsequent operations based on whether the number of bad blocks of the first plane is greater than a maximum number of bad blocks and a usage ratio of the user area of ​​the first plane, and The subsequent operation includes reducing the capacity of the user area of ​​the first plane.

12. The storage device according to claim 11, wherein: The storage controller is further configured to: perform the subsequent operation based on the number of bad blocks of the first plane being greater than the maximum number of bad blocks and the usage ratio of the user area of ​​the first plane being less than or equal to the reference usage ratio, and the subsequent operation further includes reducing the capacity of the user area of ​​the first plane based on the current reduced capacity of the user area of ​​the first plane and the maximum reducible capacity of the user area.

13. The storage device according to claim 12, wherein: The subsequent operations further include: reducing the capacity of the user area of ​​the first plane based on that the current reduced capacity of the user area of ​​the first plane is less than the maximum reducible capacity of the user area; and The nonvolatile memory is set to a read-only mode based on that a current reduced capacity of the user area of ​​the first plane is the same as a maximum reducible capacity of the user area.

14. The storage device according to claim 11, wherein: The storage controller is further configured to maintain the overprovision capacity of the overprovision area of ​​the first plane as it is, based on the number of bad blocks of the first plane being greater than the maximum number of bad blocks.

15. The storage device according to claim 11, wherein: The storage controller is further configured to: based on the number of bad blocks of the first plane being greater than the maximum number of bad blocks, perform the subsequent operation and then send a replacement notification to the host device, and The replacement notification includes a target fault response value, a condition check state value, and a replacement sensing key value.

16. An electronic device, comprising: a host device configured to generate a write request or a read request for data; as well as a storage device configured to perform an operation corresponding to the write request or the read request, Wherein, the storage device comprises: a nonvolatile memory including a plurality of memory blocks located in any one of a user area, a reserved area, and an over-provisioning area; and a storage controller configured to perform bad block management operations on the plurality of storage blocks, and Wherein, the storage controller is further configured as follows: Based on the storage blocks in the user area being detected as bad blocks, determining whether the number of bad blocks is greater than a maximum number of bad blocks; and Based on the number of bad blocks being greater than the maximum number of bad blocks, the capacity of the user area is reduced based on the usage ratio of the user area and a replacement notification is sent to the host device.

17. The electronic device according to claim 16, wherein: The storage controller is further configured to: reducing the capacity of the user area based on that the current reduced capacity of the user area is less than the maximum reducible capacity of the user area, the number of bad blocks is greater than the maximum number of bad blocks, and the usage ratio of the user area is less than or equal to a reference usage ratio; setting the nonvolatile memory to a read-only mode based on that a current reduced capacity of the user area is the same as a maximum reducible capacity of the user area, the number of bad blocks is greater than the maximum number of bad blocks, and the usage ratio of the user area is less than or equal to the reference usage ratio; as well as The nonvolatile memory is set to the read-only mode based on the usage ratio of the user area being greater than the reference usage ratio and the number of bad blocks being greater than the maximum number of bad blocks.

18. The electronic device according to claim 16, wherein: The storage controller is further configured to maintain the over-provisioning capacity of the over-provisioning area as it is based on the number of bad blocks being greater than the maximum number of bad blocks.

19. The electronic device according to claim 16, wherein: The storage controller is further configured to: sending a ready response to the host device based on receiving the write request from the host device; receiving write data corresponding to the write request from the host device; as well as During a write operation corresponding to the write request, the replacement notification is sent to the host device based on the number of bad blocks being greater than the maximum number of bad blocks and the storage blocks in the user area being bad blocks, and The replacement notification includes a target fault response value, a condition check state value, and a replacement sensing key value.

20. The electronic device according to claim 16, wherein: The storage controller is further configured to: during a write operation corresponding to the write request, sending a warning notification to the host device based on a reference ratio that the number of bad blocks is less than or equal to the maximum number of bad blocks, the number of bad blocks is greater than the maximum number of bad blocks, and the storage block in the user area is a bad block, and The warning notification includes a target fault response value, a condition check state value and a warning sensing key value.