File processing method, user mode file system, device and computer program product

By introducing the cache request queue of the fuse process into the user-mode file system, the problem of failure spread caused by abnormal exit of the file system process is solved, ensuring the normal operation of the user-mode file system is improved, and the application experience and practicality of the user-mode file system is improved.

CN120429276APending Publication Date: 2025-08-05HANGZHOU ALICLOUD FEITIAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410160379.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-02-04
Publication Date
2025-08-05

AI Technical Summary

Technical Problem

In a user-state file system, when the file system process exits abnormally, the opened files are unavailable, and the fault spreads to the user process, seriously affecting the normal operation of the user process.

Method used

By introducing the cache request queue of the fuse process in the user-state file system, when the file system process exits, the status of the file processing request is set to hanging to keep the file processing link of the fuse process normal until the file system process recovers.

Benefits of technology

It effectively avoids the spread of faults to the user process, ensures the normal operation of the user process, and improves the application experience and practicality of the user-state file system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120429276A_ABST
    Figure CN120429276A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a file processing method, a user mode file system, equipment and a computer program product. The file processing method is applied to a user mode file system, and the user mode file system comprises a file system process and a user space file system fuse process in communication connection with the file system process. The file processing method comprises the steps that a fuse process obtains a file processing request; the fuse process caches the file processing request, and the fuse process comprises a cache request queue used for caching the file processing request; under the condition that the file system process exits, the fuse process determines the request processing state of the file processing request as a suspension state, so that a file processing link where the fuse process is located is kept in a normal state. In the embodiment, when the file system process exits, the fuse process can cache the file processing request, so that normal operation of the user process is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a file processing method, a user-mode file system, a device, and a computer program product. Background Art

[0002] With the continuous growth of the complexity of the file system, many new file systems running in the user mode have emerged. A common file system in the industry can be a user-mode file system implemented based on the Filesystem in User Space (abbreviated as FUSE). Among them, FUSE is a software interface or software mechanism for a Unix-like computer operating system. Based on the FUSE mechanism, users can implement a user-mode file system based on user permissions.

[0003] In the current user-mode file system, there is a file system and libfuse running in the same process. The following problems exist: when the file system process has an exception or is upgraded, it will trigger the file system process to exit. The exited file system process will make the opened files unavailable, thereby spreading the fault surface from the file system process to the user process, and seriously causing the user process to abort. Summary of the Invention

[0004] Embodiments of the present invention provide a file processing method, a user-mode file system, a device, and a computer program product. When the file system process exits, the FUSE process can cache the file processing request, ensuring the normal operation of the user process.

[0005] In a first aspect, an embodiment of the present invention provides a file processing method, which is applied to a user-mode file system. The user-mode file system includes: a file system process and a user space file system FUSE process communicatively connected to the file system process. The method includes:

[0006] The FUSE process obtains a file processing request;

[0007] The FUSE process caches the file processing request. Among them, the FUSE process includes: a cache request queue for caching file processing requests;

[0008] In the case where the file system process exits, the FUSE process determines the request processing status of the file processing request as a suspended state, so that the file processing link where the FUSE process is located remains in a normal state.

[0009] Second aspect, an embodiment of the present invention provides a user-mode file system, including: a file system process and a user space file system fuse process communicatively connected to the file system process; the fuse process is configured to:

[0010] Obtain a file processing request;

[0011] Cache the file processing request, wherein the fuse process includes: a cache request queue for caching the file processing request;

[0012] In the case where the file system process exits, determine the request processing status of the file processing request as a suspended state, so that the file processing link where the fuse process is located remains in a normal state.

[0013] Third aspect, an embodiment of the present invention provides an electronic device, including: a memory, a processor; wherein, the memory is used to store one or more computer instructions, and when the one or more computer instructions are executed by the processor, the file processing method in the first aspect above is implemented.

[0014] Fourth aspect, an embodiment of the present invention provides a computer storage medium for storing a computer program, and when the computer program is executed by a computer, the file processing method in the first aspect above is implemented.

[0015] Fifth aspect, an embodiment of the present invention provides a computer program product, including: a computer program, when the computer program is executed by a processor of an electronic device, the processor is caused to execute the steps in the file processing method in the first aspect above.

[0016] The file processing method, user-mode file system, device and computer program product provided in this embodiment obtain a file processing request through the fuse process in the user-mode file system. In the case where the file system process exits, the fuse process caches the file processing request. And, since the fuse process includes a cache request queue for caching the file processing request, in the case where the file system process exits, the fuse process can still normally receive and store the file processing request; and the request processing status of the file processing request can be determined as a suspended state until the file system process returns to a normal state, so as to avoid spreading the fault surface from the file system process to the user process, and enable the user process to maintain a normal processing state, thereby improving the good experience of applying the user-mode file system and further ensuring the practicability of this method. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or in the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.

[0018] Figure 1 It is a schematic diagram of the principle of a file processing method provided in the related art;

[0019] Figure 2 It is a schematic diagram of the scenario of a file processing method provided in an embodiment of the present invention;

[0020] Figure 3 It is a schematic flowchart of a file processing method provided in an embodiment of the present invention;

[0021] Figure 4 It is a schematic flowchart of another file processing method provided in an embodiment of the present invention;

[0022] Figure 5 It is a schematic flowchart of yet another file processing method provided in an embodiment of the present invention;

[0023] Figure 6 It is a schematic diagram of the principle of the solution method for improving the availability of the fuse user-mode file system restart scenario provided in an application embodiment of the present invention Figure 1 ;

[0024] Figure 7 It is a schematic diagram of the principle of the solution method for improving the availability of the fuse user-mode file system restart scenario provided in an application embodiment of the present invention Figure 2 ;

[0025] Figure 8 It is a schematic diagram of the interaction between the fuse process and the file system process provided in an application embodiment of the present invention;

[0026] Figure 9 It is a schematic diagram of the structure of a user-mode file system provided in an embodiment of the present invention;

[0027] Figure 10 For Figure 9 It is a schematic diagram of the structure of an electronic device corresponding to the user-mode file system provided in the embodiment shown; Detailed implementation manners

