| CPC G06F 21/6209 (2013.01) | 18 Claims |

|
1. A data access method performed by a processing device, wherein the processing device manages a storage device based on a log-structured file system (LFS), and the method comprises:
writing, by the processing device, a target file to the storage device based on an out place update (OPU) mechanism; and
writing, by the processing device, file attribute information corresponding to the target file in the storage device to out of band (OOB) data of the storage device, to restore, after abnormal power-off, access to the target file by using the file attribute information stored in the OB data;
after being powered on again, obtaining, by the processing device, the file attribute information corresponding to the target file from the OB data of the storage device, wherein the file attribute information comprises writing location information and location offset information of each piece of file data in the target file; and
establishing, by the processing device, in the processing device by using the writing location information and the location offset information in the file attribute information, an index address corresponding to each piece of file data, so that the processing device accesses, by using the index address, file data that has been written to the storage device.
|