Patent ID: 9280460
Filing Date: 2016-03-08
CPC Classification: G06F

Claim Text:
1. A data writing method for a rewritable non-volatile memory module having a plurality of physical erasing units, and the data writing method comprising: associating the physical erasing units with a data area, a backup area or a spare area; configuring a plurality of first logical units and a plurality of second logical units for being accessed by a host system, wherein the first logical units are mapped to physical erasing units associated with the data area, and second logical units are mapped to the physical erasing units associated with the backup area; setting a value obtained by summing a minimum threshold and a predetermined number as a garbage collecting threshold, wherein the minimum threshold is the number of physical erasing units required for a data merging operation, and the predetermined number is the number of physical erasing units reserved dedicating to write backup data; receiving a first write command from the host system, wherein the first write command instructs to write first data into at least one logical unit among the second logical units; and getting at least one first physical erasing unit from among the physical erasing units of the spare area, writing the first data into the at least one first physical erasing unit, associating the at least one first physical erasing unit with the backup area, and adjusting the garbage collecting threshold according to a number of the at least one first physical erasing unit and the minimum threshold, wherein the adjusted garbage collecting threshold is obtained by subtracting the number of the physical erasing units associated with the backup area among the physical erasing units from the value obtained by summing the minimum threshold and the predetermined number, and the number of the physical erasing units associated with the backup area among the physical erasing units is not greater than the predetermined number.