CN113360080A - Storage space management method - Google Patents
Storage space management method Download PDFInfo
- Publication number
- CN113360080A CN113360080A CN202010151211.0A CN202010151211A CN113360080A CN 113360080 A CN113360080 A CN 113360080A CN 202010151211 A CN202010151211 A CN 202010151211A CN 113360080 A CN113360080 A CN 113360080A
- Authority
- CN
- China
- Prior art keywords
- capacity
- memory
- controller
- effective
- blocks
- 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
Links
- 238000007726 management method Methods 0.000 title claims abstract description 25
- 238000000034 method Methods 0.000 claims description 3
- 230000002950 deficient Effects 0.000 claims description 2
- 230000004044 response Effects 0.000 claims description 2
- 239000007787 solid Substances 0.000 description 7
- 238000004891 communication Methods 0.000 description 6
- 230000003247 decreasing effect Effects 0.000 description 6
- 230000007423 decrease Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000012217 deletion Methods 0.000 description 2
- 230000037430 deletion Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 230000032683 aging Effects 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000002035 prolonged effect Effects 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 230000002441 reversible effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0604—Improving or facilitating administration, e.g. storage management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
- G06F3/0616—Improving the reliability of storage systems in relation to life time, e.g. increasing Mean Time Between Failures [MTBF]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/064—Management of blocks
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
A memory space management method for a memory device including a controller and a memory, comprising: calculating, by a controller, an expected used capacity and an effective capacity of a memory, wherein the effective capacity is inversely related to a number of blocks of the memory that are marked as bad blocks; when the effective capacity is less than or equal to the declaration capacity and the difference value between the effective capacity and the expected using capacity is less than the preset critical capacity, the controller forbids the writing operation on the memory; and allowing, by the controller, a write operation to the memory when the effective capacity is equal to or less than the declared capacity and a difference between the effective capacity and the expected usage capacity is not less than a predetermined critical capacity.
Description
Technical Field
The present disclosure relates to a storage space management method, and more particularly, to a storage space management method for increasing a lifetime of a storage device.
Background
The service life of a Solid State Drive (SSD) is limited by the number of times of reading and writing of its internal flash memory. When the number of times of reading and writing exceeds the designed upper limit value, the flash memory may not be able to correctly store data, and therefore, the control chip of the solid state disk will mark the storage block as a bad block (bad block).
As more and more memory blocks are marked as bad blocks, when the remaining available memory capacity in the solid state disk is smaller than the initial declared capacity (cleared capacity), the conventional memory controller determines that the service life of the solid state disk is exhausted and the solid state disk cannot be accessed any more.
In view of the above situation, how to prolong the service life of a solid state disk is an important issue in the field.
Disclosure of Invention
One aspect of the present disclosure relates to a memory space management method for a memory device including a controller and a memory, including: calculating, by a controller, an expected used capacity and an effective capacity of a memory, wherein the effective capacity is inversely related to a number of blocks of the memory that are marked as bad blocks; when the effective capacity is less than or equal to the declaration capacity and the difference value between the effective capacity and the expected using capacity is less than the preset critical capacity, the controller forbids the writing operation on the memory; and allowing, by the controller, a write operation to the memory when the effective capacity is equal to or less than the declared capacity and a difference between the effective capacity and the expected usage capacity is not less than a predetermined critical capacity.
One aspect of the present disclosure relates to another storage space management method for a storage device including a controller and a memory, including: calculating, by a controller, an expected used capacity and an effective capacity of a memory, wherein the effective capacity is inversely related to a number of blocks of the memory that are marked as bad blocks; determining, by the controller, whether each of the blocks of the memory is no longer in use; when one of the blocks is determined to be no longer in use, marking the block as a defective block or a limited block by the controller so that the effective capacity is not less than the declared capacity of the storage device; and comparing, by the controller, the difference between the effective capacity and the number of blocks marked as restricted with the expected usage capacity to determine whether to inhibit a write operation to the memory.
One aspect of the present disclosure relates to another storage space management method for a storage device including a controller and a memory, including: the controller stores at least one reinitialization capacity, wherein the at least one reinitialization capacity is smaller than the declaration capacity; calculating, by a controller, an effective capacity of a memory, wherein the effective capacity is inversely related to a number of blocks of a plurality of blocks of the memory that are marked as bad; the controller determines whether to start the storage device to perform a reinitialization procedure with at least one reinitialization capacity according to the difference between the effective capacity and the declaration capacity.
Drawings
Fig. 1 is a schematic diagram of a memory device according to an embodiment of the disclosure.
Fig. 2 is a flowchart of a memory space management method according to an embodiment of the disclosure.
Fig. 3 and 4 are schematic diagrams of capacity variations of a memory device according to an embodiment of the present disclosure.
Fig. 5 is a flow chart of information transfer between a storage device and an electronic device according to an embodiment of the disclosure.
Detailed Description
The embodiments are described in detail below with reference to the drawings, but the embodiments are only for explaining the present application and are not used for limiting the present application, the description of the structural operation is not intended to limit the execution sequence thereof, and any structure resulting from the rearrangement of components and having equivalent functions is intended to cover the scope of the present disclosure.
Please refer to fig. 1. Fig. 1 is a schematic diagram of a memory device 100 according to an embodiment of the disclosure. As shown in fig. 1, the storage device 100 includes a memory 110, a controller 120, and an alarm 130. The memory 110 includes a plurality of memory BLOCKs BLOCK. The controller 120 includes a control circuit 121, a read-write circuit 122, a memory circuit 123, and a communication interface 124.
Structurally, the controller 120 is coupled to the memory 110 and the alarm 130. The control circuit 121 is coupled to the read-write circuit 122, the memory circuit 123, the communication interface 124, and the alarm 130. Specifically, the control circuit 121 is coupled to the memory BLOCK through the read/write circuit 122.
In some embodiments, memory 110 may be a non-volatile memory, such as a NAND type flash memory array. In some embodiments, the controller 120 may be various processing circuits or control chips.
In operation, the control circuit 121 is used to control the read/write circuit 122 to perform write (program), read (read), erase (erase), verify or other actions on one or more of the memory blocks, and record the read/write times (P/E cycles) corresponding to each memory block in the memory circuit 123. When the memory block is written, the memory block is used for storing data. The control circuit 121 can calculate the size of the space for storing data in all the memory blocks according to the record in the storage circuit 123, which is the current usage capacity. The control circuit 121 may calculate the sum of the current usage capacity and the data to be written currently, which is the expected usage capacity. For example, if the current used capacity is 1TB and data of 0.2TB is to be written, the expected used capacity is 1.2 TB.
In addition, when the control circuit 121 performs a write operation on one or more memory blocks, it is determined whether the memory block is marked as a bad block (bad block). The block not marked as the bad block represents that the memory cell (cell) in the memory block can still operate normally, and the block marked as the bad block represents that the memory block can not store data correctly. When the control circuit 121 determines that a certain memory block cannot correctly store data, the control circuit 121 marks the memory block as a bad block.
Specifically, in some embodiments, when the number of reads and writes corresponding to the memory block is greater than the upper limit of the number of reads and writes of the memory block in the design specification, the control circuit 121 determines that the memory block should be marked as a bad block. In some other embodiments, the control circuit 121 performs the verification operation on the memory block through the read/write circuit. When the memory block fails the verification operation, the control circuit 121 determines that the memory block needs to be marked as a bad block. In this way, the memory device 100 can obtain the current effective capacity of the memory 110 by counting the number of the memory blocks that are not marked (belong to the space where the data can be stored). In other words, the effective capacity is inversely related to the number of blocks marked as bad in the memory block of the memory 110.
For convenience and clarity of illustration, the specific operation of the memory device 100 will be described below with reference to the embodiments shown in fig. 1-5, but not limited thereto, and various modifications and alterations can be made by those skilled in the art without departing from the spirit and scope of the present application. Please refer to fig. 2. Fig. 2 is a flowchart of a memory space management method 200 according to an embodiment of the disclosure. As shown in fig. 2, the storage space management method 200 includes operations S210, S220, S230, S240, S250, S260, S270, S280, and 290.
First, in operation S210, a current usage capacity, an expected usage capacity, and an effective capacity are calculated by the controller 120. Next, in operation S220, the controller 120 determines whether the effective capacity is equal to or less than the announcement capacity.
When the available capacity is greater than the advertised capacity, the representative memory 110 has not been excessively corrupted or aged to preserve sufficient available storage space. Accordingly, it is determined by the controller 120 whether the expected usage capacity is greater than the announcement capacity in operation S230.
When the expected usage capacity is less than or equal to the advertised capacity, it represents that there is sufficient unused space in the memory 110 to write the current data. Accordingly, operation S240 is performed, allowing the write operation.
Conversely, when the expected usage capacity is greater than the advertised capacity, it represents that there is not enough unused space in the memory 110 to write the current data. Accordingly, in operation S250, the controller 120 first disables the writing operation to the memory 110 while generating the corresponding signal, and thus generates the corresponding operation that can reduce the use capacity. The corresponding signals comprise warning notice, safety capacity, current use capacity and capacity to be deleted. The details will be described later.
For example, as shown in fig. 3, the horizontal axis represents time and the vertical axis represents capacity. The declared capacity Bd is an initial capacity (i.e., a mark capacity set in a factory) that can be accessed by a user when the storage apparatus 100 is initialized (e.g., at time T0 in fig. 3). The current used capacity Bu increases as the user writes and decreases as data is deleted. The effective capacity Ba decreases as the number of memory blocks marked as bad blocks increases.
At the time point T0, the effective capacity Ba of the storage device 100 is inevitably equal to or greater than the declared capacity, for example, the storage device 100 with the declared capacity Bd of 2.0TB and the actual capacity B0 of 2.2 TB. After the time point T0, the write operation to the memory 110 is started, and therefore the current used capacity Bu is increased from zero.
In the period P1, since the effective capacity Ba is larger than the declared capacity Bd (i.e., the memory 110 has not been damaged or aged excessively to keep enough effective storage space), the operations S230 to S250 are repeated after the operation S220. For example, between the time points T0 and T1, since the expected usage capacity to be written each time is smaller than the advertised capacity Bd, the operations S220, S230, and S240 are repeated, and the write permission operation is maintained such that the current usage capacity Bu continues to increase. Until time point T1, the currently used capacity Bu is equal to the advertised capacity Bd, representing that the advertised capacity Bd of the 2TB in the memory 110 has stored data. At this time, the expected usage capacity exceeds the declared capacity regardless of the content size of the new data to be written, so that operation S250 is performed to prohibit the write operation. Until the data deletion (i.e., the current used capacity Bu is reduced) operation is performed on the memory 110 such that the current used capacity Bu is again less than the announced capacity Bd, operation S220 will be performed again.
On the other hand, as shown in the time point T2 in fig. 3, when the effective capacity Ba is equal to the declared capacity Bd, it represents that the memory blocks in the memory 110 have been damaged and aged to have the remaining effective storage space that is less than the declared capacity Bd. During period P2, the controller of the conventional storage device determines that the service life of the solid state disk is exhausted and no longer performs the access operation.
However, in the present application, as shown in fig. 2, when the effective capacity is equal to or less than the announcement capacity in operation S220, operation S260 is performed, and it is determined whether the currently used capacity is less than the effective capacity by the controller 120. If the current used capacity is greater than or equal to the effective capacity, operation S290 is performed to prohibit the write operation. If the current usage capacity is smaller than the effective capacity, operation S270 is performed to determine whether the expected usage capacity is smaller than or equal to the effective capacity by the controller 120.
When the expected used capacity is equal to or less than the effective capacity, operation S280 is performed to allow the write operation. Otherwise, when the expected used capacity is larger than the effective capacity, operation S290 is performed to prohibit the write operation.
For example, as shown in fig. 3, after the time point T2, even if the effective capacity Ba is less than or equal to the declared capacity Bd (e.g., the effective capacity Ba is 1.8TB, which is less than the declared capacity Bd of 2TB initially), the effective capacity Ba is still sufficient to normally hold the data of the currently used capacity Bu because the used capacity Bu (e.g., 1.5TB) is not greater than or equal to the effective capacity Ba (e.g., 1.8 TB). Further, as long as the expected used capacity is not greater than the effective capacity Ba, operation S280 will be possible, allowing the write operation.
However, at the time point T3, since the currently used capacity Bu will exceed the available capacity Ba, the stored data content in the currently used capacity Bu may not be correctly saved, and therefore, the operation S290 is performed to prohibit the write operation. Until the memory 110 is erased such that the used capacity Bu is smaller than the declared capacity Bd and the available capacity Ba again (e.g., after the time point T3), operation S270 may be performed again to determine whether the write operation of the current data may be allowed.
In this way, even if the effective capacity Ba of the memory block in the memory device 100 is smaller than the corresponding declared capacity Bd due to aging or damage, the write operation can be determined to be allowed or prohibited by determining the size of the actually available effective capacity Ba, the current usage capacity Bu, and the expected usage capacity, so as to prolong the service life of the memory device 100. As illustrated in the example of fig. 3, at the time point T2, when the available capacity Ba is decreased from 2.2TB to 2.0TB indicating the capacity Bd, the currently used capacity Bu is about 1.5 TB. Even though the currently used capacity Bu is 0.5TB away from the declared capacity Bd, the normal storage device will not operate normally because the available capacity Ba is decreased to the declared capacity Bd. In reverse, after the time point T2, although the effective capacity Ba has decreased to be lower than the declared capacity Bd, as long as there is room between the effective capacity Ba and the currently used capacity Bu, the operations of writing and deleting data can be continuously allowed, thereby greatly prolonging the service life of the storage device 100.
In another embodiment, referring to fig. 3, during the period P2, the effective capacity Ba' may be maintained to be not less than the advertised capacity Bd. Specifically, during the period P1, the control circuit 121 marks the memory blocks that cannot store data correctly as "bad blocks", wherein the number of the memory blocks marked as bad blocks is about the difference between the actual capacity B0 and the effective capacity Ba. During the period P2, the control circuit 121 marks the memory blocks that cannot correctly store data as "limited blocks", wherein the number of the memory blocks marked as "limited blocks" is about the difference between the declared capacity Bd and the available capacity Ba. The block labeled "restricted block" is a block of memory that is prohibited from being read or written. However, the memory blocks marked as the limiting blocks are not counted as "bad blocks", but are counted as "non-bad blocks" (i.e., the effective capacity Ba'). In other words, the control circuit 121 marks the block that cannot correctly hold the data as the "limited block", i.e., the memory block having the substantial effect of marking "bad block" (inhibit reading and writing), but does not count the number of "bad blocks" (i.e., count the available capacity Ba'). That is, when one of the blocks is determined to be no longer used, the controller 121 marks the block as a bad block according to the fact that the effective capacity Ba 'is greater than the declared capacity Bd, and marks the block as a limited block according to the fact that the effective capacity Ba' is equal to the declared capacity Bd. Therefore, at the time of the period P2, the controller 120 of the memory device 100 of the present application can still make the effective capacity Ba' not less than the declared capacity Bd of the memory device 100.
A simple implementation is illustrated in the perspective of the controller 120: in period P1, the control circuit 121 marks the memory block that needs to be marked as "bad block" directly; and when the period P1 transits to the period P2, the control circuit 121 starts to change the memory block that needs to be marked as "bad block" to be marked as "limited block". As can be seen from the above description, the number of bad blocks marked as "bad blocks" is not greater than the difference between the real capacity B0 and the declared capacity Bd, so as to ensure that the effective capacity Ba 'is not less than the declared capacity Bd (as shown in fig. 3), wherein the effective capacity Ba' is equal to the effective capacity Ba of the normally read/write block plus the block capacity marked as "limited block".
In another embodiment, the control circuit 121 has an advertised capacity table. The advertised capacity table has a plurality of advertised capacities (e.g., 2.0T, 1.0T, 512G, 500G, 480G, 250G …, etc.) and/or other information related to the corresponding capacities. When the control circuit 121 finds that the effective capacity Ba is less than or equal to the declared capacity Bd (after the time point T2 as shown in fig. 3), the control circuit 121 selects an initialization operation of a new (smaller capacity) capacity in the declared capacity table under the user's permission, so as to achieve the effect that the declared capacity Bd can become gradually smaller and the service life of the storage device 100 can be prolonged.
In some other embodiments, when the operation S290 is performed, the control circuit 121 in the controller 120 may send a warning signal to the alarm 130, so that the alarm 130 emits a warning sound or flashes a warning light according to the warning signal to remind the user that the current available capacity Ba is lower than the declared capacity Bd and the memory 110 is in the write-disabled state. Alternatively, the control circuit 121 may transmit an alarm signal to the electronic device through the communication interface 124, displaying an alarm notification in the electronic device.
Further, in some embodiments, the control circuit 121 in the controller 120 calculates the corresponding warning capacity according to the effective capacity Ba. When the available capacity Ba is less than or equal to the declaration capacity Bd and the current usage capacity Bu is greater than or equal to the warning capacity or the expected usage capacity Bu is greater than the warning capacity, the control circuit 121 in the controller 120 sends a warning signal to the alarm 130, or sends a warning signal to the electronic apparatus through the communication interface 124. For example, when the current active capacity Ba is 1.8TB, the warning capacity can be 1.7TB, so as to reserve a storage space of 0.1TB to remind the user of the present active capacity Ba. The alarm 130 can flash lights with different colors, frequencies or numbers according to the warning signal and the warning signal.
In addition, when the effective capacity Ba is smaller than the announcement capacity Bd, in some embodiments, the controller 120 is further configured to calculate the safety capacity according to the effective capacity Ba. That is, in operations S260 and S270, the controller 120 is configured to determine whether the current usage capacity Bu is less than the safe capacity, and whether the expected usage capacity is less than or equal to the safe capacity. Specifically, as shown in fig. 4, when the effective capacity Ba is decreased to the declared capacity Bd (i.e., the time point T4), the control circuit 121 subtracts the effective capacity Ba by a default capacity as the safe capacity Bs. When the effective capacity Ba is decreased to the safe capacity Bs (e.g. time T5), the control circuit 121 deducts a default capacity from the effective capacity Ba as a new safe capacity Bs. In other words, the safe capacity Bs is equal to the effective capacity Ba minus the predetermined critical capacity.
Therefore, when the effective capacity Ba is smaller than the declared capacity Bd, the safety capacity Bs can prevent the data from being stored correctly due to the small difference between the currently used capacity Bu and the effective capacity Ba. In addition, the safety capacity Bs can also prevent the storage device 100 from sending warning information too frequently when the currently used capacity Bu is not reduced sufficiently.
It should be noted that although FIG. 4 shows the default capacity for each deduction to be equal. In some other embodiments, the default capacity per deduction may increase with decreasing effective capacity Ba. For example, the default capacities deducted are 0.1TB, 0.2TB, 0.3TB, the safe capacities are 1.9TB, 1.7TB, 1.4TB, and so on. In other words, the safety capacity is adjustable. The safe capacity is in a proportional relationship with the effective capacity.
In the above embodiment, the controller 120 of the storage device 100 determines whether to prohibit the write operation to the memory 110, and the alarm 130 of the storage device 100 presents the current status. In some other embodiments, the control circuit 121 in the storage device may communicate with other electronic devices through the communication interface 124, so that the electronic device 300 determines whether to prohibit the writing operation and displays the related information accordingly.
Specifically, as shown in fig. 5, when the storage device 100 issues an alarm message, the processor 310 in the electronic device 300 sends a query (polling) according to the alarm message. The storage apparatus 100 returns the current effective capacity Ba and the current used capacity Bu in response to the inquiry. The processor 310 will decide whether to prohibit the write operation based on the safe capacity Bs and the current usage capacity Bu or the expected usage capacity. When the current usage capacity Bu or the expected usage capacity is larger than the safe capacity Bs, the processor 310 calculates the capacity to be deleted and/or provides a list of suggested deletion or backup clouds based on the safe capacity Bs and the current usage capacity Bu or the expected usage capacity, and transmits an alert notification, the safe capacity Bs, the current usage capacity Bu, the expected usage capacity, and the capacity to be deleted to the display 320.
Specifically, as shown in fig. 4, at a time point T4, when the current usage capacity Bu is to be larger than the safe capacity Bs, the processor 310 takes the difference of the current usage capacity Bu minus the safe capacity Bs as the capacity to be deleted Bd 1. For another example, at the time point T5, the processor 310 takes the difference of the currently used capacity Bu minus the safe capacity Bs as the capacity to be deleted Bd2.
Next, as shown in fig. 5, if the processor 310 performs an erase operation on the memory device 100, the current used capacity Bu of the memory device 100 will decrease. The processor 310 may re-allow the write operation according to the fact that the current usage capacity Bu is smaller than the secure capacity Bs by returning the secure capacity Bs and the current usage capacity Bu again through the storage device, and update the secure capacity Bs and the current usage capacity Bu to the display 320.
In this way, the electronic device 300 can inform the user how much available capacity Ba is still available when the storage device 100 is not enough to declare the capacity Bd, and the user is prompted to suggest how much content to delete to release enough available capacity Ba by continuous monitoring to ensure the correctness of data storage.
To sum up, through the storage space management method 200, when the effective capacity Ba is smaller than the declared capacity Bd, the writing is temporarily prohibited when the current used capacity Bu or the expected used capacity exceeds the effective capacity Ba, and the writing is re-permitted when the expected used capacity does not reach the effective capacity Ba. Therefore, the service life of the storage apparatus 100 can be extended while ensuring correct storage of data.
Although the present disclosure has been described with reference to the above embodiments, it should be understood that the scope of the present disclosure is not limited thereto, and it should be apparent to those skilled in the art that various changes and modifications can be made without departing from the spirit and scope of the present disclosure.
[ notation ] to show
Storage device
A memory
A controller
121
Read-write circuit
A memory circuit
A communication interface
130
Block
200
Operation S210, S220, S230, S240a, S240b, S250, S260, S270, S280, 290
B0.. actual capacity
Bd.
Ba.. effective capacity
Bu.. current capacity of use
Bs.. safety volume
Bd1, Bd2
Time points T1, T2, T3, T4, T5
P1, P2
An electronic device
A processor
A display
Claims (10)
1. A storage space management method for a storage device, the storage device including a controller and a memory, the storage device having an advertised capacity, the storage space management method comprising:
calculating, by the controller, an expected used capacity and an effective capacity of the memory, wherein the effective capacity is inversely related to a number of blocks of the memory that are marked as bad blocks;
when the effective capacity is less than or equal to the declaration capacity and the difference between the effective capacity and the expected using capacity is less than a preset critical capacity, the controller forbids writing operation on the memory; and
when the effective capacity is less than or equal to the declaration capacity and the difference between the effective capacity and the expected using capacity is not less than a predetermined critical capacity, the controller allows the write operation to the memory.
2. The storage space management method of claim 1, wherein the effective capacity minus the predetermined critical capacity is equal to a safe capacity.
3. The method of claim 2, wherein the security capacity is adjustable, and the security capacity is proportional to the effective capacity.
4. The storage space management method of claim 2, further comprising:
when the effective capacity is less than or equal to the declared capacity and the difference between the effective capacity and the expected usage capacity is less than the predetermined threshold capacity, a warning signal is sent by the controller.
5. The storage space management method of claim 4, further comprising:
when the effective capacity is less than or equal to the declaration capacity and the expected usage capacity is greater than or equal to the safety capacity, transmitting a warning signal, the expected usage capacity and the effective capacity to an electronic device by the controller; and
and stopping the writing operation on the memory by the electronic device in response to a warning signal and displaying a capacity to be deleted, wherein the capacity to be deleted is generated according to the difference between the expected use capacity and the safety capacity.
6. A storage space management method for a storage device, the storage device including a controller and a memory, the storage device having an advertised capacity, the storage space management method comprising:
calculating, by the controller, an expected used capacity and an effective capacity of the memory, wherein the effective capacity is inversely related to a number of blocks of the memory that are marked as bad blocks;
determining, by the controller, whether each of the blocks of the memory is no longer in use;
when one of the blocks is determined to be no longer in use, marking the block as a defective block or a limited block by the controller so that the effective capacity is not less than the declared capacity of the storage device; and
comparing, by the controller, the difference between the effective capacity and the number of marked restricted blocks to the expected usage capacity to determine whether to inhibit a write operation to the memory.
7. The storage space management method of claim 6, further comprising:
when the effective capacity is larger than the declared capacity, if one of the blocks is determined to be no longer used, marking the block as the damaged block by the controller; and
when the available capacity is equal to the advertised capacity, marking, by the controller, one of the blocks as the restricted block if the one of the blocks is determined to be no longer in use.
8. The storage space management method of claim 6, further comprising:
disabling, by the controller, the write operation to the memory when the expected used capacity is greater than the difference between the available capacity and the number of marked restricted blocks; and
when the expected used capacity is not greater than the difference between the effective capacity and the number of blocks marked as restriction blocks, allowing the write operation to the memory by the controller.
9. A storage space management method for a storage device, the storage device including a controller and a memory, the storage device having an advertised capacity, the storage space management method comprising:
the controller stores at least one reinitialization capacity, wherein the at least one reinitialization capacity is smaller than the declaration capacity;
calculating, by the controller, an effective capacity of the memory, wherein the effective capacity is inversely related to a number of blocks of the memory that are marked as bad blocks;
the controller determines whether to start the storage device to perform a reinitialization procedure with the at least one reinitialization capacity according to a difference between the effective capacity and the declaration capacity.
10. The storage space management method of claim 9, wherein the storage device has an advertised capacity table, the advertised capacity table comprising a plurality of reinitialized capacities, the storage space management method further comprising:
when the effective capacity is less than or equal to the declaration capacity, one of the reinitialization capacities which is less than the declaration capacity is selected for reinitialization.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010151211.0A CN113360080A (en) | 2020-03-06 | 2020-03-06 | Storage space management method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010151211.0A CN113360080A (en) | 2020-03-06 | 2020-03-06 | Storage space management method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113360080A true CN113360080A (en) | 2021-09-07 |
Family
ID=77524054
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010151211.0A Pending CN113360080A (en) | 2020-03-06 | 2020-03-06 | Storage space management method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113360080A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101441891A (en) * | 2007-11-19 | 2009-05-27 | 芯邦科技(深圳)有限公司 | Method for using flash memory |
CN102622306A (en) * | 2012-02-21 | 2012-08-01 | 中颖电子股份有限公司 | Bad block management method for storage device |
US20130227246A1 (en) * | 2012-02-23 | 2013-08-29 | Kabushiki Kaisha Toshiba | Management information generating method, logical block constructing method, and semiconductor memory device |
US20170160976A1 (en) * | 2015-12-03 | 2017-06-08 | Sandisk Technologies Inc. | Efficiently Managing Unmapped Blocks to Extend Life of Solid State Drive with Low Over-Provisioning |
CN108139871A (en) * | 2015-10-05 | 2018-06-08 | 美光科技公司 | Solid-state storage device with the variable logic capacity based on the storage life period |
WO2018167890A1 (en) * | 2017-03-15 | 2018-09-20 | 株式会社日立製作所 | Computer system and management method |
CN108595117A (en) * | 2018-03-29 | 2018-09-28 | 记忆科技(深圳)有限公司 | The smooth method of safety during a kind of adjustment of dynamic capacity |
-
2020
- 2020-03-06 CN CN202010151211.0A patent/CN113360080A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101441891A (en) * | 2007-11-19 | 2009-05-27 | 芯邦科技(深圳)有限公司 | Method for using flash memory |
CN102622306A (en) * | 2012-02-21 | 2012-08-01 | 中颖电子股份有限公司 | Bad block management method for storage device |
US20130227246A1 (en) * | 2012-02-23 | 2013-08-29 | Kabushiki Kaisha Toshiba | Management information generating method, logical block constructing method, and semiconductor memory device |
CN108139871A (en) * | 2015-10-05 | 2018-06-08 | 美光科技公司 | Solid-state storage device with the variable logic capacity based on the storage life period |
US20170160976A1 (en) * | 2015-12-03 | 2017-06-08 | Sandisk Technologies Inc. | Efficiently Managing Unmapped Blocks to Extend Life of Solid State Drive with Low Over-Provisioning |
WO2018167890A1 (en) * | 2017-03-15 | 2018-09-20 | 株式会社日立製作所 | Computer system and management method |
CN108595117A (en) * | 2018-03-29 | 2018-09-28 | 记忆科技(深圳)有限公司 | The smooth method of safety during a kind of adjustment of dynamic capacity |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8099632B2 (en) | Urgency and time window manipulation to accommodate unpredictable memory operations | |
US7962807B2 (en) | Semiconductor storage apparatus managing system, semiconductor storage apparatus, host apparatus, program and method of managing semiconductor storage apparatus | |
US20190340080A1 (en) | Hybrid memory system with configurable error thresholds and failure analysis capability | |
US7979636B2 (en) | Method of controlling semiconductor memory card system | |
US8725936B2 (en) | Storage system with flash memory, and storage control method | |
US10222982B2 (en) | Lifetime management device and lifetime management method | |
TWI436369B (en) | Methods for measuring usable lifespan and replacing an in-system programming code of a memory device, and data storage system using the same | |
KR930010981A (en) | Storage device using flash memory | |
JP2010108246A (en) | Storage device and method for managing data storage area | |
JP2011070346A (en) | Memory system | |
WO2017077624A1 (en) | Nonvolatile memory device, and storage device having nonvolatile memory device | |
CN110780811A (en) | Data protection method, device and storage medium | |
JP6098262B2 (en) | Storage device and storage method | |
CN105320621A (en) | Memory system and information processing device | |
JP2008171103A (en) | Semiconductor storage device management system, semiconductor storage device, method for controlling semiconductor storage device management system and program | |
US20080005453A1 (en) | Image forming apparatus | |
CN113360080A (en) | Storage space management method | |
TWI739325B (en) | Storage space management method | |
JP2019125109A (en) | Storage device, storage system, and program | |
JP5661313B2 (en) | Storage device | |
WO2009021176A9 (en) | Urgency and time window manipulation to accommodate unpredictable memory operations | |
JP2010218138A (en) | Memory card reader/writer, method of managing life of memory card, and program thereof | |
JP2022052169A (en) | Memory system and memory system control method | |
JPH04196000A (en) | Storage device | |
JPH09265713A (en) | Information storage device |
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 |