The invention relates to the technical field of hard disks, in particular to a data protection method of a
solid state disk and the
solid state disk, the method comprises the steps that a
flash memory medium is divided into a data block area, a log block area and a
metadata area, and the
metadata area comprises a mapping
directory, a mapping block and a
check point block; a block mapping table and a log page mapping table are established in a
volatile memory, and dbMSN and lbMSN are stored. Adding write-in data to a log block page, updating a log page mapping table, and generating check points according to full writing of a log area. When no free page exists, the damaged log blocks are selected in a rotating mode to be combined, new data block migration pages are distributed, mapping is updated, the MSN is progressively increased, changes are written into the mapping blocks, and the mapping catalogue is updated when the mapping blocks are addressed. After restarting, positioning a mapping block by a mapping
directory to recover block mapping, reading check points in a
reverse order, and traversing an uncovered log area to reconstruct log page mapping; and comparing the dbMSN with the lbMSN, setting inconsistent log pages to be invalid, establishing consistent access and shielding invalid pages. According to the method and the device, the problems of
data consistency and availability caused by
metadata loss, uncertain merging state and low
recovery efficiency of the
hybrid mapping FTL in a
crash scene can be solved.