US 12,253,942 B2
System and method for defragmentation of memory device
Mo Cheng, Wuhan (CN)
Assigned to YANGTZE MEMORY TECHNOLOGIES CO., LTD., Wuhan (CN)
Filed by YANGTZE MEMORY TECHNOLOGIES CO., LTD., Wuhan (CN)
Filed on Jun. 2, 2022, as Appl. No. 17/831,203.
Application 17/831,203 is a continuation of application No. PCT/CN2021/139955, filed on Dec. 21, 2021.
Prior Publication US 2023/0195617 A1, Jun. 22, 2023
Int. Cl. G06F 12/02 (2006.01)
CPC G06F 12/0292 (2013.01) [G06F 2212/7201 (2013.01)] 14 Claims
OG exemplary drawing
 
1. A memory controller of a storage device, comprising:
a controller memory for storing a logical-to-physical (L2P) address mapping table corresponding to a file; and
a controller processor configured to control a memory device of the storage device, receive a mapping update command from a host, and update the L2P address mapping table according to the mapping update command by:
replacing original logical addresses of logical block address (LBA) segments of the file with new continuous logical addresses of a merged LBA segment of the file, and
changing an original mapping relation between the original logical addresses of the LBA segments of the file and physical addresses of the file, to a new mapping relation between the new continuous logical addresses of the merged LBA segment of the file and the physical addresses of the file,
wherein the L2P address mapping table is stored in a volatile controller memory in the controller memory; and
the controller processor is further configured to transmit the updated L2P address mapping table to a physical data block of the memory device and transmit an instruction to the host acknowledging that the L2P address mapping table has been updated in the physical data block of the memory device,
wherein the controller processor is configured to generate a merge log by recording the new mapping relation between the new continuous logical addresses of the merged LBA segment of the file and the physical addresses of the file and transmit the merge log to the physical data block of the memory device,
wherein the merge log stored in the physical data block updates faster than the L2P address mapping table stored in the physical data block.