[0028] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0029] The terms used in the embodiments of the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include the plural forms unless the context clearly dictates otherwise. "Multiple" generally includes at least two, but does not exclude the case of including at least one.

[0030] It should be understood that the term "and / or" used herein is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " herein generally indicates that the associated objects before and after are in an "or" relationship.

[0031] Depending on the context, the words "if" and "when" as used herein may be interpreted as "when" or "when...", or "in response to determining" or "in response to detecting". Similarly, depending on the context, the phrase "if determined" or "if detecting (stated condition or event)" may be interpreted as "when determined" or "in response to determining", or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)".

[0032] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a commodity or system including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such commodity or system. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the commodity or system including the said element.

[0033] In addition, the sequence of steps in the following method embodiments is only an example and not strictly limited.

[0034] Term Definition:

[0035] User Space File System: File System in Userspace, abbreviated as FUSE, implements a communication mechanism that enables users to implement a user-space file system based on user permissions for communication operations between the kernel space and the user space.

[0036] libfuse: The user-space library of the FUSE file system, which provides a set of functions and tools for developing and implementing FUSE-based file systems.

[0037] File Descriptor: Abbreviated as fd, it is a non-negative integer used to identify references to open files or I / O devices.

[0038] User-space File System: Refers to a file system that runs in the user space and is isolated from the kernel space. It allows users to implement their own file systems without modifying the kernel code, without having to worry about issues such as system crashes or inability to boot due to incorrect changes.

[0039] Restart of User-space File System: Restart of the file system process, for example, the process is killed or restarted due to a segmentation fault.

[0040] Upgrade User-space File System: Upgrade the user-space file system binary to a new version.

[0041] In order to understand the specific implementation process of the technical solution in this embodiment, the related technologies will be briefly described below:

[0042] With the continuous growth of the complexity of file systems, many new file systems running in the user space have emerged. Common file systems in the industry can be user-space file systems implemented based on the File System in User Space (abbreviated as FUSE). Among them, FUSE is a software interface or software mechanism for Unix-like computer operating systems. Based on the FUSE mechanism, users can implement user-space file systems based on user permissions.

[0043] Currently, the three common file systems (for example, CephFS, JuiceFS, GlusterFS) are all user-space file systems based on FUSE. The file system kernels of the above systems and libfuse are both in the same user-space process, as Figure 1As shown, the file system process runs in user mode and relies on the libfuse library. That is, the file system process and the libfuse library are located in the same process. After the file system process is started, it is mounted to the mount point / mnt / fs through the libfuse library. Taking the application scenario of opening a file as an example, the user process can perform file access operations according to the following steps:

[0044] 1) The user process initiates a file open request to the mount point; 2) The mount point sends the file open request to the kernel-state fuse module; 3) The file system process obtains the file open request through the libfuse library, that is, reads the file open request from the kernel state to the user state; 4) The file system process processes the file open request, opens the file in the file system process, and obtains the request processing result (including: the result of successful file opening and the result of failed file opening); 5) The processing result is returned to the kernel-state fuse module; 6) The kernel-state fuse module returns the request processing result to the user state; 7) The user process receives the fd of the open file. Next, the user process can read and write the opened file through the fd.

[0045] However, since the file system process and libfuse run in the same process, the above access operation has the following disadvantages:

[0046] (1) After the file system process exits abnormally (for example, restart or upgrade), the file fd of the processed file is unavailable and the mount point is unavailable.

[0047] Specifically, after the file system process exits abnormally, the kernel-mode fuse module will invalidate the old mount point, causing the file fd of the processed file to be unavailable. At this time, it will return the EBADF error used to indicate that the file descriptor is invalid or illegal; even if the file system process is restarted and recovered in a very short time, the user process still occupies the old mount point, causing the file system process after the restart to return the EBUSY error used to indicate that it is occupied and cannot be operated.

[0048] (2) Upgrading the file system requires restarting the file system process, which affects the user process.

[0049] When the file system version needs to be upgraded, in order to apply the binary data of the new version, the file system process needs to be restarted. Specifically, the umount command can be used to unbind the mount point from the old channel. When the user process occupies the mount point, if there are files being processed in the old channel, the unbinding operation of the umount command fails, and an EBUSY error is returned. If the process is forced to restart without waiting for umount to succeed, the first disadvantage (1) will be triggered, which will also affect the user process.

[0050] Generally speaking, for a user-mode file system, when an exception occurs in the file system process or the file system process exits due to a version upgrade, since the mount point will become invalid, the already opened files will also become unavailable. Even if the file system process is restarted immediately, the fault surface will spread to the user process, and in severe cases, it will cause the user process to abort.

[0051] In order to reduce the impact on the user process, this embodiment provides a file processing method, a user-mode file system, a device, and a computer program product. Referring to the appendix Figure 2 As shown, the execution subject of the file processing method provided in this embodiment can be a file processing device. It should be noted that the file processing device can be implemented as a user-mode file system, a personal computer, a tablet computer, a local server, or a cloud server. At this time, when the file processing device is implemented as a cloud server, the file processing method can be executed in the cloud. In the cloud, several computing nodes (cloud servers) can be deployed, and each computing node has processing resources such as computing and storage. In the cloud, multiple computing nodes can be organized to provide a certain service. Of course, a single computing node can also provide one or more services. The way the cloud provides the service can be to provide an external service interface, and the user calls the service interface to use the corresponding service. The service interface includes forms such as a Software Development Kit (SDK) and an Application Programming Interface (API).

[0052] The file processing device is communicatively connected to the client. Here, the client is used for the user to run applications so as to enable file processing operations. The above-mentioned client can be any computing device with certain data transmission capabilities. Specifically, in implementation, the client can be a mobile phone, a personal computer (PC), a tablet computer, a set application program, etc. In addition, the basic structure of the client can include: at least one processor. The number of processors depends on the configuration and type of the client. The client can also include a memory, which can be volatile, such as a random access memory (Random Access Memory, abbreviated as RAM), or non-volatile, such as a read-only memory (Read-Only Memory, abbreviated as ROM), a flash memory, etc., or can also include both types at the same time. Usually, an operating system (Operating System, abbreviated as OS), one or more application programs, and program data, etc. are stored in the memory. In addition to the processing unit and the memory, the client also includes some basic configurations, such as a network card chip, an IO bus, a display component, and some peripheral devices, etc. Optionally, some peripheral devices can include, for example, a keyboard, a mouse, a stylus, a printer, etc. Other peripheral devices are well-known in the art and will not be elaborated here.

