CN115563075B - Virtual file system implementation method based on microkernel - Google Patents

Virtual file system implementation method based on microkernel Download PDF

Info

Publication number
CN115563075B
CN115563075B CN202211226374.6A CN202211226374A CN115563075B CN 115563075 B CN115563075 B CN 115563075B CN 202211226374 A CN202211226374 A CN 202211226374A CN 115563075 B CN115563075 B CN 115563075B
Authority
CN
China
Prior art keywords
file system
file
virtual
interface
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211226374.6A
Other languages
Chinese (zh)
Other versions
CN115563075A (en
Inventor
肖堃
吴秋颖
罗蕾
陈丽蓉
李蒙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Electronic Science and Technology of China
China Mobile IoT Co Ltd
Original Assignee
University of Electronic Science and Technology of China
China Mobile IoT Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by University of Electronic Science and Technology of China, China Mobile IoT Co Ltd filed Critical University of Electronic Science and Technology of China
Priority to CN202211226374.6A priority Critical patent/CN115563075B/en
Publication of CN115563075A publication Critical patent/CN115563075A/en
Application granted granted Critical
Publication of CN115563075B publication Critical patent/CN115563075B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/188Virtual file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a virtual file system implementation method based on microkernel, setting 4 objects in a virtual file system VFS, including mounting points, file information, directory entries and index nodes, and setting 4 management tables including a file system interface table, a file system mounting table, a file system opening table and an index node table, after constructing to obtain a virtual file system, using the virtual file system as a system component of a microkernel operating system, and deploying the virtual file system in the microkernel operating system in a server mode; and mounting the required file system to a virtual file system server, writing operation functions of the file system aiming at 4 objects, providing a unified POSIX standard interface for a user upwards, further packaging the operation functions into an interface function by docking the file system downwards, and calling files in the file system by the user through the POSIX standard interface. The invention can realize a virtual file system with complete concept, comprehensive functions and convenient operation.

Description

Virtual file system implementation method based on microkernel
Technical Field
The invention belongs to the technical field of microkernel operating systems, and particularly relates to a microkernel-based virtual file system implementation method.
Background
With the development of the internet, microkernel operating systems have gradually become a popular trend, and compared with the traditional integrated operating systems, the microkernel operating systems only provide process/thread management, memory management and interrupt management functions, and common services such as file management and the like are provided outside microkernels. In the microkernel operating system architecture, each process may have its own independent file system, and the microkernel operating system is therefore required to provide support for different file systems. The virtual file system VFS is used as an intermediate layer, a public file model is provided, the universal characteristic set and the behavior of any file system can be represented, different file system interfaces at the bottom layer are packaged downwards, a unified interface is provided for a user upwards, and the universality and the portability of the microkernel operating system are further improved.
The virtual file system provides a unified interface for the user program to operate the file and the file system, and shields the difference and the operation details of different file systems. Through the VFS, the kernel can provide general system call and execute across different file systems and media, so that the process of accessing different file systems by a user is greatly simplified. Meanwhile, in the design and implementation of the virtual file system layer, a combined mounting technology is adopted, so that the microkernel operating system can support a container, and a legal user can obtain effective system access permission in legal time by effectively monitoring the activity of accessing resources by the user, thereby preventing unauthorized users from accessing the system resources.
Currently, the main microkernel operating system, such as fuchsia, has a file system implemented in a user space and exists in the form of a process, but a specific complicated interface and protocol are needed to communicate with an entity. At present, although the domestic open source microkernel operating system One OS relates to the concept of a virtual file system, the method only expands the FATFS file system at the bottom layer; aliOS supports various file systems, but has no concept of designing an index node and the like, and its VFS versatility is yet to be further enhanced.
Disclosure of Invention
The invention aims to overcome the defects of the prior art, and provides a virtual file system implementation method based on microkernels, which realizes a virtual file system with complete concept, comprehensive functions and convenient operation, thereby improving the universality and portability of the microkernel operating system.
In order to achieve the above object, the method for implementing a virtual file system based on microkernel of the present invention includes the steps of:
s1: setting an object of a Virtual File System (VFS) and comprising a mounting point, a file, a catalog item and an index node, wherein:
the mounting point is used for storing information of the installed file system;
the file is used for storing information about interactions between the opened file and the process;
the directory entry is used for recording the read directory or file and caching the read directory or file into the memory;
the index node is used for representing general metadata information of the file system object, and takes the index node number as a unique identification number for the file; general metadata information includes file access rights, owner, group, size, generation time, access time, last modification time;
s2: setting a management table of a virtual file system, wherein the management table comprises a file system interface table, a file system mounting table, a file system opening table and an index node table, and the management table comprises the following components:
the file system interface table is used for recording interface functions of an underlying file system supported by the virtual file system VFS;
the file system mounting table is used for recording a file system mounted in the current virtual file system VFS;
the file system opening table is used for recording the current opened file;
the index node table is used for recording the index node which is opened currently;
s3: constructing a virtual file system according to the object in the step S1 and the management table in the step S2, and deploying the virtual file system in the microkernel operating system in the form of a server by taking the virtual file system as a system component of the microkernel operating system;
s4: mounting a required file system to a virtual file system server, acquiring mounting points of the file system and recording the mounting points to a file system mounting table; writing operation functions corresponding to the mounted file system aiming at four objects of the mounting point, the file, the catalog item and the index node, obtaining an operation function set of the file system and opening the operation function set for a user; each operation function in the operation function set provides a unified POSIX standard interface for a user upwards, and the downward docking file system further packages the operation function into an interface function so that the interface function meets the interface standard of the operation function in the virtual file system VFS; storing interface functions corresponding to each operation function of the file system into a file system interface table;
s5: the following method is adopted to call the file system in the virtual file system:
s5.1: when a user needs to call a Virtual File System (VFS), setting a specific identifier (vfs_endpoint) for a call request, generating a call request structure (vfs_req) including a POSIX standard interface, a file path and call parameters which need to be called, and then sending the call request structure to the kernel of the microkernel operating system by the user;
s5.2: the kernel forwards the call request of the user to the virtual file system server;
s5.3: after receiving a call request of a user, the virtual file system server executes the call request and returns the obtained result to the kernel, and the specific method for executing the call request is as follows:
determining the file and operation of the call according to POSIX standard interface information in the call request, and executing the method according to the following steps if the operation is that the file is opened:
1) Converting the file path called at this time into an absolute path in a virtual file system;
2) Searching mounting points of the corresponding file system in the file system mounting table according to the absolute path to obtain the corresponding file system;
3) Inquiring in a file system interface table to obtain an interface function corresponding to an operation function corresponding to the file system, and calling the interface function to open the corresponding file of the file system; in the process, an empty entry is distributed in a file opening table, a file structure body is filled, wherein the file structure body comprises an opening file pointer fp, then a corresponding file descriptor fd is enabled to be equal to the number of the entry, and the file descriptor fd is taken as a return result; meanwhile, an empty entry is distributed in the index node table, and index nodes of the opened file are filled;
if the operation called this time is a read/write operation for the opened file, the method is executed according to the following steps:
1) Inquiring in a file opening table according to the file path to obtain a file descriptor fd of the operated file and a corresponding opening file pointer fp, and then inquiring in an index node table to obtain an index node of the operated file;
2) Adding one to the reference count corresponding to the file descriptor fd in the file opening table, then calling the interface function of the bottom layer, transmitting function parameters in the calling request, and executing the interface function on the file according to the index node;
3) After the interface function is executed, the execution result is taken as a return result, and at the moment, the reference count corresponding to the item of file descriptor fd in the file opening table is reduced by one;
after completing a call request, the virtual file system server generates a call reply structure body which comprises a return result, a return state and a return type corresponding to a specific operation;
s5.4: the kernel packages the received call reply structure and the corresponding call request identifier vfs_endpoint, and then returns to the user.
The invention discloses a virtual file system implementation method based on microkernel, which comprises the steps of setting 4 objects in a virtual file system VFS, wherein the objects comprise mounting points, file information, directory entries and index nodes, setting 4 management tables comprising a file system interface table, a file system mounting table, a file system opening table and an index node table, and after a virtual file system is constructed, using the virtual file system as a system component of a microkernel operating system and deploying the virtual file system in the microkernel operating system in a server mode; and mounting the required file system to a virtual file system server, writing operation functions of the file system aiming at 4 objects, providing a unified POSIX standard interface for a user upwards, further packaging the operation functions into an interface function by docking the file system downwards, and calling files in the file system by the user through the POSIX standard interface.
The virtual file system constructed by the invention exists in the micro-kernel operating system in the form of a server, has more comprehensive functions and more convenient operation, realizes the inode, supports the inode operation, takes the inode number as the unique identification operation of the file instead of the file name, and ensures that the file is more convenient to call.
Drawings
FIG. 1 is a flow chart of an embodiment of a microkernel-based virtual file system implementation method of the present invention;
FIG. 2 is an exemplary diagram of a file system open table and inode table correspondence in accordance with the present invention;
FIG. 3 is a flow chart of the invocation of the virtual file system in the present invention.
Detailed Description
The following description of the embodiments of the invention is presented in conjunction with the accompanying drawings to provide a better understanding of the invention to those skilled in the art. It is to be expressly noted that in the description below, detailed descriptions of known functions and designs are omitted here as perhaps obscuring the present invention.
Examples
FIG. 1 is a flow chart of an embodiment of the microkernel-based virtual file system implementation method of the present invention. As shown in FIG. 1, the method for implementing the virtual file system based on the microkernel comprises the following specific steps:
s101: setting a virtual file system object:
a virtual file system VFS may access multiple "real file systems", which are located between an application and a specific file system, and mainly serve as an adaptation, and the interfaces accessed by the application are completely consistent. It is virtual because the various data structures of the file system are built or deleted at any time, and are not permanently present on disk but can only be stored in memory. If only the VFS is not operational in the system, it is not a true file system. The VFS serves as an interface between the file system and the kernel, manages various specific file systems in a unified data structure, and accepts various operations of the user layer on the file systems. Modern operating systems such as Linux abstract access to the file system through a virtual interface, providing a standard file operation interface up to the application layer, enabling system calls such as open (), read (), and write () to work regardless of the file system or underlying physical medium; a standard interface is provided down to the file system so that the file systems of other operating systems can be easily migrated to the system. The virtual file system provides a common file model that is as large as possible so that the model contains a collection of all file system functions that can represent the common set of characteristics and behaviors of any file system, specifically some basic conceptual interfaces and data structures.
Based on the above analysis, the object to be set in the virtual file system VFS of the present invention includes mount points, files, directory entries, and inodes, wherein:
the mounting point is used for storing information of the installed file system, including an actual operation interface of the file system.
The file is used to store information about interactions between the opened file and the process. The file object is only present in kernel memory when the process opens the file.
The directory entry is used for recording the file system directory or file which has been read and caching the file system directory or file into the memory. Because the directory entries are cached in the memory, when the same file system directory or file is read again next time, the file system efficiency is greatly improved by only reading from the memory.
An inode (inode) is used to represent general metadata information of a file, with an inode number as a unique identification number for the file. General metadata information includes file access rights, owner, group, size, generation time, access time, last modification time. Inodes are the most basic units for managing a file system, and are also bridges for connecting any subdirectories and files by the file system. Static information in the inode is taken from a file system on the physical device, filled in by a function specified by the file system, which is only present in memory and accessible through the inode cache. Each inode has an inode number v_num, which is unique in the same file system.
S102: setting a virtual file system management table:
in the invention, the virtual file system is provided with four management tables to realize the management of the whole file system, and the four management tables are respectively: file system interface table, file system mount table, file system open table, inode table, wherein:
the file system interface table is used to record the interface functions of the underlying file system supported by the virtual file system VFS. Because the virtual file system VFS provides a common file operation set for the user, the user operates the file by using a unified POSIX standard interface regardless of how the specific underlying layer is implemented, and the user's unified interface function is responsible for distributing to the underlying file system specific interface function, this part is responsible for the VFS, so that a file system interface table needs to be set, and then when the user operates the file by the VFS, the user needs to look up the table to find the corresponding operation function set.
The file system mounting table is used for recording the file system mounted in the current virtual file system VFS and the corresponding mounting point. Because the virtual file system VFS in the present invention supports mounting a plurality of file systems, it is necessary to use a file system mounting table for management.
The file system open table is used for recording the file which is opened currently. As is well known, the time required for reading data from disk to memory is very long, so that a file system open table is designed to record the open file, after a file is opened, a file handle FD is returned, namely the array index of the current file system open table, and the subsequent operations such as reading and writing of the file are based on FD without complicated operations from disk.
The index node table is used for recording the index node which is opened currently. Although each file has a corresponding index node, the system only establishes a corresponding inode data structure for the file in the memory when needed, the established inode structure forms a linked list, namely an index node list, then the needed file nodes can be obtained by traversing the linked list, and the VFS also constructs a buffer memory and a hash table for the allocated inodes so as to improve the system performance. In general, there is a many-to-1 relationship between a file system open table and an inode table. FIG. 2 is an exemplary diagram of the correspondence between file system open tables and inode tables in the present invention.
S103: deploying a virtual file system:
and constructing a virtual file system according to the object in the step S101 and the management table in the step S102, and deploying the virtual file system in the microkernel operating system in the form of a server as a system component of the microkernel operating system.
S104: and (3) a file system is mounted:
and mounting the required file system to a virtual file system server, acquiring mounting points of the file system and recording the mounting points to a file system mounting table. When a file system is mounted, whether the file system is mounted or not is generally judged, namely whether the file system exists in a file system mounting table, if yes, the file system is not repeatedly mounted, if not, one item is taken from the file system mounting table, a mounting point structure body is filled, wherein the filling of the mounting point structure body comprises the filling of mnt_point- > fs_ops, and the file system interface table is required to be read to obtain an operation interface of the corresponding file system in one step of operation.
And compiling operation functions corresponding to the mounted file system aiming at four objects of the mounting point, the file, the catalog item and the index node, obtaining an operation function set of the file system and opening the operation function set for a user. Each operation function in the operation function set provides a statistical POSIX standard interface for a user upwards, and the downward docking file system packages the operation function into an interface function further so that the interface function meets the interface standard of the operation function in the virtual file system VFS. And storing the interface function corresponding to each operation function of the file system into a file system interface table. Therefore, the user can operate the file through the POSIX standard interface without concern about how the underlying file system is specifically realized, and the user operation is simplified.
S105: calling a file system:
since the virtual file system VFS of the present invention exists as a system component in the form of a server, not as a kernel module, it is necessary to redesign its calling method. FIG. 3 is a flow chart of the invocation of the virtual file system in the present invention. As shown in FIG. 3, the specific steps of the virtual file system call in the present invention include:
s301: the user initiates a call request to the kernel:
when a user needs to call the virtual file system VFS, a specific identifier vfs_endpoint is set for a call request, a call request structure (vfs_req) is generated, wherein the call request structure comprises a POSIX standard interface, a file path and call parameters which need to be called, and then the user sends the call request structure to the kernel of the microkernel operating system.
S302: the kernel forwards the call request:
the kernel forwards the user's call request structure to a virtual file system server (VFS server).
S303: the server completes the request and returns the result:
after receiving the call request structure of the user, the virtual file system server executes the call request and returns the obtained result to the kernel. For files in the virtual file system, operations thereof are mainly divided into opening files and reading/writing operations on the opened files. Therefore, the specific method for executing the call request in the invention is as follows:
determining the file and operation of the call according to POSIX standard interface information in the call request structure, and executing the method according to the following steps if the operation of the call is file opening:
1) And converting the file path called at the time into an absolute path in the virtual file system.
2) And searching mounting points of the corresponding file system in the file system mounting table according to the absolute path to obtain the corresponding file system. In this embodiment, when searching for the mounting point, the longest prefix matching algorithm is used for searching.
3) And inquiring in the file system interface table to obtain an interface function corresponding to the operation function of the file system, and calling the interface function to open the corresponding file of the file system. In this process, an empty entry is allocated in the file open table, filling the file structure (vfs_file), including the open file pointer fp, and then making the corresponding file descriptor fd equal to the entry number, with the file descriptor fd as the return result. And meanwhile, an empty entry is distributed in the index node table, and index nodes of the opened file are filled.
Thus, a complete file open operation is completed.
If the operation called this time is a read/write operation for the opened file, the method is executed according to the following steps:
1) And inquiring in a file opening table according to the file path to obtain a file descriptor fd of the operated file and a corresponding opening file pointer fp, and then inquiring in an index node table to obtain an index node of the operated file.
2) And adding one to the reference count corresponding to the file descriptor fd in the file opening table, calling the interface function of the bottom layer, transmitting the function parameters in the calling request, and executing the interface function on the file according to the index node. Taking the read/write function in the interface function as an example, the required incoming parameters are: open file pointer fp, data buf to be transferred, length len of transferred data.
3) After the interface function is executed, the execution result is taken as a return result, and the reference count corresponding to the file descriptor fd in the file opening table is reduced by one.
In practical application, in order to ensure file security and reduce conflict, a read-write lock can be set for a file opening table, if a user is writing a certain file, a 'write lock' of the file is set in the file opening table, and other users need to wait after inquiring the 'write lock' before operating; if a user is performing a read operation on a certain file, setting a read lock of the file in a file opening table, and after other users inquire the read lock before the operation, the user who is to perform the read operation can also perform the read operation, and the user who is to perform the write operation needs to wait.
In addition, during the reading operation, the directory entry can be queried first, if the file is cached in the directory entry, the data in the directory entry can be directly referenced, so that the time is saved. After the file is read, the file can be cached in the directory entry for the next reading.
The virtual file system server generates a call reply structure (vfs_reply) after completing a call request, wherein the call reply structure comprises a return result, a return state and a return type corresponding to a specific operation, such as vfs_ replyopen, vfs _ replyread, vfs _reply write and the like.
S304: the kernel returns the result:
the kernel packages the received call reply structure and the corresponding call request identifier vfs_endpoint, and then returns to the user.
So far, a complete calling process is finished.
While the foregoing describes illustrative embodiments of the present invention to facilitate an understanding of the present invention by those skilled in the art, it should be understood that the present invention is not limited to the scope of the embodiments, but is to be construed as protected by the accompanying claims insofar as various changes are within the spirit and scope of the present invention as defined and defined by the appended claims.

