WO2024078029A1 - 文件系统管理方法、装置和存储介质 - Google Patents

文件系统管理方法、装置和存储介质 Download PDF

Info

Publication number
WO2024078029A1
WO2024078029A1 PCT/CN2023/103850 CN2023103850W WO2024078029A1 WO 2024078029 A1 WO2024078029 A1 WO 2024078029A1 CN 2023103850 W CN2023103850 W CN 2023103850W WO 2024078029 A1 WO2024078029 A1 WO 2024078029A1
Authority
WO
WIPO (PCT)
Prior art keywords
file system
data
target
source
target file
Prior art date
Application number
PCT/CN2023/103850
Other languages
English (en)
French (fr)
Inventor
曾红丽
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2024078029A1 publication Critical patent/WO2024078029A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers

Definitions

  • the present application relates to the technical field of file system snapshot grafting, and in particular to a file system management method, device and storage medium.
  • the file system clone feature can meet the requirements of rapid data replication and deployment while protecting the data.
  • the file system clone feature is a replication and data protection technology for the source file system based on snapshots.
  • the clone file system generated by this feature is similar to a file system snapshot, which shares the source data with the source file system and can instantly generate multiple available copies at a certain point in time.
  • clone file systems can be shared with application servers for reading and writing. By splitting and cloning the file system, you can achieve a full copy of the data and make it an independent and complete physical data copy.
  • an embodiment of the present application provides a file system management method.
  • the method comprises:
  • the target file system and the source file system are connected through a tree structure, and the target file system or the source file system is a file system created through a cloning operation.
  • a cascaded clone file system created based on a tree structure it is possible to achieve incremental or full synchronization of data between various nodes in response to a data synchronization request, so that data can flow flexibly between various nodes.
  • the depth of the cascade in the tree structure can be controlled, and the cost of creating a new clone file system is eliminated, which saves storage space and improves the management efficiency of the entire file system.
  • the data synchronization request includes synchronizing data at a predetermined time in the source file system to the target file system.
  • the data of the target file system can be synchronized to a certain time, thereby realizing the flow of data between the source file system and the source file system to meet the corresponding business needs.
  • the data synchronization request includes synchronizing data modifications after a predetermined time in the source file system to the target file system.
  • the flow of data between file systems can be made more flexible.
  • there is no need to increase the depth of the cascade and corresponding business operations can be continued based on the target file system after the synchronized data modifications, thereby simplifying business processes and improving efficiency.
  • the predetermined moment includes a moment when data in the target file system and data in the source file system begin to differ.
  • data in the target file system and data in the source file system can be synchronized to the maximum extent possible to meet corresponding business requirements.
  • the source file system is an upper level or multiple levels of the target file system in the tree structure
  • the predetermined time includes the time when the source file system creates a lower level file system through a cloning operation.
  • the data of the target file system can be rolled back to a predetermined time. Therefore, while the data flows flexibly, under the corresponding business scenarios, there is no need to increase the depth of the cascade, and the corresponding business operations can be continued based on the rolled-back target file system, thereby simplifying the business process and improving efficiency.
  • the information of the target file system and the source file system includes one or more of the following:
  • the referenced upper-level file system information a first identifier indicating the creation time, and a second identifier indicating the current time.
  • the present application by including information of a referenced upper-level file system, a first identifier indicating the creation time, and a second identifier indicating the current time in the information of the file system, it is possible to respond to data synchronization requests and achieve flexible synchronization of data between file systems, thereby reducing management costs and improving the management efficiency of the file system.
  • the first identifier corresponding to the file system is determined according to the second identifier corresponding to the upper-level file system of the file system when the file system is created through a cloning operation.
  • data changes in a file system can be recorded more accurately to facilitate data synchronization between file systems.
  • synchronizing the data in the source file system to the target file system in full or incrementally according to information of the target file system and the source file system includes:
  • the data in the source file system that is modified by the target file system after the third identifier is written into the target file system.
  • the data in the target file system can be rolled back to the time when the data in the source file system begins to differ, thereby better realizing data synchronization between file systems and meeting the requirements for simple and fast flow of data between different versions.
  • determining the third identifier indicating the predetermined time according to information of the upper-level file system referenced by the target file system and/or the source file system respectively includes at least one of the following:
  • the first identifier corresponding to the target file system is used as the third identifier
  • the first identifier corresponding to the lower-level file system of the source file system is used as the third identifier
  • the first identifier corresponding to the source file system is used as the third identifier
  • the first identifier corresponding to the lower-level file system of the target file system is used as the third identifier
  • the third identifier is determined based on the first identifier corresponding to the lower-level file system of the file system corresponding to the root node.
  • a ninth possible implementation manner of the file system management method when the data synchronization request is to synchronize data modifications after a predetermined time in the source file system to the target file system, according to information of the target file system and the source file system, synchronizing the data in the source file system in full or in increments to the target file system, further comprising:
  • the data modified after the third marker in the source file system is written into the target file system.
  • synchronizing all data in the source file system to the target file system according to information of the target file system and the source file system further comprising:
  • the method further includes:
  • the full synchronization of data between the file systems can be completed, and the target file system and the target file system can be disconnected in the tree.
  • the connection relationship between the upper-level file systems in the tree structure can make the target file system an independent non-clone ordinary file system after full synchronization, thereby controlling the cascade depth in the tree structure, eliminating the configuration cost brought by the creation of a new clone file system, and improving the management efficiency of the file system.
  • disconnecting the connection relationship between the target file system and the upper-level file system of the target file system in the tree structure includes:
  • the first identifier corresponding to the target file system and the information of the referenced upper-level file system are set to empty.
  • the target file system by setting the information of the referenced upper-level file system corresponding to the target file system and the first identifier to empty, it is possible to disconnect the connection between the target file system and the upper-level file system of the target file system in the tree structure in a full synchronization scenario, so that the target file system becomes an independent non-clone ordinary file system, thereby controlling the cascade depth in the tree structure and eliminating the configuration cost brought by the newly created clone file system.
  • an embodiment of the present application provides a file system management device.
  • the device includes:
  • An acquisition module used to acquire information of a target file system and a source file system in response to a data synchronization request
  • the data synchronization module is used to synchronize the data in the source file system to the target file system in full or in increments according to the information of the target file system and the source file system;
  • the target file system and the source file system are connected through a tree structure, and the target file system or the source file system is a file system created through a cloning operation.
  • the data synchronization request includes synchronizing data at a predetermined time in the source file system to the target file system.
  • the data synchronization request includes synchronizing data modifications after a predetermined time in the source file system to the target file system.
  • the predetermined time includes a time when data in the target file system and data in the source file system begin to differ.
  • the source file system is an upper level or multiple levels of the target file system in the tree structure
  • the predetermined time includes the time when the source file system creates a lower level file system through a cloning operation.
  • the information of the target file system and the source file system includes one or more of the following:
  • the referenced upper-level file system information a first identifier indicating the creation time, and a second identifier indicating the current time.
  • the first identifier corresponding to the file system is determined according to a second identifier corresponding to the upper-level file system of the file system when the file system is created through a cloning operation.
  • the data synchronization module is used to:
  • the data in the source file system that is modified by the target file system after the third identifier is written into the target file system.
  • determining the third identifier indicating the predetermined time according to information of the upper-level file system referenced by the target file system and/or the source file system respectively includes at least one of the following:
  • the first identifier corresponding to the target file system is used as the third identifier
  • the first identifier corresponding to the lower-level file system of the source file system is used as the third identifier
  • the first identifier corresponding to the source file system is used as the third identifier
  • the first identifier corresponding to the lower-level file system of the target file system is used as the third identifier
  • the third identifier is determined based on the first identifier corresponding to the lower-level file system of the file system corresponding to the root node.
  • the data synchronization module when the data synchronization request is to synchronize data modifications after a predetermined time in the source file system to the target file system, is further used to:
  • the data modified after the third marker in the source file system is written into the target file system.
  • the data synchronization module is further used to:
  • the device also includes:
  • the disconnection module is used to disconnect the connection between the target file system and the upper-level file system of the target file system in the tree structure.
  • the disconnection module is used to:
  • the first identifier corresponding to the target file system and the information of the referenced upper-level file system are set to empty.
  • an embodiment of the present application provides a file system management device, comprising: a processor; a memory for storing processor executable instructions; wherein the processor is configured to implement the above-mentioned first aspect or one or more of the multiple possible implementation methods of the first aspect when executing instructions.
  • an embodiment of the present application provides a non-volatile computer-readable storage medium having computer program instructions stored thereon.
  • the computer program instructions are executed by a processor, the file system management method of the above-mentioned first aspect or one or more of the multiple possible implementation methods of the first aspect is implemented.
  • an embodiment of the present application provides a terminal device, which can execute the file system management method of the above-mentioned first aspect or one or several possible implementations of the first aspect.
  • an embodiment of the present application provides a computer program product, including computer readable code, or a computer program product.
  • a processor in the electronic device executes the file system management method of the first aspect or one or more of the multiple possible implementations of the first aspect.
  • FIG1 is a schematic diagram showing an application scenario according to an embodiment of the present application.
  • FIG. 2 shows a flow chart of a file system management method according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram showing a data layout of a file system according to an embodiment of the present application.
  • FIG. 4 is a schematic diagram showing processing of data in a file system according to an embodiment of the present application.
  • FIG. 5 is a schematic diagram showing information of a file system according to an embodiment of the present application.
  • FIG6 shows a flow chart of a file system management method according to an embodiment of the present application.
  • FIG. 7 is a schematic diagram showing data synchronization between file systems according to an embodiment of the present application.
  • FIG. 8 is a schematic diagram showing data synchronization between file systems according to an embodiment of the present application.
  • FIG. 9 is a schematic diagram showing data synchronization between file systems according to an embodiment of the present application.
  • FIG. 10 is a schematic diagram showing data synchronization between file systems according to an embodiment of the present application.
  • FIG. 11 is a schematic diagram showing data synchronization between file systems according to an embodiment of the present application.
  • FIG. 12 shows a structural diagram of a file system management device according to an embodiment of the present application.
  • FIG. 13 shows a structural diagram of an electronic device 1300 according to an embodiment of the present application.
  • the file system clone feature can meet the requirements of rapid data replication and deployment while protecting the data.
  • the file system clone feature is a replication and data protection technology for the source file system based on snapshots.
  • the clone file system generated by this feature is similar to a file system snapshot, which shares the source data with the source file system and can instantly generate multiple available copies at a certain point in time.
  • clone file systems can be shared with application servers for reading and writing. By splitting and cloning the file system, you can achieve full data copying and become an independent and complete physical data copy.
  • the present application provides a file system management method.
  • the file system management method of the embodiment of the present application can achieve incremental or full synchronization of data between nodes in response to data synchronization requests in a cascaded clone file system created based on a tree structure, so that data can flow flexibly between nodes.
  • the depth of the cascade in the tree structure can be controlled, and the cost of creating a new clone file system is eliminated. While saving storage space, the management efficiency of the entire file system can also be improved.
  • FIG1 shows a schematic diagram of an application scenario according to an embodiment of the present application.
  • the file system management method of the embodiment of the present application can be used for a file management system 1000 of a tree structure.
  • the file management system 1000 may include a file system 1100 (which may be referred to as an ancestor file system) corresponding to the root node of the tree structure, and clone file systems of various levels obtained by cloning the ancestor file system 1100.
  • a cloning operation with the file system 1100 as the parent file system may create a child file system of the file system 1100, for example, including a file system 1110 and a file system 1120; the cloning operation may also include a cascade cloning operation (i.e., creating a clone of the parent file system, and then creating a clone of the clone file system of the parent file system), so that a cascade clone file system may be created, for example, including a file system 1111 and a file system 1112 (which are child file systems of the file system 1110) and a file system 1121 and a file system 1122 (which are child file systems of the file system 1120).
  • a cascade cloning operation i.e., creating a clone of the parent file system, and then creating a clone of the clone file system of the parent file system
  • the child file system can be considered as a readable and writable copy created by the parent file system at a certain point in time, and the child file system is consistent with the data in the parent file system at that time and before that time.
  • the connection between file systems can be achieved by making the child file system reference the parent file system data.
  • Each file system in the file management system 1000 can be used in scenarios such as AI model training and data mining.
  • the target result data can be synchronized to any other file system in the tree structure, so that subsequent training can be performed on the basis of other file systems, so that there is no need to continue to create one or more new child file systems with the target result data as the parent file system, thereby controlling the depth of the cascade.
  • FIG. 1 only takes a 3-level cascade file system as an example for illustration.
  • the file management system 1000 may also include file systems with more (such as 8 levels) or fewer levels.
  • the file system shown in FIG. 1 is only an example, and the file system may also be replaced by files, directories, etc. That is to say, the method of the embodiment of the present application may also be applied to manage files or directories in the file system, and the present application does not limit this.
  • the above-mentioned file management system 1000 can be deployed in a storage device, which can be independent or can be used as a storage module in a server or terminal device, and this application does not impose any restrictions on this.
  • the server involved in the present application can be located in the cloud or locally, can be a physical device or a virtual device, such as a virtual machine, a container, etc., and has a wireless communication function, wherein the wireless communication function can be set in the chip (system) or Other components or assemblies. It may refer to a device with a wireless connection function.
  • the wireless connection function means that it can be connected to other servers or terminal devices through wireless connection methods such as Wi-Fi and Bluetooth.
  • the server of this application may also have the function of communicating through wired connection.
  • the terminal device involved in this application may refer to a device with a wireless connection function.
  • the function of wireless connection refers to the ability to connect to other terminal devices or servers through wireless connection methods such as Wi-Fi and Bluetooth.
  • the terminal device of this application may also have the function of communicating through a wired connection.
  • the terminal device of this application may be a touch screen, a non-touch screen, or a screenless device.
  • the touch screen device can be controlled by clicking and sliding on the display screen with fingers, stylus, etc.
  • the non-touch screen device can be connected to an input device such as a mouse, keyboard, touch panel, etc., and the terminal device can be controlled through the input device.
  • the device without a screen may be a Bluetooth speaker without a screen.
  • the terminal device of this application may be a smart phone, a netbook, a tablet computer, a laptop computer, a wearable electronic device (such as a smart bracelet, a smart watch, etc.), a TV, a virtual reality device, a stereo, an electronic ink, and the like.
  • file management system 1000 in the embodiment of the present application can also be used in other scenarios, such as application testing and data analysis, disaster recovery drills, and information technology (IT) operations and maintenance, and the present application does not impose any restrictions on this.
  • FIG2 is a flowchart of a file system management method according to an embodiment of the present application.
  • the method can be used in the above-mentioned file management system 1000. As shown in FIG2 , the method includes:
  • Step S201 in response to a data synchronization request, obtaining information of a target file system and a source file system.
  • the target file system and the source file system can be connected through a tree structure, and the target file system or the source file system is a file system created by a cloning operation.
  • the tree structure can be shown in FIG1 , and the target file system and the source file system can be any file system in the file management system 1000 .
  • the information of the target file system and the information of the source file system may include data information of the target file system and the source file system, connection relationship information with other file systems in the tree structure, and the like.
  • the data information may include information such as the identification of the file system, the file size, and the storage location of the data in the disk.
  • Figure 3 a schematic diagram of the data layout of the file system according to an embodiment of the present application is shown.
  • the file system 1100 taking the file system 1100 as an example, it may include the root node "/", the data corresponding to the directory 1 (such as dir1 in the figure), the data corresponding to the file 1 (such as file1 in the figure), the data corresponding to the file 8 (such as file8 in the figure), the data corresponding to the directory 2 (such as dir2 in the figure), the data corresponding to the file 2 (such as file2 in the figure), the data corresponding to the file 3 (such as file3 in the figure) and the data corresponding to the file 4 (such as file4 in the figure).
  • file1 and file8 may be included in dir1, file2 and file3 may be included in dir2, and the connection relationship of the above-mentioned data can be shown in the lines in the figure
  • a snapshot of the file system 1100 can be taken to implement a clone operation (including a cascade clone operation) by acquiring all data stored in the file system 1100 at the time of taking the snapshot, thereby obtaining a cloned sub-file system (such as the file system 1110) of the file system 1100.
  • a clone operation including a cascade clone operation
  • the data information of the file system 1100 includes data corresponding to dir1, file1, dir2, file2, file3, and file4, then the data information of the file system 1110 obtained by the clone operation at this time may include data corresponding to dir1, file1, dir2, file2, file3, and file4, and the file system 1110 can establish a connection relationship with the file system 1100 (i.e., a connection relationship with the file system 1100 as the parent file system and the file system 1110 as the child file system) by referencing the data corresponding to dir1, file1, dir2, file2, file3, and file4 in the data information of the file system 1100 in the data information.
  • a connection relationship with the file system 1100 i.e., a connection relationship with the file system 1100 as the parent file system and the file system 1110 as the child file system
  • the method of establishing the file system 1120 and other file systems of the tree structure shown in FIG. 1 by cloning operation is the same as described above. reason.
  • the data in the file system may be processed, and the processing methods of the file system data may include deletion, addition, content modification, etc.
  • the data in the file system refers to data in the upper-level file system (i.e., the parent file system)
  • the data in the file system may be deleted by disconnecting the reference to the data in the parent file system.
  • FIG4 a schematic diagram of processing data in a file system according to an embodiment of the present application is shown.
  • the data layout in FIG4 may correspond to a file system 1120 through a cloning operation.
  • its data information may include data corresponding to dir1, file1, dir2, file2, file3, and file4.
  • the processing of data includes: deleting file1 (file1 is crossed out with a horizontal line in the figure), adding file5, and modifying the content of file3 (the modified file3 is shown as file3' in the figure).
  • each child file system created based on the same parent file system can be different, and after each child file system is created, the parent file system and each child file system can also process the data separately, so that the data in the file system can be differentiated very diversely and complex.
  • the data in the file system can be synchronized between the various file systems, so that the data flow in the file system is more flexible to meet the needs of different business scenarios. The following is a detailed introduction to different situations of data synchronization requests.
  • the data synchronization request may include synchronizing data at a predetermined time in the source file system to the target file system.
  • the predetermined time may include the time when the data in the target file system and the data in the source file system begin to differ.
  • the data in the target file system and the data in the source file system can be synchronized to the maximum extent to meet corresponding business requirements.
  • the data in the source file system at the predetermined time may be the data included in the source file system at the predetermined time.
  • the data of the target file system can be synchronized to a certain time, thereby realizing the flow of data between the source file system and meeting corresponding business needs.
  • the source file system may be an upper level or multiple levels of file systems of the target file system in the tree structure, and the predetermined time includes the time when the source file system creates a lower level file system through a cloning operation.
  • the target file system when the source file system is file system 1100, the target file system may be file system 1110 or file system 1120 at the next level of file system 1100, or file system 1111 or file system 1112 at the next level of file system 1110, or file system 1121 or file system 1122 at the next level of file system 1120. If the tree structure has more than three levels, the target file system may also be a file system at the next n levels of the source file system, where n is a positive integer in [1, N], and N may be determined according to the number of levels of the tree structure.
  • the moment when file system 1100 and file system 1120 begin to differ may be the moment when file system 1100 creates file system 1120 through a cloning operation
  • the moment when the corresponding source file system creates a next-level file system through a cloning operation may be the moment when file system 1100 creates file system 1120. Therefore, data in file system 1100 may be synchronized to file system 1120 according to the predetermined moment, so that data in file system 1120 is consistent with data when file system 1120 is created. This scenario is equivalent to implementing data rollback in file system 1120.
  • the moment when the file system 1100 and the file system 1121 begin to differ may be when the file system 1100 creates the file system 1121 through a clone operation. Therefore, in this case, the time when the corresponding source file system creates the next-level file system through the cloning operation may be the time when the file system 1100 creates the file system 1120. Therefore, the data in the file system 1100 can be synchronized to the file system 1121 according to the predetermined time, so that the data in the file system 1121 is consistent with the data when the file system 1120 is created. In this scenario, it is equivalent to realizing the cross-level rollback of the data of the file system 1121.
  • the data of the target file system can be rolled back to a predetermined time. Therefore, while the data flows flexibly, under the corresponding business scenarios, there is no need to increase the depth of the cascade, and the corresponding business operations can be continued based on the rolled-back target file system, thereby simplifying the business process and improving efficiency.
  • the data synchronization request may include synchronizing data modifications after a predetermined time in the source file system to the target file system.
  • the data modification after the predetermined time in the source file system may include the modification of the data in the source file system from the predetermined time to the current time. After the modification is synchronized, the data of the target file system and the source file system will be consistent.
  • the modification can be considered as the processing of the data in FIG. 4 , including deletion, addition and modification of the data content.
  • the target file system and the source file system can be any file system in the tree structure, and can be file systems of the same level or cross-level file systems.
  • the flow of data between file systems can be made more flexible.
  • there is no need to increase the depth of the cascade and corresponding business operations can be continued based on the target file system after the synchronized data modifications, thereby simplifying business processes and improving efficiency.
  • Step S202 synchronize the data in the source file system in full or in increments to the target file system according to the information of the target file system and the source file system.
  • the incremental synchronization or full synchronization can be determined in response to the data synchronization request.
  • Incremental synchronization can be understood as the source file system only synchronizing the data at or after the predetermined time to the target file system, and the data before the predetermined time in the target file system can still exist in the form of referencing the data in the upper-level file system; full synchronization can be understood as when performing incremental synchronization, the source file system also synchronizes the data before the predetermined time to the target file system, so that the data before the predetermined time in the target file system does not need to exist in the form of referencing the data in the upper-level file system, so that after the full synchronization, the target file system can choose to disconnect the connection relationship with the upper-level file system in the tree structure.
  • a cascaded clone file system created based on a tree structure it is possible to achieve incremental or full synchronization of data between nodes in response to a data synchronization request, so that data can flow flexibly between nodes.
  • the depth of the cascade in the tree structure can be controlled, and the cost of creating a new clone file system is eliminated, which saves storage space and improves the management efficiency of the entire file system.
  • step S201 In conjunction with different scenarios of the data synchronization request shown in step S201, the following describes in detail the method of synchronizing the full amount or incremental amount of data in the source file system to the target file system.
  • the above-mentioned predetermined time may be indicated by relevant identification information in the information of the file system.
  • the information of the target file system and the source file system may include one or more of the following:
  • the referenced upper-level file system information a first identifier indicating the creation time, and a second identifier indicating the current time.
  • the information of the referenced upper-level file system can be used to indicate the parent file system of the file system, for example, the identifier of the parent file system; the first identifier indicating the creation time can be the version number corresponding to the data referenced by the file system when the parent file system created the file system; the second identifier indicating the current time can be the version number corresponding to the current data of the file system.
  • the present application by including information of a referenced upper-level file system, a first identifier indicating the creation time, and a second identifier indicating the current time in the information of the file system, it is possible to respond to data synchronization requests and achieve flexible synchronization of data between file systems, thereby reducing management costs and improving the management efficiency of the file system.
  • the first identifier corresponding to the file system can be determined based on the second identifier corresponding to the upper-level file system (i.e., the parent file system) of the file system when the file system is created through a cloning operation.
  • the second identifier corresponding to the file system can be consistent with the first identifier at the time of creation.
  • the version number of the modified data can be incremented based on the version number corresponding to the data at the time of creation.
  • the second identifier can be updated accordingly, and the incremented version number is used as the new second identifier of the file system. In this way, data changes in the file system can be recorded more accurately to facilitate data synchronization between file systems.
  • the data information in the information of the file system may also include content of data modifications made by the file system in each version after the file system is created.
  • Fig. 5 is a schematic diagram of information of a file system according to an embodiment of the present application.
  • file system 1100, file system 1110 and file system 1120 are taken as examples to introduce information included in the file system.
  • the identifier of the parent file system can represent the information of the upper-level file system referenced above.
  • the identifier of the parent file system corresponding to the file system 1100 is NULL (empty), which can indicate that the file system 1100 is the ancestor file system in the tree structure, that is, the file system 1100 does not reference the information of other file systems, and there are no other file systems at the upper level;
  • the identifier of the parent file system corresponding to the file system 1110 and the file system 1120 is 1100, which can indicate that the file system 1110 and the file system 1120 are both the lower-level child file systems of the file system 1100.
  • the first identifier of file system 1100 is 0, which may indicate that the version number of file system 1100 when it was created was 0; the first identifier of file system 1110 is 1, which may indicate that the version number of file system 1110 when it was created was 1, and it referenced the data with the corresponding version number 1 in file system 1100 when it was created; the first identifier of file system 1120 is 2, which may indicate that the version number of file system 1120 when it was created was 2, and it referenced the data with the corresponding version number 2 in file system 1100 when it was created.
  • the second identifier of file system 1100 is 3, which may indicate that the current version number of file system 1100 is 3, and it has been modified by 3 versions after its creation;
  • the second identifier of file system 1110 is 2, which may indicate that the current version number of file system 1110 is 2, and it has been modified by 1 version after its creation;
  • the second identifier of file system 1120 is 3, which may indicate that the current version number of file system 1120 is 3, and it has been modified by 1 version after its creation.
  • Tables 1 to 3 below show the modified contents of each file system in each version after creation. Among them, ver1 (corresponding to version number 1), ver2 (corresponding to version number 2), and ver3 (corresponding to version number 3) can represent different versions. For the file system 1100, the modified contents in each version after creation can be seen in Table 1:
  • the modifications of the file system 1100 in ver1 include creating a root node directory (such as "/" in the figure), adding dir1, dir2, file1, file2, file3 and file4, and the modifications in ver2 include adding file8.
  • the file system 1110 For the file system 1110, according to the indication of the first identifier, after creation, it references the ver1 reference in the file system 1100.
  • the corresponding data includes dir1, dir2, file1, file2, file3 and file4.
  • the modified content in each version of the file system 1110 after creation can be seen in Table 2:
  • the modification of the file system 1110 in its ver2 includes deleting file4 (which can be achieved by disconnecting the reference to file4 in the file system 1100).
  • the data in the file system 1110 includes dir1, dir2, file1, file2 and file3.
  • the file system 1120 For the file system 1120, according to the indication of the first identifier, after creation, it references the data corresponding to ver2 in the file system 1100, including dir1, dir2, file1, file2, file3, file4 and file8. On this basis, the modified content in each version after the file system 1120 is created can be seen in Table 3:
  • the modifications of the file system 1120 in its ver3 include deleting file1 (which can be achieved by disconnecting the reference to file1 in the file system 1100) and adding file5.
  • the data in the file system 1120 includes dir1, dir2, file2, file3, file4 and file5.
  • FIG6 is a flowchart of a file system management method according to an embodiment of the present application. As shown in FIG6 , in the case of full synchronization or incremental synchronization, step S202 may include:
  • Step S2021 Determine a third identifier indicating a predetermined time according to information of an upper-level file system referenced by the target file system and/or the source file system.
  • the last version of data in the target file system and the source file system before they begin to differ can be determined based on information of the upper-level file system referenced by the target file system and/or the source file system, and the version number of the version is used as the third identifier.
  • step S2021 In the case where the data synchronization request is to synchronize data at a predetermined time in the source file system to the target file system, the process of step S2021 is described below with reference to FIGS. 7-8 .
  • the source file system may be the parent file system of the target file system, that is, the source file system and the target file system are adjacent upper and lower file systems, and an example thereof may be seen in FIG7 , which shows a schematic diagram of data synchronization between file systems according to an embodiment of the present application.
  • the source file system is file system 1100
  • the target file system is file system 1120
  • the direction pointed by the arrow in the figure may represent the direction of data synchronization.
  • the predetermined time may be the time when the file system 1100 creates the file system 1120 through a cloning operation, which is equivalent to rolling back the data version in the target file system (ie, the file system 1120) to the birth time.
  • step S2021 may include:
  • the first identifier corresponding to the target file system may be used as the third identifier.
  • the source file system and the target file system can be determined to be in a parent-child relationship.
  • the third identifier can be The first identifier corresponding to the file system 1120, ie, ver2, indicates that when the file system 1100 creates the file system 1120 through a cloning operation (which may be referred to as the birth moment of the file system 1120), the version of the file system 1120 is ver2.
  • the source file system may also be a file system one level or multiple levels above the parent file system of the target file system, that is, the source file system and the target file system are cross-level file systems, and an example thereof may be seen in FIG8 , which shows a schematic diagram of data synchronization between file systems according to an embodiment of the present application.
  • the source file system is file system 1100
  • the target file system is file system 1121
  • the direction pointed by the arrow in the figure may represent the direction of data synchronization.
  • the predetermined time may be the time when the file system 1100 creates the file system 1120 through a cloning operation, which is equivalent to rolling back the data version in the target file system (i.e., the file system 1121) to the birth time of the file system 1120.
  • step S2021 may include:
  • the first identifier corresponding to the lower file system of the source file system is used as the third identifier.
  • the information of the referenced upper-level file system corresponding to the target file system can be queried upwards level by level until the information of the referenced upper-level file system indicates the source file system (i.e., file system 1100), and it is determined that the source file system is two levels or more (here, two levels) above the target file system, and the first identifier corresponding to the lower-level file system of the source file system can be used as the third identifier.
  • the third identifier can be the first identifier corresponding to the file system 1120, i.e., ver2, which means that after ver2, the data in the file system 1100 and the file system 1121 begin to differ.
  • step S2021 In the case where the data synchronization request is to synchronize data modifications after a predetermined time in the source file system to the target file system, the process of step S2021 is described below with reference to FIGS. 7 to 11 .
  • the process of determining the third identifier can be the same as the process illustrated in Figure 7; when the source file system is a cross-level file system of the target file system, that is, the upper level or multiple levels of the parent file system, the process of determining the third identifier can be the same as the process illustrated in Figure 8.
  • the target file system may also be the parent file system of the source file system, that is, the target file system and the source file system are adjacent and superior file systems, and an example thereof can be seen in FIG9 , which shows a schematic diagram of data synchronization between file systems according to an embodiment of the present application.
  • the target file system is file system 1100
  • the source file system is file system 1120
  • the direction pointed by the arrow in the figure may represent the direction of data synchronization.
  • the predetermined time may include the time when the data in the file system 1100 and the file system 1120 begin to differ.
  • step S2021 may include:
  • the target file system is determined to be the upper-level file system of the source file system according to the information of the referenced upper-level file system corresponding to the source file system
  • the first identifier corresponding to the source file system is used as the third identifier.
  • the third identifier can be the first identifier corresponding to the source file system, i.e., file system 1120, i.e., ver2, indicating that starting from version number 2, the data of file system 1100 and file system 1120 begin to differ.
  • the target file system may also be a file system one level or multiple levels above the parent file system of the source file system, that is, the target file system and the source file system are cross-level file systems.
  • FIG. 10 shows a schematic diagram of data synchronization between file systems according to an embodiment of the present application.
  • the target file system is file system 1100
  • the source file system The system is a file system 1121, and the direction pointed by the arrow in the figure can represent the direction of data synchronization.
  • the predetermined time may include the time when the data in the file system 1100 and the file system 1121 begin to differ.
  • step S2021 may include:
  • the target file system is determined to be two or more file systems above the source file system according to information of the referenced upper file system corresponding to the source file system, the first identifier corresponding to the lower file system of the target file system is used as the third identifier.
  • the information of the referenced upper-level file system corresponding to the source file system can be queried upward level by level until the information of the referenced upper-level file system indicates the source file system (i.e., file system 1100), and it is determined that the target file system is two levels or more (here, two levels) above the source file system, and the first identifier corresponding to the lower-level file system of the target file system can be used as the third identifier.
  • the third identifier can be the first identifier corresponding to the file system 1120, i.e., ver2, indicating that starting from version number 2, the data in the file system 1100 and the file system 1121 begin to differ.
  • the target file system and the source file system may also be file systems under different subtrees in a tree-structured file system, an example of which can be seen in FIG11 , which shows a schematic diagram of data synchronization between file systems according to an embodiment of the present application.
  • the target file system is file system 1110
  • the source file system is file system 1121.
  • the direction indicated by the arrow in the figure may represent the direction of data synchronization.
  • the predetermined time may include the time when the data in the file system 1110 and the file system 1121 begin to differ.
  • step S2021 may include:
  • the third identifier is determined based on the first identifier corresponding to the lower-level file system of the file system corresponding to the root node.
  • the source file system i.e., file system 1121
  • the target file system i.e., file system 1110
  • the target file system can be queried upwards level by level through the information of the upper-level file system referenced by the target file system (i.e., file system 1110), until the file system indicated by the information of the upper-level file system referenced by the two is found to be the same file system (i.e., file system 1100), and it is determined that the source file system and the target file system have a file system corresponding to a common root node (i.e., file system 1100), then the third identifier can be determined based on the first identifier corresponding to the lower-level file system of the file system corresponding to the root node.
  • the version number with a smaller value in the corresponding first identifier in file system 1110 and file system 1120 can be used as the third identifier, i.e., ver1 (as shown in the figure, the first identifier corresponding to file system 1110), indicating that starting from version number 1, the data of file system 1110 and file system 1121 begin to differ.
  • target file system is file system 1121 and the source file system is file system 1110 can be referred to above, and the same applies.
  • data synchronization can be performed between the source file system and the target file system according to the third identifier, as described below.
  • the data after the third identifier in the target file system can be processed first.
  • Step S2022 write the data in the source file system that is modified by the target file system after the third identifier into the target file system.
  • the target file system may be scanned for modified data after the third identifier and read in the source file system.
  • the corresponding data is written into the target file system as a modification of the latest version of the target file system.
  • the modification of data in the file system 1120 after ver2 can be seen in Table 3, that is, file1 is deleted and file5 is added in ver3. Then the data of file1 and file5 can be read in the file system 1100 and written into the file system 1120 as the modification of ver4 of the file system 1120. As shown in Table 1, if there is data in file1 in the file system 1100, the data of file1 can be directly read out and written into the file system 1120, and if there is no file5 in the file system 1100, all 0s can be read out and written into the corresponding position of file5 in the file system 1120 (equivalent to deleting file5 in the file system 1120).
  • the incremental synchronization can be completed after the data in the source file system that is modified by the target file system after the third identifier is written into the target file system. That is to say, the data before the third identifier in the target file system still refers to the data in the parent file system, and the target file system and the source file system are still connected through a tree structure.
  • the full synchronization may refer to the description in step S2024 and step S203 described later.
  • the data in the target file system can be rolled back to the time when the data in the source file system begins to differ, thereby better realizing data synchronization between file systems and meeting the requirements for simple and fast flow of data between different versions.
  • the step S202 may further include:
  • Step S2023 write the data in the source file system that is modified after the third marker into the target file system.
  • the modified data after the third identifier is read in the source file system and written into the target file system as a modification of the latest version of the target file system.
  • the modification of data in the file system 1100 after ver2 can be seen in Table 1, that is, file 8 is added in ver3. Then the data of file 8 can be read in the file system 1100 and written into the file system 1120 as the modification of ver4 of the file system 1120.
  • the incremental synchronization can be completed after the data modified after the third identifier in the source file system is written to the target file system. That is to say, the data before the third identifier in the target file system still refers to the data in the parent file system, and the target file system and the source file system are still connected through a tree structure.
  • the full synchronization may refer to the description in step S2024 and step S203 described later.
  • step S202 may further include:
  • Step S2024 write the data in the source file system before and including the third identifier into the target file system.
  • all data of the file system 1100 before and including ver2 can be determined by referring to the data modification before and including ver2 in Table 1, i.e., in ver1, "/", dir1, dir2, file1, file2, file3 are added to the file system 1100, and in ver2, file4 is added. It can be seen that all data of the file system 1100 before and including ver2 includes "/", dir1, dir2, file1, file2, file3, file4. Then, the data of "/", dir1, dir2, file1, file2, file3, file4 can be read from the file system 1100 and written into the file system 1120.
  • step S2024 the data of ver2 and before ver2 in file system 1120 can be realized by referencing the data in the parent file system, by rewriting the data of ver2 and before ver2 into the target file system, i.e., file system 1120, there is no need to refer to the data in the parent file system in file system 1120, and the connection between the target file system and its upper-level file system can be disconnected through subsequent steps, thereby realizing full synchronization of the data.
  • the method may further include:
  • Step S203 disconnect the connection between the target file system and the upper-level file system of the target file system in the tree structure.
  • the target file system By disconnecting the connection between the target file system and the upper-level file system of the target file system in the tree structure, the target file system can be made into an independent file system, namely, a non-cloned ordinary file system. Subsequently, the target file system can be used as the file system corresponding to the root node to create a new clone file system in a tree structure through cloning operations.
  • the target file system by writing the data before the third identifier and the third identifier in the source file system into the target file system, full synchronization of data between file systems can be completed, and by disconnecting the connection between the target file system and the upper-level file system of the target file system in the tree structure, the target file system can be made into an independent non-cloned ordinary file system after full synchronization, thereby controlling the depth of cascading in the tree structure, eliminating the configuration cost brought by the newly created clone file system, and improving the management efficiency of the file system.
  • step S203 may include:
  • Step S2031 Set the first identifier corresponding to the target file system and the information of the referenced upper-level file system to empty.
  • the identifier of the parent file system in the target file system can be set to NULL, indicating that the target file system does not reference information of other file systems; and the first identifier corresponding to the target file system is set to 0, indicating that the version number of the target file system when it is created is 0.
  • the target file system can be transformed into a non-cloned ordinary file system.
  • the target file system by setting the information of the referenced upper-level file system corresponding to the target file system and the first identifier to empty, it is possible to disconnect the connection between the target file system and the upper-level file system of the target file system in the tree structure in a full synchronization scenario, so that the target file system becomes an independent non-clone ordinary file system, thereby controlling the cascade depth in the tree structure and eliminating the configuration cost brought by the newly created clone file system.
  • FIG12 shows a structural diagram of a file system management device according to an embodiment of the present application.
  • the device may include:
  • the acquisition module 1201 is used to acquire information of the target file system and the source file system in response to a data synchronization request.
  • the data synchronization module 1202 is used to synchronize the data in the source file system to the target file system in full or in increments according to the information of the target file system and the source file system.
  • the target file system and the source file system are connected through a tree structure, and the target file system or the source file system is a file system created through a cloning operation.
  • the embodiment of the present application it is possible to implement, in a cascade clone file system created based on a tree structure, According to the synchronization request, the incremental or full synchronization of data between nodes is realized, so that data can flow flexibly between nodes. Therefore, by making it easy to synchronize data between file systems of different versions, the depth of cascades in the tree structure can be controlled, and the cost of creating a new clone file system can be eliminated, which can save storage space and improve the management efficiency of the entire file system.
  • the data synchronization request may include synchronizing data at a predetermined time in the source file system to the target file system.
  • the data of the target file system can be synchronized to a certain time, thereby realizing the flow of data between the source file system and the source file system to meet corresponding business needs.
  • the data synchronization request may include synchronizing data modifications in the source file system after a predetermined time to the target file system.
  • the flow of data between file systems can be made more flexible.
  • there is no need to increase the depth of the cascade and corresponding business operations can be continued based on the target file system after the synchronized data modifications, thereby simplifying business processes and improving efficiency.
  • the predetermined time includes a time when data in the target file system and data in the source file system begin to differ.
  • the data in the target file system and the data in the source file system can be synchronized to the maximum extent possible to meet corresponding business requirements.
  • the source file system is an upper level or multiple levels of file systems of the target file system in the tree structure
  • the predetermined time includes the time when the source file system creates a lower level file system through a cloning operation.
  • the data of the target file system can be rolled back to a predetermined time. Therefore, while the data flows flexibly, under the corresponding business scenarios, there is no need to increase the depth of the cascade, and the corresponding business operations can be continued based on the rolled-back target file system, thereby simplifying the business process and improving efficiency.
  • the information of the target file system and the source file system includes one or more of the following:
  • the referenced upper-level file system information a first identifier indicating the creation time, and a second identifier indicating the current time.
  • the present application by including information of a referenced upper-level file system, a first identifier indicating the creation time, and a second identifier indicating the current time in the information of the file system, it is possible to respond to data synchronization requests and achieve flexible synchronization of data between file systems, thereby reducing management costs and improving the management efficiency of the file system.
  • the first identifier corresponding to the file system is determined according to the second identifier corresponding to the upper-level file system of the file system when the file system is created through a cloning operation.
  • data changes in a file system can be recorded more accurately to facilitate data synchronization between file systems.
  • the data synchronization module 1202 is used to:
  • the data in the source file system that is modified by the target file system after the third identifier is written into the target file system.
  • the data in the target file system can be rolled back to the same time as the source file system. The moment when the data in the file system begins to differ, so that data between file systems can be better synchronized and the need for easy and fast flow of data between different versions can be met.
  • determining the third identifier indicating the predetermined time according to information of the upper-level file system referenced by the target file system and/or the source file system respectively includes at least one of the following:
  • the first identifier corresponding to the target file system is used as the third identifier
  • the first identifier corresponding to the lower-level file system of the source file system is used as the third identifier
  • the first identifier corresponding to the source file system is used as the third identifier
  • the first identifier corresponding to the lower-level file system of the target file system is used as the third identifier
  • the third identifier is determined based on the first identifier corresponding to the lower-level file system of the file system corresponding to the root node.
  • the data synchronization module 1202 is further configured to:
  • the data modified after the third marker in the source file system is written into the target file system.
  • the data synchronization module 1202 is further used to:
  • the device also includes:
  • the disconnection module is used to disconnect the connection between the target file system and the upper-level file system of the target file system in the tree structure.
  • the target file system by writing the data before the third identifier and the third identifier in the source file system into the target file system, full synchronization of data between file systems can be completed, and by disconnecting the connection between the target file system and the upper-level file system of the target file system in the tree structure, the target file system can be made into an independent non-cloned ordinary file system after full synchronization, thereby controlling the depth of cascading in the tree structure, eliminating the configuration cost brought by the newly created clone file system, and improving the management efficiency of the file system.
  • the disconnect module is used to:
  • the first identifier corresponding to the target file system and the information of the referenced upper-level file system are set to empty.
  • the connection relationship between the upper-level file systems makes the target file system an independent non-clone ordinary file system, thereby controlling the cascade depth in the tree structure and eliminating the configuration cost of creating a new clone file system.
  • An embodiment of the present application provides a file system management device, comprising: a processor and a memory for storing processor-executable instructions; wherein the processor is configured to implement the above method when executing the instructions.
  • An embodiment of the present application provides a terminal device, which can execute the above-mentioned file system management method.
  • An embodiment of the present application provides a non-volatile computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the above method is implemented.
  • An embodiment of the present application provides a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code.
  • the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.
  • FIG13 shows a structural diagram of an electronic device 1300 according to an embodiment of the present application.
  • the electronic device 1300 may be the above-mentioned file management system 1000.
  • the electronic device 1300 includes at least one processor 1801, at least one memory 1802, and at least one communication interface 1803.
  • the electronic device may also include common components such as an antenna, which will not be described in detail here.
  • Processor 1801 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the above program.
  • Processor 1801 may include one or more processing units, for example: processor 1801 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural-network processing unit (neural-network processing unit, NPU), etc.
  • different processing units may be independent devices or integrated in one or more processors.
  • Communication interface 1803 is used to communicate with other electronic devices or communication networks, such as Ethernet, radio access network (RAN), core network, wireless local area network (WLAN), etc.
  • RAN radio access network
  • WLAN wireless local area network
  • the memory 1802 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
  • the memory may exist independently and be connected to the processor via a bus.
  • the memory may also be integrated with the processor.
  • the memory may be used to store the above-mentioned file system.
  • the memory 1802 is used to store application code for executing the above solution, and the execution is controlled by the processor 1801.
  • the processor 1801 is used to execute the application code stored in the memory 1802.
  • Computer readable storage media may be tangible devices that can hold and store instructions for use by instruction execution devices.
  • the computer readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof.
  • Computer readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disc (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination thereof.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read-only memory
  • SRAM static random access memory
  • CD-ROM compact disc read-only memory
  • DVD digital versatile disc
  • memory stick a floppy disk
  • mechanical encoding device such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination thereof.
  • the computer-readable program instructions or codes described herein can be downloaded from a computer-readable storage medium to each computing/processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and/or edge servers.
  • the network adapter card or network interface in each computing/processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing/processing device.
  • the computer program instructions for performing the operations of the present application may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as "C" language or similar programming languages.
  • the computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server.
  • the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
  • LAN local area network
  • WAN wide area network
  • an Internet service provider e.g., via the Internet using an Internet service provider.
  • an electronic circuit such as a programmable logic circuit, a field programmable gate array (FPGA) or a programmable logic array (PLA)
  • FPGA field programmable gate array
  • PLA programmable logic array
  • These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions/actions specified in one or more boxes in the flowchart and/or block diagram is generated.
  • These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and/or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions/actions specified in one or more boxes in the flowchart and/or block diagram.
  • the computer readable program instructions can also be loaded into a computer, other programmable data processing device, or other equipment to execute a series of operation steps on the computer, other programmable data processing device, or other equipment to produce a computer program.
  • the process of implementation so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions/actions specified in one or more blocks in the flowchart and/or block diagram.
  • each square frame in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification.
  • the functions marked in the square frame can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square frames can actually be executed substantially in parallel, and they can also be executed in the opposite order sometimes, depending on the functions involved.
  • each box in the block diagram and/or flowchart, and the combination of boxes in the block diagram and/or flowchart can be implemented by hardware (such as circuits or ASICs (Application Specific Integrated Circuit)) that performs the corresponding function or action, or can be implemented by a combination of hardware and software, such as firmware.

Landscapes

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

Abstract

本申请涉及一种文件系统管理方法、装置和存储介质。方法包括:响应于数据同步请求,获取目标文件系统和源文件系统的信息(S201);根据目标文件系统和源文件系统的信息,将源文件系统中的数据全量或增量同步至目标文件系统(S202);其中,目标文件系统和源文件系统通过树状结构进行连接,目标文件系统或源文件系统为通过克隆操作创建的文件系统。根据本方法能够实现在基于树状结构创建的级联的克隆文件系统中,不同版本的文件系统之间的数据能够灵活、简便的同步,可以控制树状结构中级联的深度,且消除了新创建克隆文件系统带来的代价,在节省了存储空间的同时,还可以提升整个文件系统的管理效率。

Description

文件系统管理方法、装置和存储介质
本申请要求于2022年10月11日提交中国专利局、申请号为202211241709.1、发明名称为“文件系统管理方法、装置和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及文件系统快照嫁接技术领域,尤其涉及一种文件系统管理方法、装置和存储介质。
背景技术
随着当前数据增长,对数据进行挖掘以最大化发挥数据的价值成为趋势,例如在测试、人工智能(artificial intelligence,AI)模型训练、数据挖掘等场景中,通常需要数据能够在多个版本及版本间进行简便快速流动。文件系统克隆特性可以满足数据快速复制、部署的要求,同时对数据进行保护。文件系统克隆特性是基于快照对源文件系统的复制与数据保护技术。该特性产生的克隆文件系统类似于一个文件系统快照,与源文件系统共享源数据,可以瞬时生成某一时间点的多个可用副本。与只读快照不同,克隆文件系统可以共享给应用服务器进行读写。通过分裂克隆文件系统,可以实现数据全量拷贝,成为独立完整的物理数据副本。
然而,在当前的文件系统应用中,通常是在每次在应用时重新拷贝一份数据,这种方式效率低、空间浪费大。或者是创建级联的克隆文件系统,然而,级联的深度会影响文件系统的性能,且新创建的克隆需要进行复杂的配置后才能进行业务,代价较大。因此,亟需新型的方法以提升文件系统的管理效率,节省存储空间,使得数据在文件系统中的流动更加灵活。
发明内容
有鉴于此,提出了一种文件系统管理方法、装置和存储介质。
第一方面,本申请的实施例提供了一种文件系统管理方法。该方法包括:
响应于数据同步请求,获取目标文件系统和源文件系统的信息;
根据目标文件系统和源文件系统的信息,将源文件系统中的数据全量或增量同步至目标文件系统;
其中,目标文件系统和源文件系统通过树状结构进行连接,目标文件系统或源文件系统为通过克隆操作创建的文件系统。
根据本申请实施例,能够实现在基于树状结构创建的级联的克隆文件系统中,响应于数据同步请求,实现各个节点之间数据的增量或全量同步,使得数据能够在各个节点之间灵活流动。从而,通过使得不同版本的文件系统之间的数据能够简便的同步,可以控制树状结构中级联的深度,且消除了新创建克隆文件系统带来的代价,在节省了存储空间的同时,还可以提升整个文件系统的管理效率。
根据第一方面,在文件系统管理方法的第一种可能的实现方式中,数据同步请求包括将源文件系统中预定时刻的数据同步至目标文件系统。
根据本申请实施例,通过将源文件系统中预定时刻的数据同步至目标文件系统,可以实现目标文件系统的数据同步至某一时刻,从而实现与源文件系统间数据的流动,满足相应的业务需求。
根据第一方面或第一方面的第一种可能的实现方式,在文件系统管理方法的第二种可能的实现方式中,数据同步请求包括将源文件系统中预定时刻后的数据修改同步至目标文件系统。
根据本申请实施例,通过将源文件系统中预定时刻后的数据修改同步至目标文件系统,可以使得文件系统间数据的流动更加灵活,在相应的业务场景之下,无需增加级联的深度,即可基于同步了数据修改后的目标文件系统继续进行相应业务操作,简化了业务流程,提高了效率。
根据第一方面的第一种或第二种可能的实现方式,在文件系统管理方法的第三种可能的实现方式中,预定时刻包括目标文件系统中的数据和源文件系统中的数据开始存在区别的时刻。
根据本申请实施例,可以使目标文件系统中的数据和源文件系统中的数据能够最大化的进行同步,以满足相应的业务需求。
根据第一方面的第一种或第二种可能的实现方式,在文件系统管理方法的第四种可能的实现方式中,源文件系统为目标文件系统在树状结构中的上一级或多级文件系统,预定时刻包括源文件系统通过克隆操作创建下一级文件系统的时刻。
根据本申请实施例,通过将源文件系统中,通过克隆操作创建下一级文件系统时的数据同步至目标文件系统,可以使得目标文件系统的数据能够回退至预定时刻,从而在数据灵活流动的同时,在相应的业务场景之下,无需增加级联的深度,即可基于回退后的目标文件系统继续进行相应业务操作,简化了业务流程,提高了效率。
根据第一方面或第一方面的第一种或第二种或第三种或第四种可能的实现方式,在文件系统管理方法的第五种可能的实现方式中,目标文件系统和源文件系统的信息,包括以下中的一项或多项:
引用的上一级文件系统的信息、指示创建时刻的第一标识、指示当前时刻的第二标识。
根据本申请实施例,通过在文件系统的信息中包括引用的上一级文件系统的信息、指示创建时刻的第一标识、指示当前时刻的第二标识,可以响应于数据同步请求,实现文件系统之间的数据灵活同步,从而可以减少管理代价,提升对文件系统的管理效率。
根据第一方面的第五种可能的实现方式,在文件系统管理方法的第六种可能的实现方式中,文件系统对应的第一标识根据文件系统的上一级文件系统在通过克隆操作创建文件系统时对应的第二标识确定。
根据本申请实施例,可以更加准确地记录文件系统中的数据变化,以方便文件系统之间的数据同步。
根据第一方面的第五种或第六种可能的实现方式,在文件系统管理方法的第七种可能的实现方式中,根据目标文件系统和源文件系统的信息,将源文件系统中的数据全量或增量同步至目标文件系统,包括:
根据目标文件系统和/或源文件系统分别对应的引用的上一级文件系统的信息,确定指示预定时刻的第三标识;
将源文件系统中目标文件系统在第三标识之后修改的数据写入目标文件系统。
根据本申请实施例,通过确定指示预定时刻的第三标识,并将源文件系统中目标文件系统在第三标识之后修改的数据写入目标文件系统,可以使目标文件系统中的数据回退至与源文件系统中的数据开始产生区别的时刻,从而可以更好的实现文件系统之间数据的同步,满足不同版本间数据简便快速流动的需求。
根据第一方面的第七种可能的实现方式,在文件系统管理方法的第八种可能的实现方式中,根据目标文件系统和/或源文件系统分别对应的引用的上一级文件系统的信息,确定指示预定时刻的第三标识,包括以下中的至少一种:
在根据目标文件系统对应的引用的上一级文件系统的信息,确定源文件系统为所述目标文件系统的上一级文件系统的情况下,以目标文件系统对应的第一标识作为第三标识;
在根据目标文件系统对应的引用的上一级文件系统的信息,确定源文件系统为目标文件系统的上两级或两级以上文件系统的情况下,以源文件系统的下一级文件系统对应的第一标识作为第三标识;
在根据源文件系统对应的引用的上一级文件系统的信息,确定目标文件系统为源文件系统的上一级文件系统的情况下,以源文件系统对应的第一标识作为第三标识;
在根据源文件系统对应的引用的上一级文件系统的信息,确定目标文件系统为源文件系统的上两级或两级以上文件系统的情况下,以目标文件系统的下一级文件系统对应的第一标识作为第三标识;
在根据源文件系统和目标文件系统分别对应的引用的上一级文件系统的信息,确定源文件系统和目标文件系统存在共同的根节点对应的文件系统的情况下,根据根节点对应的文件系统的下一级文件系统对应的第一标识,确定第三标识。
根据本申请实施例,通过在不同的情况下,分别确定第三标识,可以使树状结构中任意两个文件系统之间的数据能够灵活同步,以满足相应业务的需求。
根据第一方面的第七种或第八种可能的实现方式,在文件系统管理方法的第九种可能的实现方式中,在数据同步请求为将源文件系统中预定时刻后的数据修改同步至目标文件系统的情况下,根据目标文件系统和源文件系统的信息,将源文件系统中的数据全量或增量同步至目标文件系统,还包括:
将源文件系统中在第三标识后修改的数据写入目标文件系统。
根据本申请实施例,通过将源文件系统中在第三标识之后修改的数据写入目标文件系统,可以在增量同步的情况下,完成文件系统之间数据修改的同步,从而可以满足不同版本间数据简便快速流动的需求。
根据第一方面的第七种或第八种或第九种可能的实现方式,在文件系统管理方法的第十种可能的实现方式中,根据目标文件系统和源文件系统的信息,将源文件系统中的数据全量同步至目标文件系统,还包括:
将源文件系统中在第三标识及第三标识前的数据写入目标文件系统;
该方法还包括:
断开目标文件系统和目标文件系统在树状结构中的上一级文件系统之间的连接关系。
根据本申请实施例,通过将源文件系统中在第三标识及第三标识前的数据写入目标文件系统,可以完成文件系统之间数据的全量同步,通过断开目标文件系统与目标文件系统在树 状结构中的上一级文件系统之间的连接关系,可以在全量同步后使得目标文件系统成为独立的非克隆普通文件系统,由此可以控制树状结构中级联的深度,消除了新创建克隆文件系统带来的配置代价,可以提升文件系统的管理效率。
根据第一方面的第十种可能的实现方式,在文件系统管理方法的第十一种可能的实现方式中,断开目标文件系统和目标文件系统在树状结构中的上一级文件系统之间的连接关系,包括:
将目标文件系统对应的第一标识和引用的上一级文件系统的信息置为空。
根据本申请实施例,通过将目标文件系统对应的引用的上一级文件系统的信息和第一标识置为空,可以实现在全量同步的场景中,断开目标文件系统与目标文件系统在树状结构中的上一级文件系统之间的连接关系,使得目标文件系统成为独立的非克隆普通文件系统,由此可以控制树状结构中级联的深度,消除了新创建克隆文件系统带来的配置代价。
第二方面,本申请的实施例提供了一种文件系统管理装置。该装置包括:
获取模块,用于响应于数据同步请求,获取目标文件系统和源文件系统的信息;
数据同步模块,用于根据目标文件系统和源文件系统的信息,将源文件系统中的数据全量或增量同步至目标文件系统;
其中,目标文件系统和源文件系统通过树状结构进行连接,目标文件系统或源文件系统为通过克隆操作创建的文件系统。
根据第二方面,在文件系统管理装置的第一种可能的实现方式中,数据同步请求包括将源文件系统中预定时刻的数据同步至目标文件系统。
根据第二方面或第二方面的第一种可能的实现方式,在文件系统管理装置的第二种可能的实现方式中,数据同步请求包括将源文件系统中预定时刻后的数据修改同步至目标文件系统。
根据第二方面的第一种或第二种可能的实现方式,在文件系统管理装置的第三种可能的实现方式中,预定时刻包括目标文件系统中的数据和源文件系统中的数据开始存在区别的时刻。
根据第二方面的第一种或第二种可能的实现方式,在文件系统管理装置的第四种可能的实现方式中,源文件系统为目标文件系统在树状结构中的上一级或多级文件系统,预定时刻包括源文件系统通过克隆操作创建下一级文件系统的时刻。
根据第二方面或第二方面的第一种或第二种或第三种或第四种可能的实现方式,在文件系统管理装置的第五种可能的实现方式中,目标文件系统和源文件系统的信息,包括以下中的一项或多项:
引用的上一级文件系统的信息、指示创建时刻的第一标识、指示当前时刻的第二标识。
根据第二方面的第五种可能的实现方式,在文件系统管理装置的第六种可能的实现方式中,文件系统对应的第一标识根据文件系统的上一级文件系统在通过克隆操作创建文件系统时对应的第二标识确定。
根据第二方面的第五种或第六种可能的实现方式,在文件系统管理装置的第七种可能的实现方式中,该数据同步模块,用于:
根据目标文件系统和/或源文件系统分别对应的引用的上一级文件系统的信息,确定指示预定时刻的第三标识;
将源文件系统中目标文件系统在第三标识之后修改的数据写入目标文件系统。
根据第二方面的第七种可能的实现方式,在文件系统管理装置的第八种可能的实现方式中,根据目标文件系统和/或源文件系统分别对应的引用的上一级文件系统的信息,确定指示预定时刻的第三标识,包括以下中的至少一种:
在根据目标文件系统对应的引用的上一级文件系统的信息,确定源文件系统为所述目标文件系统的上一级文件系统的情况下,以目标文件系统对应的第一标识作为第三标识;
在根据目标文件系统对应的引用的上一级文件系统的信息,确定源文件系统为目标文件系统的上两级或两级以上文件系统的情况下,以源文件系统的下一级文件系统对应的第一标识作为第三标识;
在根据源文件系统对应的引用的上一级文件系统的信息,确定目标文件系统为源文件系统的上一级文件系统的情况下,以源文件系统对应的第一标识作为第三标识;
在根据源文件系统对应的引用的上一级文件系统的信息,确定目标文件系统为源文件系统的上两级或两级以上文件系统的情况下,以目标文件系统的下一级文件系统对应的第一标识作为第三标识;
在根据源文件系统和目标文件系统分别对应的引用的上一级文件系统的信息,确定源文件系统和目标文件系统存在共同的根节点对应的文件系统的情况下,根据根节点对应的文件系统的下一级文件系统对应的第一标识,确定第三标识。
根据第二方面的第七种或第八种可能的实现方式,在文件系统管理装置的第九种可能的实现方式中,在数据同步请求为将源文件系统中预定时刻后的数据修改同步至目标文件系统的情况下,该数据同步模块,还用于:
将源文件系统中在第三标识后修改的数据写入目标文件系统。
根据第二方面的第七种或第八种或第九种可能的实现方式,在文件系统管理装置的第十种可能的实现方式中,该数据同步模块,还用于:
将源文件系统中在第三标识及第三标识前的数据写入目标文件系统;
该装置还包括:
断开模块,用于断开目标文件系统和目标文件系统在树状结构中的上一级文件系统之间的连接关系。
根据第二方面的第十种可能的实现方式,在文件系统管理装置的第十一种可能的实现方式中,该断开模块,用于:
将目标文件系统对应的第一标识和引用的上一级文件系统的信息置为空。
第三方面,本申请的实施例提供了一种文件系统管理装置,该装置包括:处理器;用于存储处理器可执行指令的存储器;其中,处理器被配置为执行指令时实现上述第一方面或者第一方面的多种可能的实现方式中的一种或几种的文件系统管理方法。
第四方面,本申请的实施例提供了一种非易失性计算机可读存储介质,其上存储有计算机程序指令,计算机程序指令被处理器执行时实现上述第一方面或者第一方面的多种可能的实现方式中的一种或几种的文件系统管理方法。
第五方面,本申请的实施例提供了一种终端设备,该终端设备可以执行上述第一方面或者第一方面的多种可能的实现方式中的一种或几种的文件系统管理方法。
第六方面,本申请的实施例提供了一种计算机程序产品,包括计算机可读代码,或者承 载有计算机可读代码的非易失性计算机可读存储介质,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行上述第一方面或者第一方面的多种可能的实现方式中的一种或几种的文件系统管理方法。
本申请的这些和其他方面在以下(多个)实施例的描述中会更加简明易懂。
附图说明
包含在说明书中并且构成说明书的一部分的附图与说明书一起示出了本申请的示例性实施例、特征和方面,并且用于解释本申请的原理。
图1示出根据本申请一实施例的应用场景的示意图。
图2示出根据本申请一实施例的文件系统管理方法的流程图。
图3示出根据本申请一实施例的文件系统的数据布局的示意图。
图4示出根据本申请一实施例的对文件系统中的数据进行处理的示意图。
图5示出根据本申请一实施例的文件系统的信息的示意图。
图6示出根据本申请一实施例的文件系统管理方法的流程图。
图7示出根据本申请一实施例的文件系统之间进行数据同步的示意图。
图8示出根据本申请一实施例的文件系统之间进行数据同步的示意图。
图9示出根据本申请一实施例的文件系统之间进行数据同步的示意图。
图10示出根据本申请一实施例的文件系统之间进行数据同步的示意图。
图11示出根据本申请一实施例的文件系统之间进行数据同步的示意图。
图12示出根据本申请一实施例的文件系统管理装置的结构图。
图13示出根据本申请一实施例的电子设备1300的结构图。
具体实施方式
以下将参考附图详细说明本申请的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。
另外,为了更好的说明本申请,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本申请同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本申请的主旨。
随着当前数据增长,对数据进行挖掘以最大化发挥数据的价值成为趋势,例如在测试、AI模型训练、数据挖掘等场景中,通常需要数据能够在多个版本及版本间进行简便快速流动。文件系统克隆特性可以满足数据快速复制、部署的要求,同时对数据进行保护。文件系统克隆特性是基于快照对源文件系统的复制与数据保护技术。该特性产生的克隆文件系统类似于一个文件系统快照,与源文件系统共享源数据,可以瞬时生成某一时间点的多个可用副本。与只读快照不同,克隆文件系统可以共享给应用服务器进行读写。通过分裂克隆文件系统,可以实现数据全量拷贝,成为独立完整的物理数据副本。
然而,在当前的文件系统应用中,通常是在每次在应用时重新拷贝一份数据,这种方式效率低、空间浪费大。或者是创建级联的克隆文件系统,然而,级联的深度会影响文件系统的性能,且新创建的克隆需要进行复杂的配置(如创建共享权限、重新挂载)后才能进行业务,代价较大。因此,亟需新型的方法以提升文件系统的管理效率,节省存储空间,使得数据在文件系统中的流动更加灵活。
为了解决上述技术问题,本申请提供了一种文件系统管理方法,本申请实施例的文件系统管理方法能够实现在基于树状结构创建的级联的克隆文件系统中,响应于数据同步请求,实现各个节点之间数据的增量或全量同步,使得数据能够在各个节点之间灵活流动。从而,通过使得不同版本的文件系统之间的数据能够简便的同步,可以控制树状结构中级联的深度,且消除了新创建克隆文件系统带来的代价,在节省了存储空间的同时,还可以提升整个文件系统的管理效率。
图1示出根据本申请一实施例的应用场景的示意图。如图1所示,本申请实施例的文件系统管理方法可用于树状结构的文件管理系统1000。文件管理系统1000可以包括树状结构的根节点对应的文件系统1100(可以称为祖先文件系统),以及通过对祖先文件系统1100进行克隆操作得到的各级克隆文件系统。其中,以文件系统1100为父文件系统进行克隆操作可以创建文件系统1100的子文件系统,例如包括文件系统1110和文件系统1120;该克隆操作还可以包括级联克隆操作(即对父文件系统创建克隆,再对父文件系统的克隆文件系统创建克隆),从而可以创建级联的克隆文件系统,例如包括文件系统1111和文件系统1112(为文件系统1110的子文件系统)和文件系统1121和文件系统1122(为文件系统1120的子文件系统)。
其中,子文件系统可以认为是父文件系统在某个时间点的创建的可读写副本,子文件系统与父文件系统中在该时间点及该时间点之前的数据具有一致性。在树状结构的文件管理系统1000中可以通过使子文件系统以引用父文件系统数据的方式,达到文件系统之间的连接。文件管理系统1000中的各文件系统可以用于AI模型训练、数据挖掘等场景。例如,在AI模型训练的场景中,若需要针对同一源数据利用不同的训练模型进行训练,根据本申请实施例的方法,由于文件系统1121和文件系统1122为基于同一文件系统1120创建的克隆文件系统,可以基于文件系统1121和文件系统1122分别使用不同的训练模型,得到不同的目标结果数据。若需要以目标结果数据作为新的数据源,以进行后续训练,根据本申请实施例的方法,可以通过将目标结果数据同步至树状结构中的其他任意文件系统,从而可以在其他文件系统的基础上进行后续训练,从而无需以目标结果数据作为父文件系统继续创建一个或多个新的子文件系统,由此能够控制住级联的深度。
需要说明的是,图1中仅以3级的级联文件系统为例进行示意,实际上文件管理系统1000还可以包括更多(如8级)或更少的级数的文件系统。图1中示出的文件系统仅作为示例,文件系统也可以以文件、目录等进行替换。也就是说,本申请实施例的方法还可适用于对文件系统中的文件、或是目录等进行管理,本申请对此不作限制。
上述文件管理系统1000可以部署于存储器,该存储器可以是独立的,也可以作为服务器或终端设备中的存储模块,本申请对此不作限制。
本申请涉及的服务器可以位于云端或本地,可以是实体设备,也可以是虚拟设备,如虚拟机、容器等,具有无线通信功能,其中,无线通信功能可设置于该服务器的芯片(系统)或 其他部件或组件。可以是指具有无线连接功能的设备,无线连接的功能是指可以通过Wi-Fi、蓝牙等无线连接方式与其他服务器或终端设备进行连接,本申请的服务器也可以具有有线连接进行通信的功能。
本申请涉及的终端设备可以是指具有无线连接功能的设备,无线连接的功能是指可以通过Wi-Fi、蓝牙等无线连接方式与其他终端设备或服务器进行连接,本申请的终端设备也可以具有有线连接进行通信的功能。本申请的终端设备可以是触屏的、也可以是非触屏的、也可以是没有屏幕的,触屏的可以通过手指、触控笔等在显示屏幕上点击、滑动等方式对终端设备进行控制,非触屏的设备可以连接鼠标、键盘、触控面板等输入设备,通过输入设备对终端设备进行控制,没有屏幕的设备比如说可以是没有屏幕的蓝牙音箱等。举例来说,本申请的终端设备可以是智能手机、上网本、平板电脑、笔记本电脑、可穿戴电子设备(如智能手环、智能手表等)、TV、虚拟现实设备、音响、电子墨水,等等。
需要说明的是,本申请实施例中的文件管理系统1000还可用于其他场景,如应用测试与数据分析、容灾演练和信息技术(information technology,IT)运维等,本申请对此不作限制。
以下通过图2-图11,对本申请实施例的文件系统管理方法进行详细的介绍。
图2示出根据本申请一实施例的文件系统管理方法的流程图。该方法可用于上述文件管理系统1000,如图2所示,该方法包括:
步骤S201,响应于数据同步请求,获取目标文件系统和源文件系统的信息。
其中,目标文件系统和源文件系统可以通过树状结构进行连接,目标文件系统或源文件系统为通过克隆操作创建的文件系统。该树状结构可参见图1所示,目标文件系统和源文件系统可以是文件管理系统1000中的任意文件系统。
目标文件系统的信息和源文件系统的信息可以包括目标文件系统和源文件系统的数据信息、与树状结构内其他文件系统的连接关系信息等。
其中,数据信息可以包括文件系统的标识、文件大小、以及数据在磁盘中的存储位置等信息。参见图3,示出根据本申请一实施例的文件系统的数据布局的示意图。如图3所示,以文件系统1100为例,可包括根节点“/”、目录1(如图中dir1)对应的数据、文件1(如图中file1)对应的数据、文件8(如图中file8)对应的数据、目录2(如图中dir2)对应的数据、文件2(如图中file2)对应的数据、文件3(如图中file3)对应的数据和文件4(如图中file4)对应的数据。其中,file1和file8可包括在dir1内,file2和file3可包括在dir2内,上述各个数据的连接关系可参见图中连线所示。
同样以其中的文件系统1100为例,可以采用对文件系统1100打快照的方式,通过获取文件系统1100在打快照的时刻存储的所有数据,实现克隆操作(包括级联克隆操作),得到文件系统1100的克隆子文件系统(如文件系统1110)。例如,若在打快照的时刻,文件系统1100的数据信息包括dir1、file1、dir2、file2、file3、file4对应的数据,则在该时刻通过克隆操作得到的文件系统1110的数据信息可包括dir1、file1、dir2、file2、file3、file4对应的数据,该文件系统1110可以通过在数据信息中引用文件系统1100的数据信息中dir1、file1、dir2、file2、file3、file4对应的数据,以建立与文件系统1100之间的连接关系(即以文件系统1100为父文件系统、文件系统1110为子文件系统的连接关系)。
通过克隆操作建立文件系统1120与图1所示的树状结构的其他文件系统的方式与上述同 理。
在创建文件系统后,还可以对文件系统中的数据进行处理,对文件系统的数据进行处理的方式可以包括删除、添加、对内容进行修改等。其中,在文件系统中的数据为引用上一级文件系统(即父文件系统)中的数据的情况下,对文件系统的数据进行删除可以通过断开对父文件系统中该数据的引用实现。
参见图4,示出根据本申请一实施例的对文件系统中的数据进行处理的示意图。图4中的数据布局可以对应于通过克隆操作的文件系统1120,在创建文件系统1120时,其数据信息中可包括dir1、file1、dir2、file2、file3、file4对应的数据,如图4所示,以文件系统1120为例,对数据的处理包括:删除file1(如图中以横线划去file1)、添加file5和修改file3的内容(修改后的file3如图中file3’所示)。
参见上述介绍,由于根据同一父文件系统创建各个子文件系统的创建时间可以不同,且在创建各子文件系统后,父文件系统和各子文件系统还可以分别对数据进行处理,从而使得文件系统中的数据可以分化的非常多样和复杂。通过本申请实施例的方法,可以在创建文件系统之后,使得文件系统中的数据能够在各个文件系统之间进行同步,从而使文件系统中的数据流动更加灵活,以满足不同业务场景的需要,以下对数据同步请求的不同情形作详细的介绍。
可选地,该数据同步请求可包括将源文件系统中预定时刻的数据同步至目标文件系统。
其中,上述预定时刻可以包括目标文件系统中的数据和源文件系统中的数据开始存在区别的时刻。从而,可以使目标文件系统中的数据和源文件系统中的数据能够最大化的进行同步,以满足相应的业务需求。源文件系统中预定时刻的数据可以是源文件系统在预定时刻下包括的数据。
根据本申请实施例,通过将源文件系统中预定时刻的数据同步至目标文件系统,可以实现目标文件系统的数据同步至某一时刻,从而实现与源文件系统间数据的流动,满足相应的业务需求。
可选地,该源文件系统可以是目标文件系统在树状结构中的上一级或多级文件系统,该预定时刻包括源文件系统通过克隆操作创建下一级文件系统的时刻。
以图1为例,在三级的树状结构中,在源文件系统为文件系统1100的情况下,目标文件系统可以是文件系统1100的下一级文件系统1110或文件系统1120,也可以是文件系统1110的下一级文件系统1111或文件系统1112,或者是文件系统1120的下一级文件系统1121或文件系统1122。如果在大于三级的树状结构中,目标文件系统还可以是源文件系统的下n级的文件系统,其中n为[1,N]中的正整数,N可以根据树状结构的级数确定。
在源文件系统为文件系统1100且目标文件系统为文件系统1120的情况下,由于文件系统1100与文件系统1120开始存在区别的时刻可以是文件系统1100通过克隆操作创建文件系统1120的时刻,因此,在这种情况下,对应源文件系统通过克隆操作创建下一级文件系统的时刻可以是文件系统1100创建文件系统1120的时刻。从而,可以根据该预定时刻将文件系统1100中的数据同步至文件系统1120,使得文件系统1120中的数据与文件系统1120创建时的数据一致。这种场景下相当于实现在文件系统1120中进行数据回退。
在源文件系统为文件系统1100且目标文件系统为文件系统1121的情况下,由于文件系统1100与文件系统1121开始存在区别的时刻可以是文件系统1100通过克隆操作创建文件系 统1120的时刻,因此,在这种情况下,对应源文件系统通过克隆操作创建下一级文件系统的时刻可以是文件系统1100创建文件系统1120的时刻。从而,可以根据该预定时刻将文件系统1100中的数据同步至文件系统1121,使得文件系统1121中的数据与文件系统1120创建时的数据一致。这种场景下相当于实现文件系统1121进行数据跨级回退。
根据本申请实施例,通过将源文件系统中,通过克隆操作创建下一级文件系统时的数据同步至目标文件系统,可以使得目标文件系统的数据能够回退至预定时刻,从而在数据灵活流动的同时,在相应的业务场景之下,无需增加级联的深度,即可基于回退后的目标文件系统继续进行相应业务操作,简化了业务流程,提高了效率。
可选地,该数据同步请求可包括将源文件系统中预定时刻后的数据修改同步至目标文件系统。
其中,源文件系统中预定时刻后的数据修改可以包括源文件系统中在预定时刻至当前时刻内对数据进行的修改,在对修改进行了同步之后,目标文件系统和源文件系统的数据将一致。
该修改可以认为是上述图4中对数据的处理,包括对数据的删除、添加和对数据的内容进行修改等。
在同步数据修改的情况下,目标文件系统和源文件系统可以是树状结构中的任意文件系统,可以是同级的文件系统,也可以是跨级的文件系统。
根据本申请实施例,通过将源文件系统中预定时刻后的数据修改同步至目标文件系统,可以使得文件系统间数据的流动更加灵活,在相应的业务场景之下,无需增加级联的深度,即可基于同步了数据修改后的目标文件系统继续进行相应业务操作,简化了业务流程,提高了效率。
步骤S202,根据目标文件系统和源文件系统的信息,将源文件系统中的数据全量或增量同步至目标文件系统。
其中,进行增量同步或全量同步可以响应于数据同步请求确定。增量同步可以理解为源文件系统仅将预定时刻或预定时刻之后的数据同步至目标文件系统,目标文件系统中预定时刻以前的数据仍可以引用上一级文件系统中数据的方式存在;全量同步可以理解为在进行增量同步时,源文件系统还将预定时刻以前的数据同步至目标文件系统,使得目标文件系统中预定时刻以前的数据可无需以引用上一级文件系统中数据的方式存在,从而在全量同步之后,目标文件系统可以选择断开与上一级文件系统在树状结构中的连接关系。
根据本申请实施例,能够实现在基于树状结构创建的级联的克隆文件系统中,响应于数据同步请求,实现各个节点之间数据的增量或全量同步,使得数据能够在各个节点之间灵活流动。从而,通过使得不同版本的文件系统之间的数据能够简便的同步,可以控制树状结构中级联的深度,且消除了新创建克隆文件系统带来的代价,在节省了存储空间的同时,还可以提升整个文件系统的管理效率。
以下结合步骤S201中示出的数据同步请求的不同情形,对将源文件系统中的数据全量或增量同步至目标文件系统的方式作详细介绍。
其中,上述预定时刻可以通过文件系统的信息中的相关标识信息来指示。
可选地,目标文件系统和源文件系统的信息,可包括以下中的一项或多项:
引用的上一级文件系统的信息、指示创建时刻的第一标识、指示当前时刻的第二标识。
这些信息可以作为上述信息中与树状结构内其他文件系统的连接关系信息。其中,引用的上一级文件系统的信息可以用于指示该文件系统的父文件系统,例如为父文件系统的标识;指示创建时刻的第一标识可以是父文件系统创建该文件系统时,该文件系统引用的数据对应的版本号;指示当前时刻的第二标识可以是该文件系统当前的数据对应的版本号。
根据本申请实施例,通过在文件系统的信息中包括引用的上一级文件系统的信息、指示创建时刻的第一标识、指示当前时刻的第二标识,可以响应于数据同步请求,实现文件系统之间的数据灵活同步,从而可以减少管理代价,提升对文件系统的管理效率。
可选地,该文件系统对应的第一标识可以根据文件系统的上一级文件系统(即父文件系统)在通过克隆操作创建该文件系统时对应的第二标识确定。该文件系统对应的第二标识在创建时刻可以与第一标识一致,在创建了该文件系统之后,若文件系统对数据进行了修改,修改后的数据的版本号可以在创建时刻数据对应的版本号的基础上递增,在递增后可相应的更新第二标识,以递增后的版本号作为该文件系统的新的第二标识。由此,可以更加准确地记录文件系统中的数据变化,以方便文件系统之间的数据同步。
除上述信息之外,文件系统的信息中的数据信息还可包括文件系统在创建之后的每个版本中对数据进行修改的内容。
图5示出根据本申请一实施例的文件系统的信息的示意图。图中以文件系统1100、文件系统1110和文件系统1120为例,对文件系统中包括的信息进行介绍。
如图5所示,父文件系统的标识可以表示上述引用的上一级文件系统的信息。文件系统1100对应的父文件系统的标识为NULL(空)可以表示该文件系统1100为树状结构中的祖先文件系统,也就是说文件系统1100不引用其他文件系统的信息,其上一级不存在其他文件系统;文件系统1110和文件系统1120对应的父文件系统的标识为1100,可以表示文件系统1110和文件系统1120均为文件系统1100的下一级子文件系统。
文件系统1100的第一标识为0可以表示文件系统1100创建时的版本(version)号为0;文件系统1110的第一标识为1可以表示文件系统1110创建时的版本号为1,其在创建时引用了文件系统1100中对应版本号为1的数据;文件系统1120的第一标识为2可以表示文件系统1120创建时的版本号为2,其在创建时引用了文件系统1100中对应版本号为2的数据。
文件系统1100的第二标识为3可以表示文件系统1100当前的版本号为3,其在创建后进行了3个版本的修改;文件系统1110的第二标识为2可以表示文件系统1110当前的版本号为2,其在创建后进行了1个版本的修改;文件系统1120的第二标识为3可以表示文件系统1120当前的版本号为3,其在创建后进行了1个版本的修改。
以下通过表1-表3示出各文件系统在创建之后每个版本中的修改内容。其中,ver1(对应版本号为1)、ver2(对应版本号为2)、ver3(对应版本号为3)可以分别表示不同的版本。对于文件系统1100,其在创建之后每个版本中的修改内容可参见表1:
表1
参见表1,文件系统1100在ver1中的修改包括创建根节点目录(如图中“/”)、添加dir1、dir2、file1、file2、file3和file4,在ver2中的修改包括添加file8。
对于文件系统1110,根据第一标识的指示,其在创建后引用了文件系统1100中ver1对 应的数据,包括dir1、dir2、file1、file2、file3和file4,在此基础上,文件系统1110在创建之后每个版本中的修改内容可参见表2:
表2
参见表2,文件系统1110在其ver2中的修改包括删除file4(可以通过断开对文件系统1100中file4的引用实现),经过ver2的修改,文件系统1110中的数据包括dir1、dir2、file1、file2和file3。
对于文件系统1120,根据第一标识的指示,其在创建后引用了文件系统1100中ver2对应的数据,包括dir1、dir2、file1、file2、file3、file4和file8,在此基础上,文件系统1120创建之后每个版本中的修改内容可参见表3:
表3
参见表3,文件系统1120在其ver3中的修改包括删除file1(可以通过断开对文件系统1100中file1的引用实现)和添加file5,经过ver3的修改,文件系统1120中的数据包括dir1、dir2、file2、file3、file4和file5。
以下在图5的基础上对实现数据全量或增量同步的方式作详细介绍。
图6示出根据本申请一实施例的文件系统管理方法的流程图。如图6所示,在全量同步或增量同步的情况下,该步骤S202,可包括:
步骤S2021,根据目标文件系统和/或源文件系统分别对应的引用的上一级文件系统的信息,确定指示预定时刻的第三标识。
其中,可以根据目标文件系统和/或源文件系统分别对应的引用的上一级文件系统的信息,确定目标文件系统与源文件系统中的数据在开始存在区别前的最后一个版本,以该版本的版本号作为第三标识。
在数据同步请求为将源文件系统中预定时刻的数据同步至目标文件系统的情况下,以下通过图7-图8,对步骤S2021的过程进行说明。
源文件系统可以是目标文件系统的父文件系统,即源文件系统与目标文件系统为相邻上下级的文件系统,其示例可参见图7,示出根据本申请一实施例的文件系统之间进行数据同步的示意图。如图7所示,源文件系统为文件系统1100,目标文件系统为文件系统1120,图中箭头指向的方向可表示数据同步的方向。
在这种情况下,预定时刻可以是文件系统1100通过克隆操作创建文件系统1120的时刻,相当于将目标文件系统(即文件系统1120)中的数据版本回退至出生时刻。可选地,该步骤S2021,可包括:
在根据目标文件系统对应的引用的上一级文件系统的信息,确定源文件系统为目标文件系统的上一级文件系统的情况下,可以以目标文件系统对应的第一标识作为第三标识。
例如,根据文件系统1120对应的引用的上一级文件系统的信息(如图中父文件系统的标识)为文件系统1100,可以确定源文件系统与目标文件系统为父子关系,则第三标识可以是 文件系统1120对应的第一标识,即ver2,表示文件系统1100通过克隆操作创建文件系统1120时(可以称为文件系统1120的出生时刻)文件系统1120的版本为ver2。
源文件系统还可以是目标文件系统的父文件系统的上一级或多级文件系统,即源文件系统与目标文件系统为跨级的文件系统,其示例可参见图8,示出根据本申请一实施例的文件系统之间进行数据同步的示意图。如图8所示,源文件系统为文件系统1100,目标文件系统为文件系统1121,图中箭头指向的方向可表示数据同步的方向。
在这种情况下,预定时刻可以是文件系统1100通过克隆操作创建文件系统1120的时刻,相当于将目标文件系统(即文件系统1121)中的数据版本跨级回退至文件系统1120的出生时刻。可选地,该步骤S2021,可包括:
在根据目标文件系统对应的引用的上一级文件系统的信息,确定源文件系统为目标文件系统的上两级或两级以上文件系统的情况下,以源文件系统的下一级文件系统对应的第一标识作为第三标识。
例如,可以通过目标文件系统(即文件系统1121)对应的引用的上一级文件系统的信息,逐级向上查询,直至查询到引用的上一级文件系统的信息指示源文件系统(即文件系统1100)时,确定此时源文件系统为目标文件系统的上两级或两级(此处为两级)以上文件系统,则可以以源文件系统的下一级文件系统对应的第一标识作为第三标识。则第三标识可以是文件系统1120对应的第一标识,即ver2,也即表示在ver2之后,文件系统1100与文件系统1121中的数据开始存在区别。
在数据同步请求为将源文件系统中预定时刻后的数据修改同步至目标文件系统的情况下,以下通过图7-图11,对步骤S2021的过程进行说明。
其中,在源文件系统为目标文件系统的父文件系统的情况下,确定第三标识的过程可同图7中示意的过程;在源文件系统为目标文件系统的跨级文件系统,即父文件系统的上一级或多级文件系统的情况下,确定第三标识的过程可同图8中示意的过程。
目标文件系统还可以是源文件系统的父文件系统,即目标文件系统与源文件系统为相邻上下级的文件系统,其示例可参见图9,示出根据本申请一实施例的文件系统之间进行数据同步的示意图。如图9所示,目标文件系统为文件系统1100,源文件系统为文件系统1120,图中箭头指向的方向可表示数据同步的方向。
在这种情况下,相当于将下一级文件系统中的数据修改反向同步至上一级文件系统中。此时,预定时刻可以包括文件系统1100与文件系统1120中的数据开始存在区别的时刻。可选地,该步骤S2021,可包括:
在根据源文件系统对应的引用的上一级文件系统的信息,确定目标文件系统为源文件系统的上一级文件系统的情况下,以源文件系统对应的第一标识作为第三标识。
例如,根据文件系统1120对应的引用的上一级文件系统的信息(如图中父文件系统的标识)为文件系统1100,可以确定目标文件系统与源文件系统为父子关系,则第三标识可以是源文件系统即文件系统1120对应的第一标识,即ver2,表示从版本号2开始,文件系统1100与文件系统1120的数据开始存在区别。
目标文件系统还可以是源文件系统的父文件系统的上一级或多级文件系统,即目标文件系统与源文件系统为跨级的文件系统,其示例可参见图10,示出根据本申请一实施例的文件系统之间进行数据同步的示意图。如图10所示,目标文件系统为文件系统1100,源文件系 统为文件系统1121,图中箭头指向的方向可表示数据同步的方向。
在这种情况下,相当于将下级文件系统中的数据跨级修改反向同步至上级文件系统中。此时,预定时刻可以包括文件系统1100与文件系统1121中的数据开始存在区别的时刻。可选地,该步骤S2021,可包括:
在根据源文件系统对应的引用的上一级文件系统的信息,确定目标文件系统为源文件系统的上两级或两级以上文件系统的情况下,以目标文件系统的下一级文件系统对应的第一标识作为第三标识。
例如,可以通过源文件系统(即文件系统1121)对应的引用的上一级文件系统的信息逐级向上查询,直至查询到引用的上一级文件系统的信息指示源文件系统(即文件系统1100)时,确定此时目标文件系统为源文件系统的上两级或两级(此处为两级)以上文件系统,则可以以目标文件系统的下一级文件系统对应的第一标识作为第三标识。则第三标识可以是文件系统1120对应的第一标识,即ver2,表示从版本号2开始,文件系统1100与文件系统1121中的数据开始存在区别。
目标文件系统和源文件系统还可以是树状结构的文件系统中不同子树下的文件系统,其示例可参见图11,示出根据本申请一实施例的文件系统之间进行数据同步的示意图。如图11所示,目标文件系统为文件系统1110,源文件系统为文件系统1121,图中箭头指向的方向可表示数据同步的方向。
在这种情况下,相当于文件系统中的数据修改可以同步至任意其它文件系统中。此时,预定时刻可以包括文件系统1110与文件系统1121中的数据开始存在区别的时刻。可选地,该步骤S2021,可包括:
在根据源文件系统和目标文件系统分别对应的引用的上一级文件系统的信息,确定源文件系统和目标文件系统存在共同的根节点对应的文件系统的情况下,根据根节点对应的文件系统的下一级文件系统对应的第一标识,确定第三标识。
例如,可以通过源文件系统(即文件系统1121)对应的引用的上一级文件系统的信息逐级向上查询,且通过目标文件系统(即文件系统1110)对应的引用的上一级文件系统的信息逐级向上查询,直至查询到二者引用的上一级文件系统的信息指示的文件系统为同一文件系统(即文件系统1100)时,确定源文件系统和目标文件系统存在共同的根节点对应的文件系统(即文件系统1100),则可以根据根节点对应的文件系统的下一级文件系统对应的第一标识,确定第三标识。此时,可以根据文件系统1100的下一级文件系统(包括文件系统1110和文件系统1120),以文件系统1110和文件系统1120中对应第一标识中值更小的版本号作为第三标识,即ver1(如图,为文件系统1110对应的第一标识),表示从版本号1开始,文件系统1110与文件系统1121的数据开始存在区别。
目标文件系统为文件系统1121,源文件系统为文件系统1110的情况可参照上述,同理。
在确定了第三标识之后,可以根据第三标识在源文件系统与目标文件系统之间进行数据同步,参见下述,其中,在增量或全量同步的场景中,可以首先对目标文件系统中第三标识后的数据进行处理。
步骤S2022,将源文件系统中目标文件系统在第三标识之后修改的数据写入目标文件系统。
其中,可以扫描目标文件系统中在第三标识后存在修改的数据,并在源文件系统中读取 相应的数据写入目标文件系统中,作为目标文件系统最新版本的修改。
以图7为例,文件系统1120在ver2后对数据的修改可参见表3,即在ver3中删除file1和添加file5。则可以在文件系统1100中读取file1和file5的数据并写入文件系统1120,作为文件系统1120的ver4的修改,其中参见表1可知,文件系统1100中file1有数据,则可以直接读出file1数据并写入文件系统1120中,而文件系统1100中不存在file5,则可以读出全0写入文件系统1120中file5的相应位置(相当于在文件系统1120中删除file5)。
其中,在数据同步请求为将源文件系统中预定时刻的数据同步至目标文件系统的情况下,将源文件系统中目标文件系统在第三标识之后修改的数据写入目标文件系统后,可以完成增量的同步,也就是说,目标文件系统中第三标识以前的数据还是引用父文件系统中数据,目标文件系统与源文件系统仍然通过树状结构相连接。
在数据同步请求为将源文件系统中预定时刻的数据同步至目标文件系统的情况下,全量同步的情况可参见后述步骤S2024及步骤S203中的叙述。
根据本申请实施例,通过确定指示预定时刻的第三标识,并将源文件系统中目标文件系统在第三标识之后修改的数据写入目标文件系统,可以使目标文件系统中的数据回退至与源文件系统中的数据开始产生区别的时刻,从而可以更好的实现文件系统之间数据的同步,满足不同版本间数据简便快速流动的需求。
可选地,在数据同步请求为将源文件系统中预定时刻后的数据修改同步至目标文件系统的情况下,除了执行上述步骤S2021-步骤S2022,参见图6,该步骤S202,还可包括:
步骤S2023,将源文件系统中在第三标识后修改的数据写入目标文件系统。
其中,可以在源文件系统中读取第三标识后存在修改的数据并写入目标文件系统中,作为目标文件系统最新版本的修改。
以图7为例,文件系统1100在ver2后对数据的修改可参见表1,即在ver3中添加file8。则可以在文件系统1100中读取file8的数据并写入文件系统1120,作为文件系统1120的ver4的修改。
其中,在数据同步请求为将源文件系统中预定时刻后的数据修改同步至目标文件系统的情况下,将源文件系统中在第三标识之后修改的数据写入目标文件系统后,可以完成增量的同步,也就是说,目标文件系统中第三标识以前的数据还是引用父文件系统中数据,目标文件系统与源文件系统仍然通过树状结构相连接。
在数据同步请求为将源文件系统中预定时刻后的数据修改同步至目标文件系统的情况下,全量同步的情况可参见后述步骤S2024及步骤S203中的叙述。
根据本申请实施例,通过将源文件系统中在第三标识之后修改的数据写入目标文件系统,可以在增量同步的情况下,完成文件系统之间数据修改的同步,从而可以满足不同版本间数据简便快速流动的需求。
可选地,若数据同步请求中指示目标文件系统与源文件系统中的同步方式为全量同步,此时源文件系统可以是目标文件系统在树状结构中的上一级或多级文件系统,通过全量同步的方式,能够使目标文件系统能够断开与上一级文件系统的连接,成为独立的文件系统。在此场景下,参见图6,该步骤S202,还可包括:
步骤S2024,将源文件系统中在第三标识及第三标识前的数据写入目标文件系统。
其中,可以在源文件系统中读取第三标识及点标识前的全部数据并写入目标文件系统中。 如上述图7、图8所示的场景可适用全量同步的方式。
以图7为例,文件系统1100在ver2及ver2前的全部数据,可参见表1中ver2及ver2前的数据修改确定,即在ver1中在文件系统1100中添加“/”、dir1、dir2、file1、file2、file3,在ver2中添加file4,可知,文件系统1100在ver2及ver2前的全部数据包括“/”、dir1、dir2、file1、file2、file3、file4。则可以在文件系统1100中读取“/”、dir1、dir2、file1、file2、file3、file4的数据并写入文件系统1120。
在此情况下,由于在步骤S2024之前,文件系统1120中ver2及ver2之前的数据可以通过引用父文件系统中的数据实现,通过将ver2及ver2之前的数据重新写入目标文件系统,即文件系统1120,则文件系统1120中可以无需再引用父文件系统中的数据,可以通过后续步骤断开目标文件系统与其上一级文件系统之间的连接,从而可以实现数据的全量同步。
返回参见图2,在全量同步的场景中,该方法还可包括:
步骤S203,断开目标文件系统和目标文件系统在树状结构中的上一级文件系统之间的连接关系。
通过断开目标文件系统和目标文件系统在树状结构中的上一级文件系统之间的连接关系,可以使得目标文件系统成为独立的文件系统,即称为非克隆的普通文件系统,后续还可以以该目标文件系统作为根节点对应的文件系统,通过克隆操作,创建新的树状结构的克隆文件系统。
根据本申请实施例,通过将源文件系统中在第三标识及第三标识前的数据写入目标文件系统,可以完成文件系统之间数据的全量同步,通过断开目标文件系统与目标文件系统在树状结构中的上一级文件系统之间的连接关系,可以在全量同步后使得目标文件系统成为独立的非克隆普通文件系统,由此可以控制树状结构中级联的深度,消除了新创建克隆文件系统带来的配置代价,可以提升文件系统的管理效率。
可选地,参见图6,该步骤S203,可包括:
步骤S2031,将目标文件系统对应的第一标识和引用的上一级文件系统的信息置为空。
例如,可以将目标文件系统中父文件系统的标识置为NULL,表示目标文件系统不引用其他文件系统的信息;且将目标文件系统对应的第一标识置为0,表示目标文件系统创建时的版本号为0。从而可以实现将目标文件系统变为非克隆的普通文件系统。
根据本申请实施例,通过将目标文件系统对应的引用的上一级文件系统的信息和第一标识置为空,可以实现在全量同步的场景中,断开目标文件系统与目标文件系统在树状结构中的上一级文件系统之间的连接关系,使得目标文件系统成为独立的非克隆普通文件系统,由此可以控制树状结构中级联的深度,消除了新创建克隆文件系统带来的配置代价。
图12示出根据本申请一实施例的文件系统管理装置的结构图。如图12所示,该装置可包括:
获取模块1201,用于响应于数据同步请求,获取目标文件系统和源文件系统的信息。
数据同步模块1202,用于根据目标文件系统和源文件系统的信息,将源文件系统中的数据全量或增量同步至目标文件系统。
其中,目标文件系统和源文件系统通过树状结构进行连接,目标文件系统或源文件系统为通过克隆操作创建的文件系统。
根据本申请实施例,能够实现在基于树状结构创建的级联的克隆文件系统中,响应于数 据同步请求,实现各个节点之间数据的增量或全量同步,使得数据能够在各个节点之间灵活流动。从而,通过使得不同版本的文件系统之间的数据能够简便的同步,可以控制树状结构中级联的深度,且消除了新创建克隆文件系统带来的代价,在节省了存储空间的同时,还可以提升整个文件系统的管理效率。
可选地,数据同步请求可包括将源文件系统中预定时刻的数据同步至目标文件系统。
根据本申请实施例,通过将源文件系统中预定时刻的数据同步至目标文件系统,可以实现目标文件系统的数据同步至某一时刻,从而实现与源文件系统间数据的流动,满足相应的业务需求。
可选地,数据同步请求可包括将源文件系统中预定时刻后的数据修改同步至目标文件系统。
根据本申请实施例,通过将源文件系统中预定时刻后的数据修改同步至目标文件系统,可以使得文件系统间数据的流动更加灵活,在相应的业务场景之下,无需增加级联的深度,即可基于同步了数据修改后的目标文件系统继续进行相应业务操作,简化了业务流程,提高了效率。
可选地,预定时刻包括目标文件系统中的数据和源文件系统中的数据开始存在区别的时刻。
根据本申请实施例,可以使目标文件系统中的数据和源文件系统中的数据能够最大化的进行同步,以满足相应的业务需求。
可选地,源文件系统为目标文件系统在树状结构中的上一级或多级文件系统,预定时刻包括源文件系统通过克隆操作创建下一级文件系统的时刻。
根据本申请实施例,通过将源文件系统中,通过克隆操作创建下一级文件系统时的数据同步至目标文件系统,可以使得目标文件系统的数据能够回退至预定时刻,从而在数据灵活流动的同时,在相应的业务场景之下,无需增加级联的深度,即可基于回退后的目标文件系统继续进行相应业务操作,简化了业务流程,提高了效率。
可选地,目标文件系统和源文件系统的信息,包括以下中的一项或多项:
引用的上一级文件系统的信息、指示创建时刻的第一标识、指示当前时刻的第二标识。
根据本申请实施例,通过在文件系统的信息中包括引用的上一级文件系统的信息、指示创建时刻的第一标识、指示当前时刻的第二标识,可以响应于数据同步请求,实现文件系统之间的数据灵活同步,从而可以减少管理代价,提升对文件系统的管理效率。
可选地,文件系统对应的第一标识根据文件系统的上一级文件系统在通过克隆操作创建文件系统时对应的第二标识确定。
根据本申请实施例,可以更加准确地记录文件系统中的数据变化,以方便文件系统之间的数据同步。
可选地,该数据同步模块1202,用于:
根据目标文件系统和/或源文件系统分别对应的引用的上一级文件系统的信息,确定指示预定时刻的第三标识;
将源文件系统中目标文件系统在第三标识之后修改的数据写入目标文件系统。
根据本申请实施例,通过确定指示预定时刻的第三标识,并将源文件系统中目标文件系统在第三标识之后修改的数据写入目标文件系统,可以使目标文件系统中的数据回退至与源 文件系统中的数据开始产生区别的时刻,从而可以更好的实现文件系统之间数据的同步,满足不同版本间数据简便快速流动的需求。
可选地,根据目标文件系统和/或源文件系统分别对应的引用的上一级文件系统的信息,确定指示预定时刻的第三标识,包括以下中的至少一种:
在根据目标文件系统对应的引用的上一级文件系统的信息,确定源文件系统为所述目标文件系统的上一级文件系统的情况下,以目标文件系统对应的第一标识作为第三标识;
在根据目标文件系统对应的引用的上一级文件系统的信息,确定源文件系统为目标文件系统的上两级或两级以上文件系统的情况下,以源文件系统的下一级文件系统对应的第一标识作为第三标识;
在根据源文件系统对应的引用的上一级文件系统的信息,确定目标文件系统为源文件系统的上一级文件系统的情况下,以源文件系统对应的第一标识作为第三标识;
在根据源文件系统对应的引用的上一级文件系统的信息,确定目标文件系统为源文件系统的上两级或两级以上文件系统的情况下,以目标文件系统的下一级文件系统对应的第一标识作为第三标识;
在根据源文件系统和目标文件系统分别对应的引用的上一级文件系统的信息,确定源文件系统和目标文件系统存在共同的根节点对应的文件系统的情况下,根据根节点对应的文件系统的下一级文件系统对应的第一标识,确定第三标识。
根据本申请实施例,通过在不同的情况下,分别确定第三标识,可以使树状结构中任意两个文件系统之间的数据能够灵活同步,以满足相应业务的需求。
可选地,在数据同步请求为将源文件系统中预定时刻后的数据修改同步至目标文件系统的情况下,该数据同步模块1202,还用于:
将源文件系统中在第三标识后修改的数据写入目标文件系统。
根据本申请实施例,通过将源文件系统中在第三标识之后修改的数据写入目标文件系统,可以在增量同步的情况下,完成文件系统之间数据修改的同步,从而可以满足不同版本间数据简便快速流动的需求。
可选地,该数据同步模块1202,还用于:
将源文件系统中在第三标识及第三标识前的数据写入目标文件系统;
该装置还包括:
断开模块,用于断开目标文件系统和目标文件系统在树状结构中的上一级文件系统之间的连接关系。
根据本申请实施例,通过将源文件系统中在第三标识及第三标识前的数据写入目标文件系统,可以完成文件系统之间数据的全量同步,通过断开目标文件系统与目标文件系统在树状结构中的上一级文件系统之间的连接关系,可以在全量同步后使得目标文件系统成为独立的非克隆普通文件系统,由此可以控制树状结构中级联的深度,消除了新创建克隆文件系统带来的配置代价,可以提升文件系统的管理效率。
可选地,该断开模块,用于:
将目标文件系统对应的第一标识和引用的上一级文件系统的信息置为空。
根据本申请实施例,通过将目标文件系统对应的引用的上一级文件系统的信息和第一标识置为空,可以实现在全量同步的场景中,断开目标文件系统与目标文件系统在树状结构中 的上一级文件系统之间的连接关系,使得目标文件系统成为独立的非克隆普通文件系统,由此可以控制树状结构中级联的深度,消除了新创建克隆文件系统带来的配置代价。
本申请的实施例提供了一种文件系统管理装置,包括:处理器以及用于存储处理器可执行指令的存储器;其中,所述处理器被配置为执行所述指令时实现上述方法。
本申请的实施例提供了一种终端设备,该终端设备可以执行上述文件系统管理方法。
本申请的实施例提供了一种非易失性计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。
本申请的实施例提供了一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行上述方法。
图13示出根据本申请一实施例的电子设备1300的结构图。如图13所示,该电子设备1300可以是上述文件管理系统1000。该电子设备1300包括至少一个处理器1801,至少一个存储器1802、至少一个通信接口1803。此外,该电子设备还可以包括天线等通用部件,在此不再详述。
下面结合图13对电子设备1300的各个构成部件进行具体的介绍。
处理器1801可以是通用中央处理器(CPU),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制以上方案程序执行的集成电路。处理器1801可以包括一个或多个处理单元,例如:处理器1801可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
通信接口1803,用于与其他电子设备或通信网络通信,如以太网,无线接入网(RAN),核心网,无线局域网(Wireless Local Area Networks,WLAN)等。
存储器1802可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(ElectricallyErasable Programmable Read-Only Memory,EEPROM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过总线与处理器相连接。存储器也可以和处理器集成在一起。该存储器可用于存储上述文件系统。
其中,所述存储器1802用于存储执行以上方案的应用程序代码,并由处理器1801来控制执行。所述处理器1801用于执行所述存储器1802中存储的应用程序代码。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计 算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(Random Access Memory,RAM)、只读存储器(Read Only Memory,ROM)、可擦式可编程只读存储器(Electrically Programmable Read-Only-Memory,EPROM或闪存)、静态随机存取存储器(Static Random-Access Memory,SRAM)、便携式压缩盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、数字多功能盘(Digital Video Disc,DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。
这里所描述的计算机可读程序指令或代码可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。
用于执行本申请操作的计算机程序指令可以是汇编指令、指令集架构(Instruction Set Architecture,ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(Local Area Network,LAN)或广域网(Wide Area Network,WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或可编程逻辑阵列(Programmable Logic Array,PLA),该电子电路可以执行计算机可读程序指令,从而实现本申请的各个方面。
这里参照根据本申请实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本申请的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机 实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。
附图中的流程图和框图显示了根据本申请的多个实施例的装置、系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。
也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行相应的功能或动作的硬件(例如电路或ASIC(Application Specific Integrated Circuit,专用集成电路))来实现,或者可以用硬件和软件的组合,如固件等来实现。
尽管在此结合各实施例对本发明进行了描述,然而,在实施所要求保护的本发明过程中,本领域技术人员通过查看所述附图、公开内容、以及所附权利要求书,可理解并实现所述公开实施例的其它变化。在权利要求中,“包括”(comprising)一词不排除其他组成部分或步骤,“一”或“一个”不排除多个的情况。单个处理器或其它单元可以实现权利要求中列举的若干项功能。相互不同的从属权利要求中记载了某些措施,但这并不表示这些措施不能组合起来产生良好的效果。
以上已经描述了本申请的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。

Claims (27)

  1. 一种文件系统管理方法,其特征在于,所述方法包括:
    响应于数据同步请求,获取目标文件系统和源文件系统的信息;
    根据所述目标文件系统和所述源文件系统的信息,将所述源文件系统中的数据全量或增量同步至目标文件系统;
    其中,所述目标文件系统和所述源文件系统通过树状结构进行连接,所述目标文件系统或所述源文件系统为通过克隆操作创建的文件系统。
  2. 根据权利要求1所述的方法,其特征在于,所述数据同步请求包括将所述源文件系统中预定时刻的数据同步至所述目标文件系统。
  3. 根据权利要求1或2所述的方法,其特征在于,所述数据同步请求包括将源文件系统中预定时刻后的数据修改同步至目标文件系统。
  4. 根据权利要求2或3所述的方法,其特征在于,所述预定时刻包括所述目标文件系统中的数据和所述源文件系统中的数据开始存在区别的时刻。
  5. 根据权利要求2或3所述的方法,其特征在于,所述源文件系统为所述目标文件系统在树状结构中的上一级或多级文件系统,所述预定时刻包括源文件系统通过克隆操作创建下一级文件系统的时刻。
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述目标文件系统和源文件系统的信息,包括以下中的一项或多项:
    引用的上一级文件系统的信息、指示创建时刻的第一标识、指示当前时刻的第二标识。
  7. 根据权利要求6的所述的方法,其特征在于,文件系统对应的所述第一标识根据所述文件系统的上一级文件系统在通过克隆操作创建所述文件系统时对应的所述第二标识确定。
  8. 根据权利要求6或7所述的方法,其特征在于,所述根据所述目标文件系统和所述源文件系统的信息,将所述源文件系统中的数据全量或增量同步至目标文件系统,包括:
    根据所述目标文件系统和/或所述源文件系统分别对应的所述引用的上一级文件系统的信息,确定指示所述预定时刻的第三标识;
    将所述源文件系统中所述目标文件系统在所述第三标识之后修改的数据写入所述目标文件系统。
  9. 根据权利要求8所述的方法,其特征在于,所述根据所述目标文件系统和/或所述源文件系统分别对应的所述引用的上一级文件系统的信息,确定指示所述预定时刻的第三标识, 包括以下中的至少一种:
    在根据所述目标文件系统对应的所述引用的上一级文件系统的信息,确定所述源文件系统为所述目标文件系统的上一级文件系统的情况下,以所述目标文件系统对应的第一标识作为所述第三标识;
    在根据所述目标文件系统对应的所述引用的上一级文件系统的信息,确定所述源文件系统为所述目标文件系统的上两级或两级以上文件系统的情况下,以所述源文件系统的下一级文件系统对应的第一标识作为所述第三标识;
    在根据所述源文件系统对应的所述引用的上一级文件系统的信息,确定所述目标文件系统为所述源文件系统的上一级文件系统的情况下,以所述源文件系统对应的第一标识作为所述第三标识;
    在根据所述源文件系统对应的所述引用的上一级文件系统的信息,确定所述目标文件系统为所述源文件系统的上两级或两级以上文件系统的情况下,以所述目标文件系统的下一级文件系统对应的第一标识作为所述第三标识;
    在根据所述源文件系统和所述目标文件系统分别对应的所述引用的上一级文件系统的信息,确定所述源文件系统和所述目标文件系统存在共同的根节点对应的文件系统的情况下,根据所述根节点对应的文件系统的下一级文件系统对应的第一标识,确定所述第三标识。
  10. 根据权利要求8或9所述的方法,其特征在于,在所述数据同步请求为将源文件系统中预定时刻后的数据修改同步至目标文件系统的情况下,所述根据所述目标文件系统和所述源文件系统的信息,将所述源文件系统中的数据全量或增量同步至目标文件系统,还包括:
    将所述源文件系统中在所述第三标识后修改的数据写入所述目标文件系统。
  11. 根据权利要求8-10任一项所述的方法,其特征在于,根据所述目标文件系统和所述源文件系统的信息,将所述源文件系统中的数据全量同步至目标文件系统,还包括:
    将所述源文件系统中在所述第三标识及所述第三标识前的数据写入所述目标文件系统;
    所述方法还包括:
    断开所述目标文件系统和所述目标文件系统在所述树状结构中的上一级文件系统之间的连接关系。
  12. 根据权利要求11所述的方法,其特征在于,所述断开所述目标文件系统和所述目标文件系统在所述树状结构中的上一级文件系统之间的连接关系,包括:
    将所述目标文件系统对应的所述第一标识和所述引用的上一级文件系统的信息置为空。
  13. 一种文件系统管理装置,其特征在于,所述装置包括:
    获取模块,用于响应于数据同步请求,获取目标文件系统和源文件系统的信息;
    数据同步模块,用于根据所述目标文件系统和所述源文件系统的信息,将所述源文件系统中的数据全量或增量同步至目标文件系统;
    其中,所述目标文件系统和所述源文件系统通过树状结构进行连接,所述目标文件系统或所述源文件系统为通过克隆操作创建的文件系统。
  14. 根据权利要求13所述的装置,其特征在于,所述数据同步请求包括将所述源文件系统中预定时刻的数据同步至所述目标文件系统。
  15. 根据权利要求13或14所述的装置,其特征在于,所述数据同步请求包括将源文件系统中预定时刻后的数据修改同步至目标文件系统。
  16. 根据权利要求14或15所述的装置,其特征在于,所述预定时刻包括所述目标文件系统中的数据和所述源文件系统中的数据开始存在区别的时刻。
  17. 根据权利要求14或15所述的装置,其特征在于,所述源文件系统为所述目标文件系统在树状结构中的上一级或多级文件系统,所述预定时刻包括源文件系统通过克隆操作创建下一级文件系统的时刻。
  18. 根据权利要求13-17任一项所述的装置,其特征在于,所述目标文件系统和源文件系统的信息,包括以下中的一项或多项:
    引用的上一级文件系统的信息、指示创建时刻的第一标识、指示当前时刻的第二标识。
  19. 根据权利要求18的所述的装置,其特征在于,文件系统对应的所述第一标识根据所述文件系统的上一级文件系统在通过克隆操作创建所述文件系统时对应的所述第二标识确定。
  20. 根据权利要求18或19所述的装置,其特征在于,所述数据同步模块,用于:
    根据所述目标文件系统和/或所述源文件系统分别对应的所述引用的上一级文件系统的信息,确定指示所述预定时刻的第三标识;
    将所述源文件系统中所述目标文件系统在所述第三标识之后修改的数据写入所述目标文件系统。
  21. 根据权利要求20所述的装置,其特征在于,所述根据所述目标文件系统和/或所述源文件系统分别对应的所述引用的上一级文件系统的信息,确定指示所述预定时刻的第三标识,包括以下中的至少一种:
    在根据所述目标文件系统对应的所述引用的上一级文件系统的信息,确定所述源文件系统为所述目标文件系统的上一级文件系统的情况下,以所述目标文件系统对应的第一标识作为所述第三标识;
    在根据所述目标文件系统对应的所述引用的上一级文件系统的信息,确定所述源文件系统为所述目标文件系统的上两级或两级以上文件系统的情况下,以所述源文件系统的下一级文件系统对应的第一标识作为所述第三标识;
    在根据所述源文件系统对应的所述引用的上一级文件系统的信息,确定所述目标文件系统为所述源文件系统的上一级文件系统的情况下,以所述源文件系统对应的第一标识作为所述第三标识;
    在根据所述源文件系统对应的所述引用的上一级文件系统的信息,确定所述目标文件系统为所述源文件系统的上两级或两级以上文件系统的情况下,以所述目标文件系统的下一级文件系统对应的第一标识作为所述第三标识;
    在根据所述源文件系统和所述目标文件系统分别对应的所述引用的上一级文件系统的信息,确定所述源文件系统和所述目标文件系统存在共同的根节点对应的文件系统的情况下,根据所述根节点对应的文件系统的下一级文件系统对应的第一标识,确定所述第三标识。
  22. 根据权利要求20或21所述的装置,其特征在于,在所述数据同步请求为将源文件系统中预定时刻后的数据修改同步至目标文件系统的情况下,所述数据同步模块,还用于:
    将所述源文件系统中在所述第三标识后修改的数据写入所述目标文件系统。
  23. 根据权利要求20-22中任一项所述的装置,其特征在于,所述数据同步模块,还用于:
    将所述源文件系统中在所述第三标识及所述第三标识前的数据写入所述目标文件系统;
    所述装置还包括:
    断开模块,用于断开所述目标文件系统和所述目标文件系统在所述树状结构中的上一级文件系统之间的连接关系。
  24. 根据权利要求23所述的装置,其特征在于,所述断开模块,用于:
    将所述目标文件系统对应的所述第一标识和所述引用的上一级文件系统的信息置为空。
  25. 一种文件系统管理装置,其特征在于,包括:
    处理器;
    用于存储处理器可执行指令的存储器;
    其中,所述处理器被配置为执行所述指令时实现权利要求1-12任意一项所述的方法。
  26. 一种非易失性计算机可读存储介质,其上存储有计算机程序指令,其特征在于,所述计算机程序指令被处理器执行时实现权利要求1-12中任意一项所述的方法。
  27. 一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行权利要求1-12中任意一项所述的方法。
PCT/CN2023/103850 2022-10-11 2023-06-29 文件系统管理方法、装置和存储介质 WO2024078029A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211241709.1 2022-10-11
CN202211241709.1A CN117873955A (zh) 2022-10-11 2022-10-11 文件系统管理方法、装置和存储介质

Publications (1)

Publication Number Publication Date
WO2024078029A1 true WO2024078029A1 (zh) 2024-04-18

Family

ID=90593472

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/103850 WO2024078029A1 (zh) 2022-10-11 2023-06-29 文件系统管理方法、装置和存储介质

Country Status (2)

Country Link
CN (1) CN117873955A (zh)
WO (1) WO2024078029A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101178677A (zh) * 2007-11-09 2008-05-14 中国科学院计算技术研究所 一种计算机文件系统的快照方法
CN103597440A (zh) * 2011-09-14 2014-02-19 株式会社日立制作所 用于创建克隆文件的方法以及采用该方法的文件系统
WO2019091085A1 (zh) * 2017-11-13 2019-05-16 华为技术有限公司 一种快照比对的方法和装置
CN111316245A (zh) * 2017-08-31 2020-06-19 凝聚力公司 使用完全水合备份还原数据库
CN113853778A (zh) * 2020-01-17 2021-12-28 华为技术有限公司 一种文件系统的克隆方法及装置
CN114175008A (zh) * 2020-02-07 2022-03-11 华为技术有限公司 快速文件快照和克隆

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101178677A (zh) * 2007-11-09 2008-05-14 中国科学院计算技术研究所 一种计算机文件系统的快照方法
CN103597440A (zh) * 2011-09-14 2014-02-19 株式会社日立制作所 用于创建克隆文件的方法以及采用该方法的文件系统
CN111316245A (zh) * 2017-08-31 2020-06-19 凝聚力公司 使用完全水合备份还原数据库
WO2019091085A1 (zh) * 2017-11-13 2019-05-16 华为技术有限公司 一种快照比对的方法和装置
CN113853778A (zh) * 2020-01-17 2021-12-28 华为技术有限公司 一种文件系统的克隆方法及装置
CN114175008A (zh) * 2020-02-07 2022-03-11 华为技术有限公司 快速文件快照和克隆

Also Published As

Publication number Publication date
CN117873955A (zh) 2024-04-12

Similar Documents

Publication Publication Date Title
EP3704599B1 (en) Incremental client synchronization
KR102128139B1 (ko) 플레이스홀더에 의한 파일 관리 기법
US10942813B2 (en) Cloud object data layout (CODL)
KR102128138B1 (ko) 플레이스홀더에 의한 하이드레이션 및 디하이드레이션 기법
KR101224680B1 (ko) 데이터베이스 내부에 표현된 파일 시스템
CN103473277B (zh) 文件系统的快照方法和装置
US20170300247A1 (en) Intelligent snapshot tree replication
US20140317531A1 (en) System, method, and apparatus for collaborative cax editing
US7702641B2 (en) Method and system for comparing and updating file trees
US10387271B2 (en) File system storage in cloud using data and metadata merkle trees
CN103645970B (zh) 一种远程复制多快照间增量去重的实现方法及装置
WO2017032170A1 (zh) 镜像文件的导入方法及装置
TW201433930A (zh) 檔案追蹤方法及其所適用之網路通訊裝置
US20170024447A1 (en) System, method, and apparatus for collaborative editing of common or related computer based software output
US20170193070A1 (en) System and method for a distributed replication lock for active-active geo-redundant systems
US11989095B2 (en) Techniques for preserving clone relationships between files
WO2022082891A1 (zh) 大数据采集方法、系统、计算机设备及其存储介质
CN112800007B (zh) 适用于fat32文件系统的目录项扩展方法和系统
US20100293143A1 (en) Initialization of database for synchronization
CN111176901B (zh) 一种hdfs删除文件恢复方法、终端设备及存储介质
WO2024078029A1 (zh) 文件系统管理方法、装置和存储介质
WO2023178899A1 (zh) 文件系统的数据管理方法及装置、电子设备及存储介质
CN110232047B (zh) Cad文件的时间线管理系统、方法、计算机可读存储介质及计算机终端
US10936550B2 (en) Synchronizing different representations of content
Wang et al. Towards cluster-wide deduplication based on Ceph

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23876238

Country of ref document: EP

Kind code of ref document: A1