[0053] The file processing device refers to a device that can provide file processing operations in a network virtual environment, usually referring to a device that uses a network for information planning and file processing operations. Physically, the file processing device can be any device that can provide computing services, respond to file processing requests, and perform file processing operations based on file processing requests. For example, it can be a cluster server, a conventional server, a cloud server, a cloud host, a virtual center, etc. The composition of the file processing device mainly includes a processor, a hard disk, a memory, a system bus, etc., which is similar to a general computer architecture.

[0054] In the above-mentioned embodiment of the present application, the client is network-connected to the file processing device, and this network connection can be a wireless or wired network connection. If the client can be communicatively connected to the file processing device, the network mode of this mobile network can be any one of 2G (GSM), 2.5G (GPRS), 3G (WCDMA, TD-SCDMA, CDMA2000, UTMS), 4G (LTE), 4G+ (LTE+), WiMax, 5G, 6G, etc.

[0055] In the embodiment of the present application, the client is used to generate or obtain a file processing request. Specifically, the client can display a human-computer interaction interface, obtain the execution operation input by the user in the human-computer interaction interface, generate or obtain a file processing request based on the execution operation, and in order to enable file processing operations, send the file processing request to the file processing device.

[0056] The file processing device can be implemented as a user-mode file system. That is, the file processing method can be applied to the user-mode file system, which can include a file system process and a user space file system fuse process communicatively connected to the file system process. When the client sends a file processing request to the file processing device, the fuse process in the file processing device can obtain the file processing request. In the case where the file system process exits, since the fuse process is still in a normal running state, the fuse process caches the file processing request. Specifically, the fuse process includes a cache request queue for caching the file processing request, and thus the file processing request can be cached in the above-mentioned cache request queue, so that the file processing link where the fuse process is located remains in a normal state. Thus, it is effectively realized that in the case where the file system process exits, the fuse process can still normally receive the file processing request; and the request processing state of the file processing request can be determined as a suspended state until the file system process resumes normal state, which effectively avoids the spread of the fault surface from the file system process to the user process, ensures a good experience in applying the user-mode file system, and further improves the practicability of the method.

[0057] The following will describe in detail some embodiments of the present invention with reference to the accompanying drawings. Without conflict between the embodiments, the following embodiments and the features in the embodiments can be combined with each other. In addition, the step sequence in the following method embodiments is only an example and is not strictly limited.

[0058] Figure 3 It is a schematic flowchart of a file processing method provided by an embodiment of the present invention; refer to the attached Figure 3 As shown, this embodiment provides a file processing method. The execution subject of this method can be a file processing device. It can be understood that the file processing device can be implemented as software, or a combination of software and hardware. Specifically, when the file processing device is implemented as hardware, it can specifically be various electronic devices capable of implementing file processing operations, including but not limited to tablet computers, personal computers PC, servers, user-mode file systems, etc. When the file processing device is implemented as a user-mode file system, it means that this file processing method can be applied to the user-mode file system, where the user-mode file system can include a file system process and a user space file system fuse process communicatively connected to the file system process; when the file processing device is implemented as software, it can be installed in the above-mentioned exemplified electronic devices. Based on the above file processing device, the file processing method in this embodiment can include the following steps:

[0059] Step S301: The fuse process obtains the file processing request.

[0060] Step S302: The fuse process caches the file processing request. Among them, the fuse process includes a cache request queue for caching the file processing request.

[0061] Step S303: When the file system process exits, the fuse process determines the request processing status of the file processing request as a suspended state, so that the file processing link where the fuse process is located remains in a normal state.

[0062] The specific implementation principles and implementation effects of the above steps are described in detail below:

[0063] Step S301: The fuse process obtains a file processing request.

[0064] When the user has a file processing requirement, in order to be able to implement file processing operations, the fuse process in the user-mode file system can obtain a file processing request. In some instances, the file processing request can be obtained through a human-computer interaction operation. At this time, the fuse process obtaining the file processing request can include: the user-mode file system displays a human-computer interaction interface; obtains the execution operation input by the user in the human-computer interaction interface; based on the execution operation, the fuse process can obtain the file processing request.

[0065] In other instances, the file processing request can not only be obtained through a human-computer interaction operation, but also through a client or a third device. At this time, the user-mode file system further includes a kernel-mode fuse communicatively connected to the fuse process, and the fuse process includes a user space library libfuse for communicatively connecting to the kernel-mode fuse; the fuse process obtaining the file processing request can include: the kernel-mode fuse obtains the file processing request through a mount point; the kernel-mode fuse sends the file processing request to libfuse, so that the fuse process obtains the file processing request through libfuse.

[0066] Among them, the kernel-mode FUSE can obtain the file processing requests sent by the user process through the mount point. Specifically, the mount point is communicatively connected to the user process (corresponding to the above-mentioned client or the third device). The user process is communicatively connected to the mount point. When the user has a file processing requirement, the user process can generate a file processing request and send the file processing request to the mount point. The above-mentioned mount point can be implemented as mnt or fs. After obtaining the file processing request, the mount point can send the file processing request to the kernel-mode FUSE, so that the kernel-mode FUSE can obtain the file processing request through the mount point. In order to enable FUSE to stably obtain the file processing request, the kernel-mode FUSE can send the file processing request to libfuse in the FUSE process, so that the FUSE process obtains the file processing request through libfuse, effectively ensuring the accuracy and reliability of obtaining the file processing request.

[0067] It should be noted that for file processing requests, the types of file processing requests corresponding to different application scenarios are different. For example: in the application scenario of file opening, the obtained file processing request is a file opening request; in the application scenario of file editing, the obtained file processing request is a file editing request; in the application scenario of file deletion, the obtained file processing request can be a file deletion request, etc. Those skilled in the art can flexibly adjust the request type of the file processing request according to the specific application scenario or application requirements.