Claims (2)

1. The method for realizing the virtual file system based on the microkernel is characterized by comprising the following steps of:
s1: setting an object of a Virtual File System (VFS) and comprising a mounting point, a file, a catalog item and an index node, wherein:
the mounting point is used for storing information of the installed file system;
the file is used for storing information about interactions between the opened file and the process;
the directory entry is used for recording the read directory or file and caching the read directory or file into the memory;
the index node is used for representing general metadata information of the file system object, and takes the index node number as a unique identification number for the file; general metadata information includes file access rights, owner, group, size, generation time, access time, last modification time;
s2: setting a management table of a virtual file system, wherein the management table comprises a file system interface table, a file system mounting table, a file system opening table and an index node table, and the management table comprises the following components:
the file system interface table is used for recording interface functions of an underlying file system supported by the virtual file system VFS;
the file system mounting table is used for recording a file system mounted in the current virtual file system VFS;
the file system opening table is used for recording the current opened file;
the index node table is used for recording the index node which is opened currently;
s3: constructing a virtual file system according to the object in the step S1 and the management table in the step S2, and deploying the virtual file system in the microkernel operating system in the form of a server by taking the virtual file system as a system component of the microkernel operating system;
s4: mounting a required file system to a virtual file system server, acquiring mounting points of the file system and recording the mounting points to a file system mounting table; writing operation functions corresponding to the mounted file system aiming at four objects of the mounting point, the file, the catalog item and the index node, obtaining an operation function set of the file system and opening the operation function set for a user; each operation function in the operation function set provides a unified POSIX standard interface for a user upwards, and the downward docking file system further packages the operation function into an interface function so that the interface function meets the interface standard of the operation function in the virtual file system VFS; storing interface functions corresponding to each operation function of the file system into a file system interface table;
s5: the following method is adopted to call the file system in the virtual file system:
s5.1: when a user needs to call a Virtual File System (VFS), setting a specific identifier (vfs_endpoint) for a call request, generating a call request structure (vfs_req) including a POSIX standard interface, a file path and call parameters which need to be called, and then sending the call request structure to the kernel of the microkernel operating system by the user;
s5.2: the kernel forwards the call request of the user to the virtual file system server;
s5.3: after receiving a call request of a user, the virtual file system server executes the call request and returns the obtained result to the kernel, and the specific method for executing the call request is as follows:
determining the file and operation of the call according to POSIX standard interface information in the call request, and executing the method according to the following steps if the operation is that the file is opened:
1) Converting the file path called at this time into an absolute path in a virtual file system;
2) Searching mounting points of the corresponding file system in the file system mounting table according to the absolute path to obtain the corresponding file system;
3) Inquiring in a file system interface table to obtain an interface function corresponding to an operation function corresponding to the file system, and calling the interface function to open the corresponding file of the file system; in the process, an empty entry is distributed in a file opening table, a file structure body is filled, wherein the file structure body comprises an opening file pointer fp, then a corresponding file descriptor fd is enabled to be equal to the number of the entry, and the file descriptor fd is taken as a return result; meanwhile, an empty entry is distributed in the index node table, and index nodes of the opened file are filled;
if the operation called this time is a read/write operation for the opened file, the method is executed according to the following steps:
1) Inquiring in a file opening table according to the file path to obtain a file descriptor fd of the operated file and a corresponding opening file pointer fp, and then inquiring in an index node table to obtain an index node of the operated file;
2) Adding one to the reference count corresponding to the file descriptor fd in the file opening table, then calling the interface function of the bottom layer, transmitting function parameters in the calling request, and executing the interface function on the file according to the index node;
3) After the interface function is executed, the execution result is taken as a return result, and at the moment, the reference count corresponding to the item of file descriptor fd in the file opening table is reduced by one;
after completing a call request, the virtual file system server generates a call reply structure body which comprises a return result, a return state and a return type corresponding to a specific operation;
s5.4: the kernel packages the received vfs_reply structure and the corresponding call request identifier vfs_endpoint, and then returns to the user.
2. The method for implementing a virtual file system according to claim 1, wherein a read-write lock is set in the file opening table, and if a user is writing a certain file, a "write lock" of the file is set in the file opening table, and other users need to wait after querying the "write lock" before operating; if a user is performing a read operation on a certain file, setting a read lock of the file in a file opening table, and after other users inquire the read lock before the operation, the user who is to perform the read operation can also perform the read operation, and the user who is to perform the write operation needs to wait.
CN202211226374.6A 2022-10-09 2022-10-09 Virtual file system implementation method based on microkernel Active CN115563075B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211226374.6A CN115563075B (en) 2022-10-09 2022-10-09 Virtual file system implementation method based on microkernel

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211226374.6A CN115563075B (en) 2022-10-09 2022-10-09 Virtual file system implementation method based on microkernel

