US 12,306,765 B2
Method and non-transitory computer-readable storage medium and apparatus for updating host-to-flash address mapping table
Shen-Ting Chiu, Miaoli County (TW)
Assigned to Silicon Motion, Inc., Zhubei (TW)
Filed by Silicon Motion, Inc., Zhubei (TW)
Filed on Oct. 21, 2022, as Appl. No. 17/971,403.
Claims priority of application No. 202111392787.7 (CN), filed on Nov. 23, 2021.
Prior Publication US 2023/0161713 A1, May 25, 2023
Int. Cl. G06F 12/1009 (2016.01)
CPC G06F 12/1009 (2013.01) [G06F 2212/7201 (2013.01)] 18 Claims
OG exemplary drawing
 
1. A method for updating a host-to-flash address mapping (H2F) table, performed by a flash controller, comprising:
allocating space in a random access memory (RAM) for a first H2F sub-table and first intermediate information, which is used to update a second H2F sub-table in a flash module;
updating the first H2F sub-table and the first intermediate information temporarily stored in the RAM during an execution of a host write command, wherein the host write command is executed to program data into the flash module, the second H2F sub-table is not stored in the RAM during the execution of the host write command, and the first intermediate information is stored in a flash-to-host address mapping (F2H) table for a current block;
during the execution of the host write command, updating the F2H table for the current block, which is temporarily stored in the RAM, for storing information indicating which logical addresses that are mapped to a plurality of programmed pages in the current block, wherein the logical addresses comprise a first logical address associated with the first H2F sub-table and a second logical address associated with the second H2F sub-table;
for the first logical address, updating the first H2F sub-table for storing information indicating which physical address is mapped to the first logical address, and setting a first update flag corresponding to the first logical address in the F2H table for the current block to a first value;
for the second logical address, setting a second update flag corresponding to the second logical address in the F2H table for the current block to a second value; and
in a table update procedure, programming the first H2F sub-table temporarily stored in the RAM into a system block in the flash module, updating the second H2F sub-table according to the first intermediate information stored in the RAM, and programming updated second H2F sub-table into the system block in the flash module.