主权项 |
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:
at least associating the physical erasing units with a data area, a backup area and 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 the physical erasing units associated with the data area, and the 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; 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. |