摘要 |
A file access method and apparatus that are applied to a storage device in which a file system is established in a memory, and a storage device. In the method, the storage device may acquire, according to a file identifier of a first target file to be accessed, an index node of the first target file in metadata, wherein information of a first virtual space of the first target file in a global virtual space is stored in the index node of the first target file (205); and the storage device may map the first virtual space to a second virtual space of a process according to the information of the first virtual space recorded in the index node (210) and perform addressing for an added file management register (220, 225). Because a base address of a page directory of a global file page table is stored in the file management register, the storage device can access the first target file according to a start address of the first virtual space and the base address of the page directory of the global file page table. The method can alleviate the burden on a page table of a process and reduce system overheads. |