[0068] Step S302: The FUSE process caches the file processing request. Among them, the FUSE process includes: a cache request queue for caching the file processing request.

[0069] After obtaining the file processing request, to ensure the stable progress of file processing operations, the FUSE process can perform a caching operation on the file processing request. In order to enable the FUSE process to receive and store the file processing request, the FUSE process can include a cache request queue for caching the file processing request, and then send the obtained file processing request to the cache request queue for caching.

[0070] It should be noted that the fuse process can not only include a cache request list for caching file processing requests, but also include: a file information list for caching the file information of processed files, where the file information of processed files at least includes file descriptors. It can be understood that the file information can not only include file descriptors, but also include file metadata corresponding to the processed files. File metadata can refer to the characteristic system data used to describe the processed files, such as: the position of file read and write operations, access permissions, file owners, and the distribution information of file data blocks (inode…), etc.

[0071] Step S303: In the case where the file system process exits, the fuse process determines the request processing status of the file processing request as the suspended state, so as to keep the file processing link where the fuse process is located in a normal state.

[0072] For the file system process in the user-mode file system, it can include two running states. One is the exit state, and the other is the normal running state. In the case where the file system process is in the normal running state, if the fuse process obtains a file processing request, the fuse process can send the file processing request to the file system process for processing to obtain a file processing result corresponding to the file processing request. Then, the file processing result corresponding to the file processing request can be returned to the fuse process, and the fuse process can return the file processing result to the user process through the kernel-mode fuse and the mount point, so that the user process can obtain the file processing result.

[0073] In the case where the file system process exits, it means that the file system process cannot perform normal file processing operations. At this time, in order to avoid affecting the processing operations of the user process or even causing the user process to abort, the fuse process and the file system process can be separately deployed, that is, the fuse process and the file system process are communicatively connected. In this way, even if the file system process exits, the fuse process can still normally receive file processing requests and can cache the obtained file processing requests.

[0074] In the case where the file system process exits, the fuse process generates a restart instruction corresponding to the file system process and can attempt to restart the file system process based on the restart instruction; when the file system process restarts successfully, the fuse process can send the obtained file processing request to the file system process; when the file system process fails to restart, the fuse process can cache the file processing request.

[0075] In addition, when the file system process exits, the file system process at this time cannot directly analyze and process the file processing requests in the request shared memory queue. To avoid a greater impact on the user process, the fuse process can determine the request processing status of the file processing request as a suspended state. That is, when the user has a file processing requirement for a processed file, the request processing status of the file processing request can be determined as a suspended state, and the file processing link where the fuse process is located can be kept in a normal state. For the suspended state of the file processing request, the suspended state of the file processing request can be adjusted according to the state of the file system process. For example, when the file system process resumes the normal state, the suspended state of the file processing request can be lifted, and so on.

[0076] In addition, for the file system process and the fuse process, the communication connection method between the file system process and the fuse process is not limited in this embodiment. In some instances, the file system process and the fuse process can be communicatively connected through a memory queue, a network communication channel, or a pipe. Taking the communication connection between the file system process and the fuse process through a memory queue as an example, at this time, the file system process and the fuse process can be communicatively connected through a request shared memory queue. In this way, after the fuse process obtains a file processing request, the file processing request can be sent to the request shared memory queue. At this time, the method in this embodiment can include: the fuse process sends the file processing request to the request shared memory queue.

[0077] The file processing method provided in this embodiment obtains a file processing request through the fuse process in the user-mode file system. When the file system process exits, the fuse process caches the file processing request. Moreover, since the fuse process includes a cached request queue for caching file processing requests, when the file system process exits, the fuse process can still normally receive and store file processing requests; and the request processing status of the file processing request can be determined as a suspended state, so that the file processing link formed by the fuse process and the user process can be kept in a normal state. In this way, it is possible to prevent the fault surface from spreading from the file system process to the user process, and further enable the user process to maintain a normal processing state. This not only ensures a good experience in applying the user-mode file system, but also further ensures the practicality of this method.

[0078] Figure 4 It is a flowchart of another file processing method provided by an embodiment of the present invention; on the basis of the above embodiment, refer to the appendix Figure 4As shown, after determining that the request processing status of a file processing request is in a suspended state, the request processing status of the file processing request can be flexibly adjusted based on the system running state. At this time, the method in this embodiment may include:

[0079] Step S401: Obtain the system running state of the file system process.

[0080] Since the file system process can correspond to different system running states. For example, the file system process can be in an exit state, or the file system process can be in a normal running state. And there is an association relationship between the system running state of the file system process and the request processing operation of the file processing request. Therefore, in order to be able to flexibly adjust the request processing status of the file processing request based on the system running state of the file system process, the system running state of the file system process can be obtained. In some instances, the system running state of the file system process can be determined by sending a test signal to the file system process. At this time, obtaining the system running state of the file system process may include: generating a processing signal corresponding to the file system process; sending the processing signal to the file system process; detecting whether feedback information corresponding to the processing signal is received from the file system process within a preset time period; if the feedback information corresponding to the processing signal is received from the file system process within the preset time period, it is determined that the file system process is in a startup state or a resumed startup state; if the feedback information corresponding to the processing signal is not received from the file system process within the preset time period, it is determined that the file system process is in an exit state or an abnormal state, thus effectively ensuring the stability and reliability of obtaining the system running state of the file system process.

[0081] In other instances, the system running state can not only be determined by sending a test signal to the file system process, but also be determined based on a preset status identifier of the file system process. At this time, obtaining the system running state of the file system process may include: obtaining the preset status identifier corresponding to the file system process; when the preset status identifier is a preset first status identifier, it is determined that the file system process is in a normal running state; when the preset status identifier is a preset second status identifier, it is determined that the file system process is in an exit state or an abnormal state, which also effectively ensures the stability and reliability of obtaining the system running state of the file system process.

[0082] Step S402: Adjust the request processing status of the file processing request based on the system running state.

