Garbage collection method for data storage device
AssigneeSilicon Motion, Inc.
InventorHsueh-Chun Fu
Life of this patent
Estimating the term…
Abstract
A garbage collection method is provided and applied to a data storage device. The garbage collection method includes the following steps: selecting source blocks from data blocks, wherein a total number of valid data of the source blocks is larger than or equal to a predetermined data number of a block; copying valid data of a part of the source blocks into a destination block, wherein a total number of the valid data of the part of the source blocks is smaller than the predetermined data number; copying all or a part of valid data of remaining source blocks into the destination block; updating a logical to physical addresses mapping table based on a mapping information of the destination block; and recovering all or a part of the source blocks as spare blocks.
Claims16
A garbage collection method, applied to a data storage device, the garbage collection method comprising:
- selecting source blocks from data blocks, wherein a total amount of valid data of the source blocks is larger than or equal to a predetermined amount of data of a data block;
- copying valid data of a part of the source blocks into a destination block, wherein a total amount of the valid data of the part of the source blocks is smaller than the predetermined amount of data;
- copying all or a part of valid data of remaining source blocks into the destination block, wherein an amount of data of the copied valid data of the remaining source blocks is equal to the total amount of the valid data of the source blocks minus the predetermined amount of data;
- updating a logical to physical addresses mapping table based on a mapping information of the destination block;
- and
- recovering all or the part of the source blocks as spare blocks.
A data storage device comprising:
- a control unit, configured to execute a garbage collection method, wherein the garbage collection method includes:
- selecting source blocks from data blocks, wherein a total amount of valid data of the source blocks is larger than or equal to a predetermined amount of data of a data block;
- copying valid data of a part of the source blocks into a destination block, wherein a total amount of the valid data of the part of the source blocks is smaller than the predetermined amount of data;
- copying all or a part of valid data of remaining source blocks into the destination block, wherein an amount of data of the copied valid data of the remaining source blocks is equal to the total amount of the valid data of the source blocks minus the predetermined amount of data;
- updating a logical to physical addresses mapping table based on a mapping information of the destination block;
- and
- recovering all or the part of the source blocks as spare blocks.
Dependencies are inferred from the claim text.