The invention relates to the technical field of
solid-state storage, in particular to a
solid-state disk
data consistency control method, and aims to solve the problems that a
solid-state disk is poor in
data consistency, high in power failure loss risk and difficult to balance writing efficiency and consistency under the scenes of power failure, parallel writing and
garbage collection. Full-process
consistency control is realized by constructing a'cache-persistent cache 'layered architecture and combining a multi-channel write synchronization, power failure emergency migration and periodic check repair mechanism: receiving data and storing the data in a cache firstly, distributing a multi-channel write task according to weighted
polling and
synchronizing the state; the standby
capacitor is triggered to supply power during power failure, and the cache data is migrated to the persistent cache according to the FIFO; and according to a configurable period of 1-24 hours,
flash memory block data are verified through SHA-256 hash, and when the
flash memory block data are inconsistent, the
flash memory block data are repaired from a persistent cache /
backup block. According to the method, the
data consistency compliance rate of the solid-state disk is larger than or equal to 99.9%, the power-down
data loss rate is smaller than or equal to 0.01%, the write-in
delay is reduced by 15%-20%, and the method is adaptive to consumption-level, enterprise-level and industrial-level solid-state disks.