[0083] Since there is a correlation between the system operation status of the file system process and the request processing status of the file processing request, after obtaining the system operation status of the file system process, the request processing status of the file processing request can be adjusted based on the system operation status. At this time, adjusting the request processing status of the file processing request based on the system operation status may include: when the system operation status is used to identify the file system process as being in the exit state, that is, the file system process at this time is still unable to perform normal file processing operations, then controlling the file processing request to remain in a suspended state; when the system operation status is used to identify the file system process as being in a normal state, that is, the file system process at this time can perform normal file processing operations, and then controlling the file processing request to release the suspended state.

[0084] It should be noted that not only can the request processing status of the file processing request be adjusted based on the preset mapping relationship and the system operating status, but the system operating status and the request processing status of the file processing request can also be adjusted based on a pre-trained machine learning model. As long as the request processing status of the file processing request can be flexibly adjusted in a timely and effective manner based on the system operating status, we will not go into details here.

[0085] In this embodiment, by obtaining the system operation status of the file system process and then timely and effectively adjusting the request processing status of the file processing request based on the system operation status, not only can the request processing status of the file processing request be accurately expressed, but it is also beneficial to improve the quality and efficiency of analyzing and processing the file processing request.

[0086] Figure 5 A flowchart of another file processing method provided by an embodiment of the present invention; based on the above embodiment, refer to the attached Figure 5 As shown, in this embodiment, the file system process and the fuse process can communicate with each other not only through the request shared memory queue, but also through the response shared memory queue. At this time, when the file system process resumes operation, the file processing operation can be implemented through the request shared memory queue and the response shared memory queue. Specifically, the method in this embodiment may include:

[0087] Step S501: when the file system process resumes running, unprocessed file processing requests are determined through the request shared memory queue, the response shared memory queue and the cache request queue.

[0088] When the file system process resumes operation, it indicates that the file system process can perform normal file processing operations. Since the cache request queue in the fuse process includes processed file processing requests and unprocessed file processing requests, there is no need to perform file processing operations on the processed file processing requests again, while for the unprocessed file processing requests, file processing operations need to be continued. In order to improve the quality and efficiency of file processing operations, the unprocessed file processing requests can be determined first. Specifically, during the period when the file system process exits, the fuse process can continuously receive file processing requests sent by the user process through the mount point and the kernel-mode fuse. After the fuse process obtains the above file processing requests, it can not only cache the above file processing requests in the cache request queue but also send the above file processing requests to the request shared memory queue for storage.

[0089] Since file processing requests are related to the request shared memory queue, the response shared memory queue, and the cache request queue, in order to accurately determine unprocessed file processing requests, the request shared memory queue, the response shared memory queue, and the cache request queue can be analyzed and processed. In some instances, unprocessed file processing requests can be determined by analyzing and processing the request shared memory queue, the response shared memory queue, and the cache request queue through a pre-trained machine learning model. At this time, determining unprocessed file processing requests through the request shared memory queue, the response shared memory queue, and the cache request queue can include: obtaining a pre-trained machine learning model, inputting the request shared memory queue, the response shared memory queue, and the cache request queue into the machine learning model, and obtaining the unprocessed file processing requests output by the machine learning model.

[0090] In other instances, unprocessed file processing requests can not only be determined through a pre-trained machine learning model but also be determined by analyzing and processing the request shared memory queue, the response shared memory queue, and the cache request queue. At this time, determining unprocessed file processing requests through the request shared memory queue, the response shared memory queue, and the cache request queue can include: obtaining the first request list corresponding to the request shared memory queue, the response information list corresponding to the response shared memory queue, and the second request list corresponding to the cache request list; obtaining the total request list based on the first request list and the second request list; and determining the unprocessed file processing requests based on the total request list and the response information list.

[0091] Since the requests in the request shared memory queue are sent by the fuse process, the file processing requests obtained by the fuse process can be cached in the cached request list. Therefore, for the requests included in the request shared memory queue and the requests included in the cached request queue, the following two situations are likely to occur: Situation 1, the requests included in the cached request queue are the same as the requests included in the request shared memory queue; Situation 2, the requests included in the request shared memory queue are a subset of the requests included in the cached request queue. Therefore, in order to accurately determine the unprocessed file processing requests, the first request list corresponding to the request shared memory queue, the response information list corresponding to the response shared memory queue, and the second request list corresponding to the cached request list can be obtained.

[0092] Since both the first request list and the second request list store file processing requests, and the response information list stores the response information corresponding to the processed requests, in order to accurately determine the unprocessed file processing requests, the first request list and the second request list can be analyzed and processed, so that the total request list can be obtained. Specifically, when the first request list and the second request list are the same, the total request list can be the first request list or the second request list; when the first request list and the second request list are different, the total request list can be the union of the first request list and the second request list.

[0093] After obtaining the total request list, since the total request list may include processed text processing requests and unprocessed text processing requests, and the response information list includes the response information corresponding to the processed file processing requests, after obtaining the total request list and the response information list, the total request list and the response information list can be processed. In some instances, a pre-trained machine learning model can be used to process the total request list and the response information list, so as to determine the unprocessed file processing requests.

[0094] In other instances, not only can the unprocessed file processing requests be determined by a pre-trained machine learning model, but the total request list and the response information list can also be directly analyzed and processed to determine the unprocessed file processing requests. At this time, based on the total request list and the response information list, determining the unprocessed file processing requests can include: identifying whether there is response information corresponding to the requests in the total request list in the response information list; if so, determining that the file processing requests in the total request list are processed file processing requests; if not, determining that the file processing requests in the total request list are unprocessed file processing requests.

[0095] For example, when request 1, request 2, request 3, request 4, and request 5 are included in the total request list, and response information 2 corresponding to request 2 and response information 4 corresponding to request 4 are included in the response information list, by comparing the total request list and the response information list, it can be seen that there is no response information corresponding to request 1, request 3, and request 5 in the response information list. Furthermore, it can be determined that the above-mentioned request 1, request 3, and request 5 are unprocessed file processing requests; there is response information 2 corresponding to request 2 and response information 4 corresponding to request 4 in the response information list. Furthermore, it can be determined that the above-mentioned request 2 and request 4 are processed file processing requests. In this way, the accurate determination operation of unprocessed file processing requests is effectively achieved.