Publications (2)

Publication Number Publication Date
CN115563075A CN115563075A (en) 2023-01-03
CN115563075B true CN115563075B (en) 2023-05-30

Family

ID=84744440

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211226374.6A Active CN115563075B (en) 2022-10-09 2022-10-09 Virtual file system implementation method based on microkernel

Country Status (1)

Country Link
CN (1) CN115563075B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2142797A1 (en) * 1994-03-07 1995-09-08 Thomas George Cantrell System and method for efficient caching in a distributed file system
CN101082927A (en) * 2007-07-02 2007-12-05 浙江大学 File services method based on ContextFS context file systems
CN104133889A (en) * 2014-07-30 2014-11-05 国云科技股份有限公司 Database virtualization microkernel data source registration and encapsulation method
CN113243008A (en) * 2019-05-10 2021-08-10 华为技术有限公司 Distributed VFS with shared page cache
CN114942727A (en) * 2022-05-30 2022-08-26 上海交通大学 Micro-kernel file system extensible page cache system and method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120011176A1 (en) * 2010-07-07 2012-01-12 Nexenta Systems, Inc. Location independent scalable file and block storage

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2142797A1 (en) * 1994-03-07 1995-09-08 Thomas George Cantrell System and method for efficient caching in a distributed file system
CN101082927A (en) * 2007-07-02 2007-12-05 浙江大学 File services method based on ContextFS context file systems
CN104133889A (en) * 2014-07-30 2014-11-05 国云科技股份有限公司 Database virtualization microkernel data source registration and encapsulation method
CN113243008A (en) * 2019-05-10 2021-08-10 华为技术有限公司 Distributed VFS with shared page cache
CN114942727A (en) * 2022-05-30 2022-08-26 上海交通大学 Micro-kernel file system extensible page cache system and method

