When a line is selected for recycling by the garbage collector (GC), theline state changes and the invalid bitmap is frozen, preventinginvalidations from happening. Throughout the GC, the L2P map is checkedto verify that not data being recycled has been updated. The last checkis done before the new map is being stored on the L2P table. Thoughthis algorithm works, it requires a number of corner cases to be checkedeach time the L2P table is being updated. This complicates readabilityand is error prone in case that the recycling algorithm is modified.

Instead, this patch makes the invalid bitmap accessible even when theline is being recycled. When recycled data is being remapped, it isenough to check the invalid bitmap for the line before updating the L2Ptable.