[0096] In addition, in order to improve the practicability of this method, the fuse process further includes a file information list for caching the file information of processed files. The file information at least includes a file descriptor. At this time, before determining unprocessed file processing requests through the request shared memory queue, the response shared memory queue, and the cache request queue, the file system process in this embodiment can perform file recovery operations based on the fuse process. Specifically, the method in this embodiment can further include: the file system process obtains the file metadata of the processed file through the file information list in the fuse process; the file system process performs file recovery operations based on the file metadata and the file descriptor of the processed file to obtain and store the processed file.

[0097] Among them, the fuse process stores a file information list, and the file information list includes the file metadata of the processed file. In order to implement file recovery operations, when the file system process returns to the normal state, the file metadata and the file descriptor fd of the processed file can be obtained through the file information list in the fuse process. The file metadata can include characteristic system data for describing the processed file, such as: access permissions, file owners, and distribution information of file data blocks (inode…), etc.

[0098] When the file system process returns to the normal state, in order to stably implement file processing operations, the file system process can obtain the file metadata and the file descriptor fd of the processed file through the file information list in the fuse process. After obtaining the file metadata and the file descriptor fd of the processed file, the file system process can perform file recovery operations based on the file metadata and the file descriptor fd of the processed file, so as to obtain the processed file and store the processed file. In this way, the file recovery operation is effectively achieved, and then corresponding processing operations can be performed based on the restored file.

[0099] Step S502: The fuse process sends the unprocessed file processing requests to the file system process to implement file processing operations.

[0100] To implement file processing operations, after determining the unprocessed file processing requests, the fuse process can send the unprocessed file processing requests to the file system process. After the file system process obtains the unprocessed file processing requests, it can perform corresponding file processing operations based on the unprocessed file processing requests, thereby obtaining file processing results corresponding to the file processing requests, effectively improving the practicality of this method.

[0101] In this embodiment, when the file system process resumes operation, the unprocessed file processing requests are determined through the request shared memory queue, the response shared memory queue, and the cache request queue. Then, the fuse process sends the unprocessed file processing requests to the file system process to implement file processing operations, effectively improving the practicality of this method.

[0102] In specific applications, taking the file open request as an example of the file processing request, as shown in the appendix Figure 6 This application embodiment provides a user-mode file system. The user-mode file system can include a fuse process and a file system process. The fuse process and the file system process communicate through a request shared queue and a response shared queue. Specifically, the fuse process, the file system process, the request shared queue, and the response shared queue in this embodiment can be used to implement the following functions:

[0103] Among them, the fuse process can include the libfuse library, a cache request queue for caching file open requests, and a file information list for caching file information. Specifically, the fuse process is used to manage the mount point and the fuse context. The above-mentioned fuse context can refer to the attribute information related to the fuse channel, which can be stored in the libfuse library. Since the processing logic of the fuse process is relatively simple and stable, the fuse process rarely fails. In practical applications, the libfuse library has not failed in operation for one year, effectively ensuring the stable reliability of the user-mode file system.

[0104] The file system process is used to manage file system data and metadata. The management logic corresponding to the file system process is relatively complex and is more likely to fail than the fuse process.

[0105] The request sharing queue is used to store the file open requests sent by the fuse process, and the file open requests can be stored in the request sharing queue. The request sharing queue is a ring buffer structure. Specifically, the fuse process submits requests to the queue as a producer, and the file system process consumes requests from the queue as a consumer.

[0106] The response shared queue is used to store request response information. The response shared queue is also a ring buffer structure. Specifically, the file system process submits replies to it as a producer, and the fuse process consumes replies from the queue as a consumer.

[0107] Based on the above user-mode file system, when the file system process is operating normally, the file processing process may include the following steps:

[0108] Step 1: The user process initiates a file open request for the mount point.

[0109] Step 2: The mount point sends the file open request to the kernel-mode fuse module and caches it in the kernel-mode request queue.

[0110] Step 3: The kernel-mode fuse module can send the file open request to the fuse process through the libfuse library.

[0111] The fuse process includes libfuse, a cache request list, and a file information list. After the fuse process receives a file open request, it can cache the file open request in the cache request list. The file information list stores the file metadata of the opened file and is used to implement file recovery operations. After the kernel-mode fuse module sends the file open request to the fuse process, the fuse process can stably obtain the file open request through the libfuse library.

[0112] Step 4: After the fuse process obtains the file open request, the file open request may be added to the request shared memory queue to wake up the file system process.

[0113] Among them, the fuse process and the file system process can be connected through the request shared memory queue and the response shared memory queue. After the fuse process obtains the file open request, the file open request can be added to the request shared memory queue to wake up the file system process. Specifically, the preset parameters in the inter-process communication mechanism (for example, semaphores) can be used to wake up the file system process.

[0114] Step 5: The file system process reads the file open request from the request shared memory queue.

[0115] Step 6: The file system process processes the file open request to perform the corresponding file open operation in the file system process.

[0116] Step 7: The file system process obtains the file open result, and then can write the file open result into the response shared memory queue to wake up the fuse process.

[0117] Step 8: The fuse process reads the request processing result from the response shared memory queue and stores the file open information in the file information list.

[0118] Step 9: The fuse process sends the file open result to the kernel-mode fuse module.

[0119] Step 10: The kernel-mode fuse module returns the request processing result to the user process.

[0120] Step 11: The user process obtains the file descriptor fd of the opened file. Next, the user process can perform read and write operations on the opened file through fd.

[0121] In the case where the file system process exits and then the file system process resumes normal operation, as shown in the appendix Figure 7 The file processing flow may include the following steps:

[0122] Step 21: For the file information that the user process has opened at a historical moment, it remains in the file information list in the fuse process.

[0123] Step 22: When the user process newly initiates a file open request, after the fuse process obtains the newly initiated file open request, it can cache the file open request in the cache request list and send the file open request to the request shared memory queue for storage, but these newly initiated file open requests are not consumed.

[0124] Step 23: During the period from when the file system process restarts to when it completes recovery, for the user process, the issued file open requests are in a suspended state, that is, the issued file open requests cannot get a response at this time.

