Operation processing method, device and equipment for file system and medium
By creating directory entries in the parent directory within the distributed file system and creating inodes during target operations, the problem of excessive cross-server RPC calls is solved, thus improving operational performance.
Patent Information
- Application Number
- CN202411722071.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2044-11-27
AI Technical Summary
In a distributed file system, when creating a directory or file, dentry and inode are usually stored in different locations, resulting in two RPCs across servers, which affects operational performance.
When creating a directory entry in the parent directory, a message indicating successful creation of the target object is returned. During the target operation, an index node is determined and created, reducing the number of RPCs.
It improves the performance of the file system, reduces the number of RPCs, and enhances the system's processing efficiency.
Smart Images

Figure CN119669157B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of computer, in particular to the technical field of cloud storage, and more particularly to a method and apparatus for processing operations of a file system. BACKGROUND
[0002] Two data structures, directory entry dentry and index node inode, are included in a file system. Dentry records the name and inode of a directory or file. Inode records the specific storage location of a directory or file.
[0003] In a distributed file system, a dentry of a child node is added in a parent directory each time a directory or file is created, and an inode also needs to be allocated. However, since the dentry and inode are usually stored in different locations in the distributed file system, this will result in two RPCs (Remote Procedure Call) across servers each time a file or directory is created, thereby affecting the operation performance of the distributed file system. SUMMARY
[0004] The present disclosure provides a method and apparatus for processing operations of a file system.
[0005] According to an aspect of the present disclosure, a method for processing operations of a file system is provided, comprising:
[0006] In response to a creation request for a target object, determining a parent directory to which the target object belongs in a file system directory tree, wherein the target object comprises a directory or a file;
[0007] Creating a directory entry for the target object in the parent directory, and returning a message to a user layer that the target object is created successfully, wherein the directory entry comprises at least an index node of the parent directory and metadata information of the target object;
[0008] In response to a target operation of changing the target object, judging whether an index node of the target object exists;
[0009] If not, creating the index node of the target object according to the index node of the parent directory and the metadata information.
[0010] According to another aspect of the present disclosure, a device for processing operations of a file system is provided, comprising:
[0011] A parent directory determining module is configured to, in response to a creation request for a target object, determine a parent directory to which the target object belongs in a file system directory tree, wherein the target object comprises a directory or a file;
[0012] a success message returning module, configured to create a directory entry for the target object in the parent directory, and return a message to a user layer that the target object is created successfully, wherein the directory entry at least includes an inode of the parent directory and metadata information of the target object;
[0013] a judging module, configured to judge whether the inode of the target object exists in response to a target operation of changing the target object;
[0014] an inode creating module, configured to create the inode of the target object according to the inode of the parent directory and the metadata information if the judging module determines that the inode of the target object does not exist.
[0015] According to another aspect of the present disclosure, an electronic device is provided, comprising:
[0016] at least one processor; and
[0017] a memory connected to the at least one processor in communication; wherein,
[0018] the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the operation processing method for a file system according to any of the embodiments of the present disclosure.
[0019] According to another aspect of the present disclosure, a non-transitory computer readable storage medium storing computer instructions is provided, the computer instructions being used to enable a computer to perform the operation processing method for a file system according to any of the embodiments of the present disclosure.
[0020] According to another aspect of the present disclosure, a computer program product is provided, comprising computer programs / instructions, which, when executed by a processor, implement the operation processing method for a file system according to any of the embodiments of the present disclosure.
[0021] It should be understood that the content described in this section is not intended to identify key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0022] The accompanying drawings are used to better understand the present scheme, and do not constitute a limitation on the present disclosure. Among them:
[0023] Figure 1 is a schematic diagram of the operation processing method for a file system according to an embodiment of the present disclosure;
[0024] Figure 2 is a schematic diagram of creating an index node in an operation processing method according to an embodiment of the present disclosure;
[0025] Figure 3 is a schematic diagram of deleting a target object in an operation processing method according to an embodiment of the present disclosure;
[0026] Figure 4 is a schematic diagram of an operation processing apparatus for a file system according to an embodiment of the present disclosure;
[0027] Figure 5 is a block diagram of an electronic device for implementing an operation processing method for a file system according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0028] Exemplary embodiments of the present disclosure are described herein with reference to the accompanying drawings, which are included to provide a thorough understanding of embodiments of the present disclosure by a person of ordinary skill in the art, and should be considered as illustrative only. Accordingly, persons of ordinary skill in the art will recognize that there are various changes, modifications and alterations that could be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Also, for the sake of brevity and clarity, any description of function and constructions that is well known to those having ordinary skill in the art is omitted.
[0029] Figure 1 is a flowchart of an operation processing method for a file system according to an embodiment of the present disclosure, which can be applicable to the case of quickly creating a directory or a file in a distributed file system, and relates to the technical field of computers, and particularly to the technical field of cloud storage. The method can be performed by an operation processing apparatus for a file system, which is implemented in software and / or hardware, and is preferably configured in an electronic device, such as a computer device or a server. As shown in the figure, the method specifically includes the following steps. Figure 1
[0030] S101, in response to a creation request for a target object, determining a parent directory to which the target object belongs in a file system directory tree, wherein the target object includes a directory or a file.
[0031] S102, creating a directory entry for the target object in the parent directory, and returning a message to the user layer that the target object is created successfully, wherein the directory entry at least includes an index node of the parent directory and metadata information of the target object.
[0032] S103, in response to a target operation of changing the target object, judging whether an index node of the target object exists.
[0033] S104, if not, creating the index node of the target object according to the index node of the parent directory and the metadata information.
[0034] In a distributed file system, creating a directory or a file usually requires adding a child node directory entry dentry in its parent directory and updating the attributes of the parent directory, such as modification time and the number of child nodes. The parent directory can be determined according to the creation request in the file system directory tree. In addition, an inode structure needs to be created to record the attributes of the created directory or file.
[0035] In the prior art, a message of successful creation is returned to the user after the dentry and inode structures are created. However, the inode and dentry structures are usually stored in different locations. For example, in a distributed file system CFS (Cloud File Storage), the dentry is recorded in a database, and the inode information is recorded in another data management system. Therefore, creating a directory or a file requires two RPCs across servers, which affects the operation performance of the system.
[0036] In the embodiments of the present application, a message of successful creation of the target object is returned to the user layer after the dentry of the target object is created in the parent directory. Therefore, creating a directory or a file requires only one RPC, which improves the efficiency. In addition, the dentry includes the inode of the parent directory and the metadata of the target object, such as the creation time of the file, the user ID, the user group ID, the permission-related information, and the file type.
[0037] In the embodiments of the present application, the creation of the inode is postponed until the client performs a target operation on the target object. For example, the target operation can be writing, setting attributes, establishing a hard link, and creating a subdirectory. In response to the target operation on the target object, it is determined whether the inode of the target object exists. If the inode does not exist, the inode of the target object is created.
[0038] Specifically, in order to ensure the integrity of the file system, when the user performs Lookup (finding the dentry of a specified file), the inode of the parent directory and the metadata of the target object included in the dentry are returned to the client of the user. Then, when the client performs the target operation on the target object, the inode of the parent directory and the metadata of the target object are carried. In this way, when it is determined that the inode of the target object does not exist, it indicates that the user has not used the target object after creating the target object. Therefore, the inode of the target object can be created according to the inode of the parent directory and the metadata of the target object. For example, the target operation and the creation of the inode can be performed simultaneously.
[0039] In one embodiment, the inode and metadata information of the parent directory can be added in the extend_fh field.
[0040] The technical solution of the embodiments of the present disclosure first does not create an inode when creating a directory or a file, but adds the inode of the parent directory and the metadata information of the target object in the created dentry, and then creates the inode according to the inode of the parent directory and the metadata information of the target object when performing other operations such as writing that change the directory or the file, so that the two RPCs originally required in the creation process become one RPC, thereby improving the operation performance.
[0041] Figure 2 is a schematic diagram of creating an inode in the operation processing method according to the embodiments of the present disclosure. The present embodiment is further optimized on the basis of the above-mentioned embodiments. As shown in Figure 2 The method specifically includes the following:
[0042] S201, generating an inode creation request according to the inode of the parent directory and the metadata information.
[0043] S202, packing the request of the target operation and the inode creation request to obtain a request package.
[0044] S203, creating the inode of the target object when performing the target operation according to the request package.
[0045] Specifically, first, the inode creation request is generated according to the inode of the parent directory and the metadata information, then the request of the target operation and the inode creation request are packed to obtain a request package, and then the inode of the target object is created when performing the target operation according to the request package. Since the target operation itself also requires one RPC, the creation of the inode of the target object when performing the target operation can change the two RPCs originally required in the target object creation process into one RPC, thereby improving the operation performance.
[0046] In an implementation manner, when performing the target operation, the inode of the target object can be written into the super block of the file system. For example, when performing, the data to be written corresponding to the target operation and the super block corresponding to the inode to be created are first generated in the memory, and then the data to be written and the super block are written atomically.
[0047] In addition, in an embodiment, the method of the present disclosure further comprises: in response to a deletion operation on the target object, deleting the index node of the target object after a delay set time. The purpose of this is to ensure that the user has the opportunity to perform a recovery operation after mistakenly deleting data, and to ensure the correctness of the file system. Since the super block object (or inode) is not deleted immediately after deleting a file or directory, if the user finds that the super block does not exist when performing a target operation to change the target object, it can be ensured that it has not been created, and thus the super block object can be directly created.
[0048] Specifically, the index node or super block of the target object does not exist, which usually has two possibilities, one is deleted, and the other is not created. In order to ensure the correctness of the asynchronous creation of inode in the present disclosure, it is necessary to ensure that when it is judged that the index node of the target object does not exist, it is because it has not been created, rather than being deleted. Therefore, on the one hand, the deletion operation on the target object is to delete the index node of the target object after a delay set time, and on the other hand, the expiration time of the file handle of the file system is configured to be less than the set time. Since Lookup is usually performed before the open file operation, if the index node is deleted, the inode of the file cannot be obtained. Therefore, it is impossible to receive a write or setattr operation request to change the file or directory after the set time set by the delay of deleting the index node. Then, when such a request is received, if it is judged that the index node does not exist, it can only be because it has not been created. Even if another user deletes this directory or file one second before these operations occur, the inode created in response to these operations will be asynchronously deleted at the set time subsequently.
[0049] Figure 3 is a schematic diagram of deleting a target object in the operation processing method according to the present disclosure. This embodiment is further optimized on the basis of the above-mentioned embodiment. As shown in Figure 3 , the method specifically comprises the following:
[0050] S301, in response to a deletion operation on the target object, adding a deletion mark indicating a deletion timestamp to the name of the target object in the directory entry of the parent directory of the target object.
[0051] S302, adding the name of the target object with the deletion mark and the data location information to the garbage collection station.
[0052] S303, asynchronously deleting according to the load of the file system and the deletion mark through the garbage collection station.
[0053] The deletion operation on the target object is, for example, an unlink operation, indicating deleting a file or deleting a hard link. In the directory entry of the parent directory of the target object, a deletion mark indicating a deletion timestamp is added to the name of the target object, which can be, for example: adding a special symbol, such as ' / ', before the name; or adding a deletion timestamp (nanosecond level) after the name. For example, after the file a is deleted, the name after adding the deletion mark is: ' / a / 1683508977716442953 / a'. The number represents the deletion timestamp. After adding the deletion mark, the attributes of the parent directory are updated, including the modification time and file statistics information.
[0054] Then, the name and data location information of the target object with the deletion mark are added to the garbage collection station GC. For example, the file name of the deleted file and the location information in the metadata pool, and the location information of the deleted object in the data pool.
[0055] In the embodiments of the present disclosure, the target object is not immediately deleted, but is deleted asynchronously by the GC according to the load of the file system and the deletion mark. For example, the GC can be set to delete after three days. In order to avoid the GC causing too large a load on the system, the speed of deletion can be automatically adjusted by the GC according to the real-time load. At the same time, the to-be-deleted targets can be sorted according to the deletion marks of the to-be-deleted targets, and the targets that are added to the GC earlier are preferentially deleted.
[0056] Therefore, by using the above-mentioned idle-time delayed deletion method of directories or files, the embodiments of the present disclosure can further improve the system performance and improve the processing efficiency of the system.
[0057] Figure 4 is a structural schematic diagram of an operation processing apparatus for a file system according to an embodiment of the present disclosure. The present embodiment can be applied to the case of quickly creating a directory or a file in a distributed file system, and relates to the technical field of computers, in particular to the technical field of cloud storage. The apparatus can implement the operation processing method for a file system described in any embodiment of the present disclosure. As shown in Figure 4 The apparatus 40 specifically includes:
[0058] The parent directory determination module 410 is configured to determine a parent directory to which a target object belongs in a file system directory tree in response to a creation request of the target object, wherein the target object includes a directory or a file.
[0059] The success message returning module 420 is configured to create a directory entry for the target object in the parent directory, and return a message that the creation of the target object is successful to a user layer, wherein the directory entry at least includes an index node of the parent directory and metadata information of the target object.
[0060] The judging module 430 is configured to judge whether the index node of the target object exists in response to the target operation of changing the target object.
[0061] The index node creating module 440 is configured to create the index node of the target object according to the index node of the parent directory and the metadata information if the judging module determines that the index node of the target object does not exist.
[0062] Optionally, the index node creating module 440 comprises:
[0063] The request generating unit is configured to generate an index node creating request according to the index node of the parent directory and the metadata information;
[0064] The request packaging unit is configured to package the request of the target operation and the index node creating request to obtain a request package;
[0065] The request package processing unit is configured to create the index node of the target object when the target operation is performed according to the request package.
[0066] Optionally, the request package processing unit is specifically configured to:
[0067] write the index node of the target object into the superblock of the file system when the target operation is performed according to the request package.
[0068] Optionally, the apparatus further comprises an index node deleting module configured to:
[0069] delete the index node of the target object after a delay setting time in response to a deleting operation on the target object.
[0070] Optionally, the apparatus further comprises an object deleting module, and the object deleting module comprises:
[0071] The deleting mark adding unit is configured to add a deleting mark representing a deleting time stamp for the name of the target object in the directory entry of the parent directory of the target object in response to a deleting operation on the target object.
[0072] The garbage collection adding unit is configured to add the name and data location information of the target object with the deleting mark to a garbage collection station.
[0073] The asynchronous deleting unit is configured to perform asynchronous deleting according to the load of the file system and the deleting mark through the garbage collection station.
[0074] Optionally, the request carrying the target operation for changing the target object carries the inode of the parent directory and the metadata information. Optionally, the target operation for changing the target object at least includes:
[0075] writing, setting attributes, establishing a hard link, and creating a subdirectory.
[0076] The product can execute the method provided by any embodiment of the present disclosure, and has the corresponding function modules and beneficial effects of executing the method.
[0077] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved all comply with relevant laws and regulations and do not violate public order and good customs.
[0078] According to the embodiments of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium and a computer program product.
[0079] Figure 5 A schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present disclosure described and / or claimed in this document.
[0080] As shown in Figure 5 The device 500 includes a computing unit 501 that can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. Various programs and data required for the operation of the device 500 can also be stored in the RAM 503. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0081] A number of components in the device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a magnetic disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0082] The computing unit 501 can be various general and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 501 performs various methods and processes described above, such as the operation processing method for file systems. For example, in some embodiments, the operation processing method for file systems can be implemented as a computer software program, which is tangibly embodied in a machine-readable medium, such as the storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded onto the RAM 503 and executed by the computing unit 501, one or more steps of the operation processing method for file systems described above can be performed. Alternatively, in other embodiments, the computing unit 501 can be configured to perform the operation processing method for file systems by other any appropriate means, such as by means of firmware.
[0083] Various implementations of the systems and techniques described above herein can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a complex programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0084] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces the functions / operations specified in the flowcharts and / or block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a standalone software package, or entirely on a remote machine or server.
[0085] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0086] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0087] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), blockchain network, and the Internet.
[0088] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. A server can be a cloud server, also known as cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service. The server can also be a server of a distributed system, or a server combined with a blockchain.
[0089] Artificial intelligence is a discipline that studies enabling computers to simulate some human thinking processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), both hardware and software technologies. Artificial intelligence hardware technology generally includes technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing, etc.; artificial intelligence software technology mainly includes computer vision technology, speech recognition technology, natural language processing technology, machine learning / deep learning technology, big data processing technology, knowledge graph technology, etc.
[0090] Cloud computing refers to accessing elastic and scalable shared physical or virtual resource pools through a network, which can include servers, operating systems, networks, software, applications, and storage devices, etc., and can deploy and manage resources in a self-service manner as needed. Through cloud computing technology, powerful data processing capabilities can be provided for artificial intelligence, blockchain, and other technical applications and model training.
[0091] It should be understood that various forms of flow shown above can be used to reorder, add or delete steps. For example, the steps described in the present disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions provided by the present disclosure can be achieved, and the present disclosure does not limit this.
[0092] The foregoing detailed description has set forth various embodiments of the devices and / or processes via the use of specific terminology. However, embodiments thereof can be practiced with the exact description not being set forth but with the same essence; the principles set forth herein can be practiced with plasticity in a manner leading to structurally equivalent devices and / or processes. Therefore, this description is not to be construed as limiting; the scope of the disclosure is to be measured by the breadth of the following claims.
Claims
1. A method for processing operations of a file system, comprising: determining a parent directory to which a target object belongs in a file system directory tree in response to a creation request of the target object, wherein the target object comprises a directory or a file; creating a directory entry for the target object in the parent directory and returning a message of successful creation of the target object to a user layer, wherein the directory entry at least comprises an inode of the parent directory and metadata information of the target object; judging whether an inode of the target object exists in response to a target operation of changing the target object, wherein the target operation of changing the target object corresponds to a request carrying the inode of the parent directory and the metadata information; generating an inode creation request according to the inode of the parent directory and the metadata information if the inode of the target object does not exist; packing the request of the target operation and the inode creation request to obtain a request package; creating the inode of the target object when the target operation is executed according to the request package.
2. The method of claim 1, wherein, The creating the inode of the target object when the target operation is executed comprises: writing the inode of the target object into a superblock of the file system when the target operation is executed.
3. The method of claim 1, further comprising: deleting the inode of the target object after a delay setting time in response to a deletion operation of the target object.
4. The method of claim 1, further comprising: adding a deletion mark indicating a deletion timestamp to a name of the target object in a directory entry of a parent directory of the target object in response to a deletion operation of the target object; adding the name of the target object with the deletion mark and data location information to a garbage collection station; and asynchronously deleting according to a load of the file system and the deletion mark through the garbage collection station.
5. The method of claim 1, wherein, The target operation of changing the target object at least comprises: writing, setting a property, establishing a hard link, and newly creating a subdirectory.
6. An apparatus for processing operations of a file system, comprising: a parent directory determining module configured to determine a parent directory to which a target object belongs in a file system directory tree in response to a creation request of the target object, wherein the target object comprises a directory or a file; a success message returning module configured to create a directory entry for the target object in the parent directory and return a message of successful creation of the target object to a user layer, wherein the directory entry at least comprises an inode of the parent directory and metadata information of the target object; a judging module configured to judge whether an inode of the target object exists in response to a target operation of changing the target object, wherein the target operation of changing the target object corresponds to a request carrying the inode of the parent directory and the metadata information; an inode creating module configured to create the inode of the target object according to the inode of the parent directory and the metadata information if the judging module determines that the inode of the target object does not exist; the inode creating module comprises: The request generation unit is configured to generate an inode creation request according to the inode of the parent directory and the metadata information. The request packaging unit is configured to package the request of the target operation and the inode creation request to obtain a request package. The request package processing unit is configured to create an inode of the target object according to the request package when performing the target operation.
7. The apparatus of claim 6, wherein, The request package processing unit is specifically configured to: write the inode of the target object into a superblock of the file system according to the request package when performing the target operation.
8. The apparatus of claim 6, further comprising an inode deletion module configured to: in response to a deletion operation on the target object, delete the inode of the target object after a delay setting time.
9. The apparatus of claim 6, further comprising an object deletion module, the object deletion module comprising: a deletion mark adding unit configured to, in response to a deletion operation on the target object, add a deletion mark representing a deletion timestamp for a name of the target object in a directory entry of a parent directory of the target object; a garbage collection adding unit configured to add the name of the target object with the deletion mark and data location information to a garbage collection station; and an asynchronous deletion unit configured to perform asynchronous deletion according to a load of the file system and the deletion mark through the garbage collection station.
10. The apparatus of claim 6, wherein, The target operation of changing the target object at least includes: writing, setting a property, establishing a hard link, and creating a subdirectory.
11. An electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the operation processing method for a file system according to any one of claims 1-5. The computer instructions are used to enable the computer to perform the operation processing method for a file system according to any one of claims 1-5.
12. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, 13. A computer program product comprising computer programs / instructions that, when executed by a processor, implement the operation processing method for a file system according to any one of claims 1-5.
Citation Information
Patent Citations
Method for delaying persistent indexing metadata in flash memory storage system
CN103268291A
Maintenance system and method of branch points of remote directories
CN103761256A