File access method and related device
First Claim
1. A file access method performed by a computing node, wherein the computing node is controlled by an operating system, wherein the computing node comprises a memory, and the memory comprises:
- a file storage area and a work process area, wherein the operating system runs in the work process area, a file system and files are stored in the file storage area, and the file storage area is non-volatile;
the method comprising;
receiving a file open request that carries a file identifier;
obtaining a physical address space in the file storage area according to the file identifier, wherein the physical address space is used to store a file identified by the file identifier;
allocating a virtual address space to the file after receiving the file open request;
recording a virtual-physical address mapping relationship in a memory page table that is stored in the work process area, wherein the virtual-physical address mapping relationship is a mapping relationship between the virtual address space and the physical address space;
opening the file in response to the file open request;
receiving a file access request after the file is opened; and
accessing, in response to the file access request, the file from the file storage memory area according to the virtual-physical address mapping relationship.
1 Assignment
0 Petitions
Accused Products
Abstract
Embodiments of the application provide a file access method. A computing node receives a file open request that carries a file identifier. The computing node obtains an index node of a file that is identified by the file identifier. The computing node further obtains, based on the index node, a physical address space of a memory area in a file storage area, in which the file is stored. The computing node allocates a virtual address space to the file, and recodes a virtual-physical address mapping relationship by using a memory page table. The virtual-physical address mapping relationship includes a mapping relationship between the virtual address space and the physical address space.
11 Citations
22 Claims
-
1. A file access method performed by a computing node, wherein the computing node is controlled by an operating system, wherein the computing node comprises a memory, and the memory comprises:
- a file storage area and a work process area, wherein the operating system runs in the work process area, a file system and files are stored in the file storage area, and the file storage area is non-volatile;
the method comprising;receiving a file open request that carries a file identifier; obtaining a physical address space in the file storage area according to the file identifier, wherein the physical address space is used to store a file identified by the file identifier; allocating a virtual address space to the file after receiving the file open request; recording a virtual-physical address mapping relationship in a memory page table that is stored in the work process area, wherein the virtual-physical address mapping relationship is a mapping relationship between the virtual address space and the physical address space; opening the file in response to the file open request; receiving a file access request after the file is opened; and accessing, in response to the file access request, the file from the file storage memory area according to the virtual-physical address mapping relationship. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
- a file storage area and a work process area, wherein the operating system runs in the work process area, a file system and files are stored in the file storage area, and the file storage area is non-volatile;
-
12. A computing node, comprising:
-
a processor and a storage device, wherein the storage device comprises a file storage area and a work process memory area, wherein an operating system runs in the work process memory area, a file system and files are stored in the file storage area and the file storage area are non-volatile; and
, by executing the operating system, the processor is configured to;receive a file open request that carries a file identifier; obtain a physical address space in the file storage area according to the file identifier, wherein the physical address space is used to store a file identified by the file identifier; allocate a virtual address space to the file after receiving the file open request; record a virtual-physical address mapping relationship in a memory page table that is stored in the work process area, wherein the virtual-physical address mapping relationship is a mapping relationship between the virtual address space and the physical address space; open the file in response to the file open request; receive a file access request after the file is opened; and access, in response to the file access request, the file from the file storage memory area according to the first virtual-physical address mapping relationship. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19, 20, 21)
-
-
22. A storage device of a computing node, comprising a non-transitory storage medium comprising a file storage area and a work process area, wherein a memory page table is stored in the work process area, and an operating system runs in the work process area, a file system and files are stored in the file storage area and the file storage area is non-volatile, wherein the operating system, when being executed by a processor of the computing node, cause the processor to:
-
receive a file open request that carries a file identifier; obtain a physical address space in the file storage area according to the file identifier, wherein the physical address space is used to store a file identified by the file identifier; allocate a virtual address space to the file after receiving the file open request; record a virtual-physical address mapping relationship in a memory page table that is stored in the work process area, wherein the virtual-physical address mapping relationship is a mapping relationship between the virtual address space and the physical address space; open the file in response to the file open request; receive a file access request after the file is opened; and access, in response to the file access request, the file from the file storage memory area according to the first virtual-physical address mapping relationship.
-
Specification