[0125] In summary, whether the file system process exits normally or abnormally, this will not affect the user process due to the exit of the file system process. That is, the file fd of the opened file will not become invalid, and the newly initiated file open requests will be suspended until the file system process restarts and completes recovery, and the file open requests are released from the hang state. This can reduce the impact time on the user process to the second level. As shown in the appendix Figure 8 The process of the fuse process and the restarted file system process for recovering and processing file open requests may include the following steps:

[0126] Step 31: When the fuse process detects that the file system process has exited, it restarts the file system process.

[0127] Step 32: When the file system process has been successfully restarted, a prompt message indicating the successful restart of the file system process can be sent to the fuse process.

[0128] Step 33: The fuse process restores the unprocessed requests based on the included cache request queue and the two shared memory queues (request shared memory queue, response shared memory queue) with the file system process.

[0129] Step 34: The processed files of the previous life cycle are restored according to the metadata and fd information included in the file system list in the fuse process.

[0130] Step 35: When the cultural system process has successfully restored the processed files of the previous life cycle, a prompt message indicating the successful file restoration can be sent to the fuse process.

[0131] Step 36: After receiving the prompt message, the fuse process can send the unprocessed file open requests to the file system process.

[0132] Step 37: The file system process performs corresponding file processing operations on the unprocessed file open requests, obtains the file open results, and returns the file open results to the fuse process.

[0133] Step 38: The file open results are returned to the kernel-mode fuse module so that the user process can obtain the file open results.

[0134] This application embodiment implements a solution for separately deploying the libfuse library and the file system process. This can reduce the impact on the user process in scenarios where the file system process exits abnormally, is upgraded, or restarted. Moreover, for processed files, it does not affect the user process's file open operations, thus effectively improving the usability of this user-mode file system. Additionally, when the file system process has completed recovery, the file processing requests of the user process are released from the suspended state, so that the user process is not aborted due to the restart of the file system process, effectively enabling the fuse process to still be able to normally receive file processing requests when the file system process exits. This can prevent the fault surface from spreading from the file system process to the user process, enabling the user process to maintain a normal processing state, thereby improving the good experience of applying the user-mode file system and further enhancing the practicality of this solution.

[0135] Figure 9A schematic diagram of the structure of a user-mode file system provided by an embodiment of the present invention; Figure 9 As shown, this embodiment provides a user-mode file system, which can be used to execute the above Figure 3 In the file processing method shown, the user-mode file system may include: a file system process 11 and a user-space file system fuse process 12 in communication with the file system process 11; the fuse process 12 is used to:

[0136] Get file processing request;

[0137] Cache the file processing request, wherein the fuse process 12 includes: a cache request queue for caching the file processing request;

[0138] When the file system process 11 exits, the request processing state of the file processing request is determined to be a suspended state, so that the file processing link where the fuse process is located remains in a normal state.

[0139] In some instances, the user-state file system also includes: a kernel-state fuse 13 that is communicatively connected to the fuse process 12, and the fuse process 12 includes a user-space library libfuse for communicating with the kernel-state fuse 13; the kernel-state fuse 13 in this embodiment is used to perform the following steps: obtain a file processing request through a mount point; and send the file processing request to libfuse, so that the fuse process 12 obtains the file processing request through libfuse.

[0140] In some instances, the file system process 11 and the fuse process 12 are communicated via a request shared memory queue. In this embodiment, the fuse process 12 is configured to perform the following steps: sending a file processing request to the request shared memory queue.

[0141] In some instances, after the request processing state of the file processing request is determined to be a suspended state, the fuse process 12 in this embodiment is used to perform the following steps: obtaining the system operation state of the file system process; and adjusting the request processing state of the file processing request based on the system operation state.

[0142] In some instances, when the fuse process 12 adjusts the request processing status of a file processing request based on the system operation status, the fuse process 12 is used to perform the following steps: when the system operation status is used to identify the file system process as an exit state, the file processing request is controlled to remain in a suspended state; when the system operation status is used to identify the file system process as a normal state, the file processing request is controlled to be released from the suspended state.

[0143] In some instances, there is also a communication connection between the file system process 11 and the fuse process 12 through a response shared memory queue; the fuse process 12 in this embodiment is used to perform the following steps: in the case where the file system process resumes operation, determine unprocessed file processing requests through a request shared memory queue, a response shared memory queue, and a cache request queue; send the unprocessed file processing requests to the file system process to implement file processing operations.

[0144] In some instances, the fuse process further includes a file information list for caching file information of processed files, and the file information at least includes a file descriptor; before determining unprocessed file processing requests through a request shared memory queue, a response shared memory queue, and a cache request queue, the file system process 11 in this embodiment is used to perform the following steps: obtain file metadata of processed files through the file information list in the fuse process; perform a file recovery operation based on the file metadata and file descriptor of the processed files, and obtain and store the processed files.

[0145] In some instances, when the fuse process 12 determines unprocessed file processing requests through a request shared memory queue, a response shared memory queue, and a cache request queue, the fuse process 12 is used to perform the following steps: obtain a first request list corresponding to the request shared memory queue, a response information list corresponding to the response shared memory queue, and a second request list corresponding to the cache request list; obtain a total request list based on the first request list and the second request list; determine unprocessed file processing requests based on the total request list and the response information list.

[0146] In some instances, when the fuse process 12 determines unprocessed file processing requests based on the total request list and the response information list, the fuse process 12 is used to perform the following steps: identify whether there is response information corresponding to the requests in the total request list in the response information list; if so, determine that the file processing requests in the total request list are processed file processing requests; if not, determine that the file processing requests in the total request list are unprocessed file processing requests.

[0147] Figure 9 The user-mode file system shown can execute Figures 2 - 8 the method of the embodiment shown. For parts not described in detail in this embodiment, reference can be made to the relevant descriptions of Figures 2 - 8 the embodiment shown. The execution process and technical effects of this technical solution are referred to the descriptions in Figures 2 - 8 the embodiment shown and will not be elaborated here.