Also Published As

Publication number Publication date
CN115563075A (en) 2023-01-03

Similar Documents

Publication Publication Date Title
KR101786871B1 (en) Apparatus for processing remote page fault and method thereof
CN110046133B (en) Metadata management method, device and system for storage file system
JP5589205B2 (en) Computer system and data management method
US7707337B2 (en) Object-based storage device with low process load and control method thereof
CN107273522B (en) Multi-application-oriented data storage system and data calling method
US7797275B2 (en) System and method of time-based cache coherency maintenance in user file manager of object-based storage system
US6449607B1 (en) Disk storage with modifiable data management function
KR100293795B1 (en) Distributed Database System and Data Entity Access Methods
JP2004280283A (en) Distributed file system, distributed file system server, and access method to distributed file system
EP3076307A1 (en) Method and device for responding to a request, and distributed file system
CN114528255A (en) Metadata management method, electronic device and computer program product
CN115774703A (en) Information processing method and device
CN101414295A (en) Method for upgrading database
CN114995948A (en) Method, device, equipment and system for downloading secure container mirror image file
WO2020214371A1 (en) Virtualized append-only interface
US20220342888A1 (en) Object tagging
CN115858409A (en) Data prefetching method, computing node and storage system
CN115563075B (en) Virtual file system implementation method based on microkernel
CN112835638A (en) Configuration information management method and device based on embedded application program
CN116680233A (en) File access method, system, electronic equipment and machine-readable storage medium
JP2007287180A (en) Distributed file system, distributed file system server, and method for accessing distributed file system
CN112748854B (en) Optimized access to a fast storage device
CN114490727A (en) High-dimensional vector searching method for target database and related equipment
KR20090065171A (en) Device and method for managing memory in rfid tag
CN112835873A (en) Power grid regulation and control heterogeneous system service access method, system, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant