CPC G06F 12/0253 (2013.01) [G06F 12/10 (2013.01); G06F 16/1727 (2019.01); G06F 2212/1044 (2013.01)] | 17 Claims |
1. A garbage data scrubbing method, implemented by a terminal comprising a storage device, wherein the garbage data scrubbing method comprises:
obtaining an input/output (IO) busy/idle status of the terminal at a current moment, wherein the IO busy/idle status comprises a busy state or an idle state;
delivering a discard message to the storage device when the IO busy/idle status is the idle state, wherein the discard message comprises an initial address and a size of to-be-scrubbed physical space in the storage device, and wherein the discard message instructs the storage device to unbind a mapping relationship between a physical address of the to-be-scrubbed physical space and a corresponding logical address;
obtaining a first busy/idle status of a block layer, a second busy/idle status of the storage device, a third busy/idle status of an application layer, and a probability that the IO busy/idle status is the busy state; and
determining the IO busy/idle status based on the first busy/idle status, the second busy/idle status, the third busy/idle status, and the probability.
|