[0148] In a possible design, Figure 9The structure of the user-mode file system shown can be implemented as an electronic device. The user-mode file system includes: a file system process and a user space file system FUSE process communicatively connected to the file system process. As Figure 10 shown, the electronic device may include: a first processor 21 and a first memory 22. Among them, the first memory 22 is used to store a program for the corresponding electronic device to execute the file processing method provided in the above Figure 2 shown embodiment. The first processor 21 is configured to execute the program stored in the first memory 22.

[0149] The program includes one or more computer instructions. Among them, when the one or more computer instructions are executed by the first processor 21, the following steps can be implemented: the FUSE process obtains a file processing request; the FUSE process caches the file processing request. Among them, the FUSE process includes: a cache request queue for caching the file processing request; in the case where the file system process exits, the FUSE process determines the request processing status of the file processing request as a suspended state, so as to keep the file processing link where the FUSE process is located in a normal state.

[0150] Further, the first processor 21 is also used to execute all or part of the steps in the foregoing Figures 2 - 8 shown embodiment.

[0151] Among them, the structure of the electronic device may further include a first communication interface 23 for the electronic device to communicate with other devices or communication networks.

[0152] In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions used by an electronic device, which includes a program involved in executing the file processing method in the above Figures 2 - 8 shown embodiment.

[0153] In addition, an embodiment of the present invention provides a computer program product, including: a computer-readable storage medium storing computer instructions, when the computer instructions are executed by one or more processors, causing the one or more processors to execute the steps in the file processing method in the above Figures 2 - 8 shown method embodiment.

[0154] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.

[0155] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of adding a necessary general hardware platform. Of course, it can also be implemented by the combination of hardware and software. Based on such an understanding, the above technical solutions, in essence, or the part that contributes to the prior art can be embodied in the form of a computer product. The present invention can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) that contain computer-usable program code.

[0156] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable devices generate means for implementing the functions specified in one Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0157] These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable devices to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured product including instruction means, and the instruction means implements the functions specified in one Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0158] These computer program instructions can also be loaded onto a computer or other programmable devices, so that a series of operation steps are executed on the computer or other programmable devices to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable devices provide steps for implementing the functions specified in one Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0159] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and a memory. The memory may include non-permanent memory in a computer-readable medium, forms such as random access memory (RAM) and non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.

[0160] A computer-readable medium includes permanent and non-permanent, removable and non-removable media that can implement information storage by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible by a computing device. As defined herein, a computer-readable medium does not include transitory computer-readable media, such as modulated data signals and carrier waves.

[0161] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A file processing method, characterized in that: Applied to a user-mode file system, the user-mode file system includes: a file system process and a user-space file system fuse process communicatively connected to the file system process; the method includes: The fuse process obtains a file processing request; The fuse process caches the file processing request, wherein the fuse process includes: a cache request queue for caching the file processing request; When the file system process exits, the fuse process determines the request processing state of the file processing request as a suspended state, so that the file processing link where the fuse process is located remains in a normal state.

2. The method according to claim 1, characterized in that The user-state file system further includes: a kernel-state fuse that is communicatively connected to the fuse process, wherein the fuse process includes a user-space library libfuse for communicating with the kernel-state fuse; and the fuse process obtains a file processing request, including: The kernel state fuse obtains the file processing request through the mount point; The kernel state fuse sends the file processing request to libfuse, so that the fuse process obtains the file processing request through libfuse.

3. The method according to claim 1, characterized in that After determining that the request processing status of the file processing request is a pending state, the method further includes: Obtaining the system running status of the file system process; A request processing status of the file processing request is adjusted based on the system operation status.

4. The method according to claim 3, characterized in that Adjusting the request processing status of the file processing request based on the system operation status includes: When the system operation state is used to identify that the file system process is in an exit state, controlling the file processing request to remain in a suspended state; When the system operation status is used to identify that the file system process is in a normal state, the file processing request is controlled to release the suspension state.

5. The method according to claim 1, characterized in that The file system process and the fuse process are connected in communication by requesting a shared memory queue, and the method further includes: The fuse process sends the file processing request to the request shared memory queue.

6. The method according to claim 5, characterized in that The file system process and the fuse process are further connected in communication via a response shared memory queue; the method further includes: In the case where the file system process is restored and restarted, determining unprocessed file processing requests through the request shared memory queue, the response shared memory queue and the cache request queue; The fuse process sends the unprocessed file processing request to the file system process, so that the file system process performs a file processing operation.

7. The method according to claim 6, characterized in that The fuse process also includes a file information list for caching file information of processed files, wherein the file information includes at least a file descriptor; before determining an unprocessed file processing request through the request shared memory queue, the response shared memory queue, and the cache request queue, the method further includes: The file system process obtains the file metadata of the processed file through the file information list in the fuse process; The file system process performs a file recovery operation based on the file metadata and file descriptor of the processed file, and obtains and stores the processed file.

8. The method according to claim 6, characterized in that Determining unprocessed file processing requests through the request shared memory queue, the response shared memory queue, and the cache request queue includes: Obtaining a first request list corresponding to the request shared memory queue, a response information list corresponding to the response shared memory queue, and a second request list corresponding to the cache request list; Obtaining a total request list based on the first request list and the second request list; Unprocessed file processing requests are determined based on the request list and the response information list.

9. The method according to claim 8, characterized in that Determining unprocessed file processing requests based on the request list and the response information list includes: Identify whether there is response information corresponding to the request in the request list in the response information list; If so, determining that the file processing request in the request list is a processed file processing request; If not, it is determined that the file processing request in the request list is an unprocessed file processing request.

10. A user-mode file system, characterized in that: include: A file system process and a user space file system fuse process in communication with the file system process; The fuse process is used to: Get file processing request; caching the file processing request, wherein the fuse process includes: a cache request queue for caching the file processing request; When the file system process exits, the request processing state of the file processing request is determined to be a suspended state, so that the file processing link where the fuse process is located remains in a normal state.

11. An electronic device, characterized in that: include: A memory, a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the method of any one of claims 1 to 9.

12. A computer program product, characterized in that include: A computer program, when executed by a processor of an electronic device, causes the processor to perform the steps of the method according to any one of claims 1 to 9.