WO2021017655A1 - 获取索引节点号的方法、装置、计算设备和存储介质 - Google Patents

获取索引节点号的方法、装置、计算设备和存储介质 Download PDF

Info

Publication number
WO2021017655A1
WO2021017655A1 PCT/CN2020/095483 CN2020095483W WO2021017655A1 WO 2021017655 A1 WO2021017655 A1 WO 2021017655A1 CN 2020095483 W CN2020095483 W CN 2020095483W WO 2021017655 A1 WO2021017655 A1 WO 2021017655A1
Authority
WO
WIPO (PCT)
Prior art keywords
index
block
path component
metadata file
identifier
Prior art date
Application number
PCT/CN2020/095483
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
Priority claimed from CN201911261725.5A external-priority patent/CN112306957A/zh
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021017655A1 publication Critical patent/WO2021017655A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating

Definitions

  • This application relates to the field of storage technology, and in particular to a method, device, computing device, and storage medium for obtaining an index node number.
  • Using a key-value storage system to store the metadata of the file system is one of the effective solutions to solve the metadata performance bottleneck of the file system.
  • the key-value storage system uses "key” and "value” (Key Value, KV) methods to manage the data stored in it. This data management method is very suitable for small data such as file system metadata.
  • KV Key Value
  • This data management method is very suitable for small data such as file system metadata.
  • the file name or other logical identifier of the file is generally used as the key, and the file system inode (inode) of the file is used as the value.
  • the file system parses the incoming path information (path analysis), and obtains the metadata of the target file through the directory entry (dentry, that is, the pair of the file name and the inode number corresponding to the file name) .
  • path analysis path analysis
  • directory entry dentry, that is, the pair of the file name and the inode number corresponding to the file name
  • existing file systems generally use directory entry cache (dcache) to accelerate file system metadata performance, the space for file system directory entry cache is limited, and directory entries are necessary parameters for many operations in the file system.
  • the item cache cannot satisfy all lookup requests of the file system for directory items.
  • the file system does not find the required directory entry in the directory entry cache, the file system needs to access the storage system by parsing the path information to obtain the required directory entry and file metadata.
  • Key-value storage systems are based on log-structured merge tree (Log-Structured Merge tree, LSM tree).
  • Key-value storage systems can be divided into memory structure and on-disk structure.
  • the memory structure includes memory table (memtable) and non-writable memory.
  • Table immutable memory table, immutable
  • ordered string table Sorted String Table, SST
  • ordered string table information cache SST Info Cache
  • the on-disk structure includes SST.
  • SST consists of two parts: SST data block and SST index block.
  • the SST data block stores "key" and "value” (key-value pairs).
  • the SST index block indexes the key-value pairs in the SST data block for quick search The address of the key-value pair in the SST data block.
  • the host when the host analyzes any path component in the path information to be parsed, the host can access the hard disk to obtain the data of the metadata file corresponding to the previous path component of the path component, and find the data from the data. The index node number of the metadata file corresponding to the path component. Then, the host obtains the inode block of the metadata file corresponding to the path component based on the inode number of the metadata file corresponding to the path component, and obtains the data of the metadata file corresponding to the path component based on the inode block.
  • embodiments of the present application provide a method, device, computing device, and storage medium for obtaining an index node number.
  • a method for obtaining an index node number includes: obtaining an identifier of a metadata file corresponding to a target path component, wherein the target path component is one of multiple path components in the path information to be analyzed
  • the first index block corresponding to the identifier of the metadata file is determined in the index block loaded into the memory, wherein the first index block stores the corresponding relationship between the identifier of the metadata file and the index node number, and the memory
  • the memory of the device that executes the method According to the corresponding relationship, the inode number corresponding to the identifier of the metadata file is determined, wherein the data block corresponding to the first index block stores the inode block of the metadata file.
  • path information There are multiple path components included in the path information to be analyzed.
  • the host when parsing any path component (which can be referred to as the target path component) of the path information to be parsed, the host can obtain the identifier of the metadata file corresponding to the target path component (the identifier may be the target path component). The file name of the component metadata file). Then the host can determine the first index block corresponding to the identifier of the metadata file in the index block loaded into the memory. Then, the host uses the identifier of the metadata file corresponding to the target path component in the first index block to find the index node number corresponding to the identifier of the metadata file. In this way, since the host can obtain the index node number of the metadata file corresponding to the target path component in the memory of the host without accessing the hard disk to obtain it, the time delay for resolving path information can be reduced.
  • the index block corresponding to the data block where the first index node block is located is determined as the first index block corresponding to the identifier of the metadata file, where:
  • the first index node block is the index node block of the metadata file corresponding to the previous path component, and the previous path component is the path component arranged before the target path component in the path information.
  • the data volume of the metadata file of the file corresponding to the path information to be parsed is relatively small, and the index node block of the metadata file corresponding to the path component under the same path information is the data stored in one index block
  • the possibility of block is relatively large.
  • the index node block of the metadata file corresponding to the target path component is also stored in the data block under the index block, and then the index block stores the correspondence between the identifier of the metadata file corresponding to the target path component and the index node number relationship.
  • the host may determine the index block loaded into the memory of the host as the first index block corresponding to the identifier of the metadata file, and then may obtain the index node number of the metadata file corresponding to the target path component from the first index block. In this way, the host does not need to access the hard disk, and can obtain the index node number of the metadata file corresponding to the target path component, which can reduce the delay in parsing the path information.
  • the index block corresponding to the data block where the second index node block is located is determined as the first index block corresponding to the identifier of the metadata file, where:
  • the second index node block is the index node block of the metadata file corresponding to the first path component
  • the first path component is the previous path component of the target path component in the path information.
  • the number of sub-files under the previous path component of the target path component is relatively small, so that only data blocks under one index block can be used to store the sub-files under the previous path component.
  • the data block under the index block of a path component stores the index node block of the metadata file corresponding to the target path component, so in the index block where the metadata file corresponding to the previous path component is located, the target path component corresponding The index node number corresponding to the identifier of the metadata file.
  • the host can determine the index block as the first index block corresponding to the identifier of the metadata file, and then can obtain the index node number of the metadata file corresponding to the target path component from the first index block. Therefore, the host does not need to access the hard disk, and can obtain the index node number of the metadata file corresponding to the target path component, which can reduce the time delay of resolving the path information.
  • the first index block corresponding to the identifier of the metadata file is determined, wherein the other index blocks are the index blocks loaded into the memory
  • the second index block is the index block corresponding to the data block where the second index node block is located
  • the second index node block is the index node block of the metadata file corresponding to the first path component
  • the first path component is the previous path component of the target path component in the path information.
  • the number of sub-files under the previous path component of the target path component is relatively large, so that storing the sub-files under the previous path component uses data blocks under multiple index blocks, then the previous path
  • the data block under the index block of the component (the index block may be called the second index block) does not store the index node block of the metadata file corresponding to the target path component, so the metadata file corresponding to the previous path component In the index block where it is located, the index node number corresponding to the identifier of the metadata file corresponding to the target path component is not stored.
  • the host may determine the first index block corresponding to the identifier of the metadata file corresponding to the target path component in other index blocks loaded into the memory (an index block other than the second index block among the index blocks loaded into the memory). In this way, the host can also obtain the first index block corresponding to the identifier of the metadata file from the index block loaded in the memory, and then obtain the index node number of the metadata file corresponding to the target path component from the first index block . Therefore, the host does not need to access the hard disk, and can obtain the index node number of the metadata file corresponding to the target path component, which can reduce the time delay of resolving the path information.
  • each index block in the other index blocks is sequentially searched to determine the first index block corresponding to the identifier of the metadata file, where, The third index block among other index blocks is searched before the fourth index block among other index blocks.
  • the third index block is the index block corresponding to the data block where the first metadata file is located
  • the fourth index block is the second element.
  • the writing time point of the first metadata file is earlier than the writing time point of the second metadata file.
  • the host when the host determines the first index block corresponding to the identifier of the metadata file corresponding to the target path component in other index blocks loaded into the memory, it first searches for the index block newly written into the metadata file . Since the newly stored data has a high probability of being searched, relatively searching for fewer index blocks, the host can determine the first index block corresponding to the identifier of the metadata file corresponding to the target path component, which takes less time.
  • the target path component is any path component except the root directory path component in the path information.
  • a device for obtaining an index node number includes:
  • An acquiring module configured to acquire an identifier of a metadata file corresponding to a target path component, where the target path component is any path component of multiple path components in the path information to be analyzed;
  • the memory is the memory of the device that executes the method
  • the inode number corresponding to the identifier of the metadata file is determined, wherein the data block corresponding to the first index block stores the inode block of the metadata file.
  • the determining module is configured to:
  • the index block corresponding to the data block in which the first index node block is located is determined as the first index block corresponding to the identifier of the metadata file, wherein the first index node block Is the index node block of the metadata file corresponding to the previous path component, and the previous path component is the path component arranged before the target path component in the path information.
  • the determining module is configured to:
  • the index block corresponding to the data block where the second index node block is located is determined as the first index block corresponding to the identifier of the metadata file, wherein the second index node block Is the index node block of the metadata file corresponding to the first path component, and the first path component is the previous path component of the target path component in the path information.
  • the determining module is configured to:
  • the first index block corresponding to the identifier of the metadata file, where the other index blocks are the index blocks loaded into the memory except for the second index block
  • the second index block is the index block corresponding to the data block in which the second index node block is located
  • the second index node block is the index node block of the metadata file corresponding to the first path component.
  • the first path component is the previous path component of the target path component in the path information.
  • the determining module is configured to:
  • each index block in the other index blocks is sequentially searched, and the first index block corresponding to the identifier of the metadata file is determined, wherein the other index blocks
  • the third index block in is searched before the fourth index block in the other index blocks, the third index block is the index block corresponding to the data block where the first metadata file is located, and the fourth index block is In the index block corresponding to the data block where the second metadata file is located, the writing time point of the first metadata file is earlier than the writing time point of the second metadata file.
  • the target path component is any path component other than the root directory path component in the path information.
  • an apparatus for obtaining an index node number which includes a processor and a memory, wherein the processor is configured to execute computer instructions included in the memory to implement the index node obtaining described in the first aspect. Number method.
  • a computing device for obtaining an index node number includes a processor and a memory, wherein:
  • Computer instructions are stored in the memory; the processor executes the computer instructions to implement the method for obtaining an index node number described in the first aspect.
  • a computer-readable storage medium stores computer instructions.
  • the computing device executes The method for obtaining the index node number described in the first aspect above.
  • a computer program product containing instructions, which when run on a computing device, causes the computing device to execute the method for obtaining the index node number described in the first aspect, or causes the computing device to implement the second Aspects and possible implementations of the device’s functions.
  • Fig. 1 is a system architecture diagram of an LSM tree provided by an exemplary embodiment of the present application
  • Figure 2 is a schematic structural diagram of an SST provided by an exemplary embodiment of the present application.
  • FIG. 3 is a schematic structural diagram of a metadata storage service system provided by an exemplary embodiment of the present application.
  • Fig. 4 is a schematic structural diagram of a host provided by an exemplary embodiment of the present application.
  • FIG. 5 is a schematic diagram of metadata keyed storage provided by an exemplary embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of an SST index block provided by an exemplary embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of an SST index block provided by an exemplary embodiment of the present application.
  • FIG. 8 is a schematic flowchart of a method for obtaining an index node number provided by an exemplary embodiment of the present application.
  • Fig. 9 is a schematic structural diagram of an apparatus for obtaining an index node number provided by an exemplary embodiment of the present application.
  • the file system can be any file system, such as the fourth-generation extended file system (Ext4), flash friendly file system (F2FS), and so on.
  • Ext4 fourth-generation extended file system
  • F2FS flash friendly file system
  • the process of parsing path information is the process of obtaining files by parsing the path information of the files. Specifically, in the process of parsing the path information of the file, each path component in the path information of the file is parsed in turn to obtain the address information of the file to be obtained, and the file is obtained based on the address information.
  • LSM trees are widely used in key-value storage systems (key-value storage systems use key-value pairs to store data).
  • the index tree structure of the LSM tree is a large tree and a small tree.
  • the smaller tree is stored in the host's memory C 0 (which can be called a memory buffer area), and the larger tree is persistent To the hard disk (such as C 1 , C 2 ,..., C k ).
  • the data writing operation will first operate the host's memory, and as the tree in the host's memory continues to grow, it will trigger a merge operation with the tree in the hard disk.
  • the LSM tree application can have multiple implementations on the database (such as the key-value database LevelDB and RocksDB based on the LSM tree implementation).
  • the LSM tree can be divided into a memory structure and an on-disk structure.
  • the memory structure can include memory table (memtable), non-writable memory table (immutable) (memtable and immutable can be called memory cache area), SST information cache (SST Info Cache), the memory structure is the above C 0 , the on-disk structure
  • Each layer is equivalent to the aforementioned C 1 , C 2 , ..., C k .
  • SST is the form of organizing key-value pairs when the key-value storage system persists the key-value pairs to the hard disk.
  • the LSM tree includes multiple SSTs, and each SST can be composed of two parts, one is the SST index The other part is the SST data block (there are one or more SST data blocks in an SST).
  • the key-value storage system when generating a new SST, the key-value storage system first determines the SST data block, and then generates the SST index block based on the SST data block, and records the position information of the key-value pair in the SST data block in the generated SST index block. For a certain SST, when the host accesses the SST, the index block of the SST will be loaded into the memory of the host, specifically loaded into the SST information cache.
  • the inode block of the metadata file is stored in the SST data block and stores the information of the metadata file of the file.
  • the metadata file may include the creator and authority of the file, the date of creation of the file, the size of the file, and the data identification of the file.
  • the index node block of the metadata file is used to find the data subject of the metadata file.
  • the index node number of the metadata file is used to index the index node block of the metadata file corresponding to the path component. For a path component, regardless of whether the information in the index node block of the metadata file corresponding to the path component is updated, the index node number of the index node block used to index the metadata file corresponding to the path component will not change.
  • the host converts the metadata of the file system to use the key-value storage system for storage.
  • the key-value storage system as LevelDB as an example
  • the specific processing is: when the file system metadata files are stored using the key-value storage system , The host needs to convert the metadata file of the file system into the form of key-value pairs.
  • the data of each metadata file requires two key-value pairs to store, one key-value pair stores the index node block of the metadata file, and the key of this key-value pair is the identifier of the index node block of the metadata file (which may be called yes later Index node number), the value corresponding to the key is the index node block; another key-value pair stores the data body of the metadata file, the key of this key-value pair is the data identifier of the metadata file, and the value corresponding to this key is the metadata File data.
  • the path information of the metadata file of the 1.txt file is /home/foo/1.txt.
  • the structure diagram is shown in Figure 3, and the leftmost "/" is the root Directory, "home” is a subdirectory of "/”, “foo” is a subdirectory of "home”, "/”, "home” and “foo” are directories, and their corresponding metadata files can use two keys Value pair means that one key-value pair stores the index node block of the metadata file, and the other key-value pair stores the data subject of the metadata file (for example, for "home", a key-value pair stores the index node of the metadata file corresponding to home) Block, another key-value pair stores the data body of the metadata file corresponding to home).
  • the host can store the key-value pair of the metadata file in the data block.
  • an index item is created in the index block corresponding to the data block (the index item key includes an index item key and an index item value), and one index item corresponds to a key-value pair.
  • a key-value pair of the index node number of the metadata file and the index node block of the metadata file is stored in a certain data block
  • the index item of the key-value pair in the index block corresponding to the data block is: metadata
  • the index node number of the file and the index item of the location information of the data block where the index node block of the metadata file is located (the index key is the index node number of the metadata file, and the index item value is the data block where the index node block of the metadata file is located. location information).
  • a data block stores a key-value pair of the data identifier of the metadata file and the data of the metadata file
  • the index item of the key-value pair in the index block corresponding to the data block is: the data identifier and the metadata of the metadata file
  • the index item of the location information of the data of the data file (the index item key is the data identifier of the metadata file, and the index item value is the location information of the data of the metadata file).
  • the file system uses "/" to split the path information, and the path information is divided into multiple path components.
  • Each path component actually corresponds to a file (the file can be a directory File or ordinary file). If the path component corresponds to a directory file, then the directory file is the metadata file corresponding to the path component. If the path component corresponds to an ordinary file, the inode block of the ordinary file is the metadata file corresponding to the path component, and the ordinary file The data is not the metadata file corresponding to the path component.
  • the path information is /home/foo/1.txt
  • the leftmost "/”, “home”, “foo” and “1.txt” can all be called path components
  • the files corresponding to "home” and “foo” are directory files
  • the files corresponding to "1.txt” are ordinary files.
  • the host can use the corresponding path component when analyzing a certain path component.
  • the index node number of the metadata file finds the location information of the data block where the index node block is located, thereby obtaining the data block where the index node block is located, and then obtains the index node from the data block.
  • the data identifier of the metadata file corresponding to the path component can be obtained from the index node block.
  • the host can use the data identifier of the metadata file corresponding to the path component to find the corresponding location information , Use the location information to find the data of the metadata file corresponding to the path component.
  • the index node number of the metadata file corresponding to the path component is abbreviated as “the index node number of the path component”; “” is referred to as “the index node block of the path component”; the "data identification of the metadata file corresponding to the path component” is referred to as “the data identification of the path component”; the “data identification of the metadata file corresponding to the path component” is referred to as " Path component data”.
  • Step 1 When the host starts, the metadata file corresponding to the root directory "/" has been stored in the memory of the host, and the host uses the identifier of the path component home to find the path component in the metadata file corresponding to the root directory "/" The index node number of the home.
  • Step 2 The host uses the index node number of the path component home to find the index node block corresponding to the index node number in the memory cache area (memtable, immutable) of the key-value storage system. If the index node block corresponding to the index node number does not exist in the memory cache area, the host uses the index node number of the path component home to find the path component home in the index items of the SST index block from the C 1 layer to the C k layer in turn.
  • the location information of the SST data block where the inode block is located The host uses the location information to determine the SST data block in the hard disk, and then the host uses the index node number to read the index node block of the path component home in the SST data block. What needs to be explained here is that when a certain SST is read, the SST index block of the SST will be cached in the memory of the host.
  • Step 3 The host reads the data identifier of the path component home from the index node block of the path component home.
  • Step 4 The host uses the data identifier to search for the location information corresponding to the data identifier of the path component home in the index entries of the data identifier of the path component of the SST index block and the location information of the data of the path component.
  • the host uses the location information to read the data of the path component home from the hard disk.
  • Step 5 The host finds the index node number of the path component foo in the data of the path component home.
  • Step 6 The host uses the index node number of the path component foo to find the index node block corresponding to the index node number in the memory cache area (memtable, immutable) of the key-value storage system. If the index node block corresponding to the index node number does not exist in the memory buffer area, the host sequentially searches the index items of the SST index block from the C 1 layer to the C k layer using the index node number of the path component foo to find the path component foo Location information of the SST data block where the inode block is located. The host uses the location information to determine the SST data block in the hard disk, and then the host uses the index node number to read the index node block of the path component foo in the SST data block.
  • Step 7 The host reads the data identifier of the path component foo from the index node block of the path component foo.
  • Step 8 The host uses the data identifier to find the location information corresponding to the data identifier of the path component foo in the index items of the data identifier of the path component of the SST index block and the location information of the data of the path component.
  • the host uses the location information to read the data of path component foo from the hard disk.
  • Step 9 The host searches the index node number of the path component 1.txt in the data of the path component foo.
  • Step 10 The host uses the index node number of the path component 1.txt to find the index node block corresponding to the index node number in the memory cache area (memtable, immutable) of the key-value storage system. If there is no index node block corresponding to the index node number in the memory buffer area, the host uses the index node number of path component 1.txt in the index items of the SST index block from layer C 1 to layer C k to find the path component in turn 1. The location information of the SST data block where the inode block of the txt is located. The host uses the location information to determine the SST data block in the hard disk, and then the host uses the index node number to read the index node block of the path component 1.txt in the SST data block.
  • the subsequent host can also execute step 11 and step 12 to read the data in 1.txt, the specific processing is:
  • Step 11 Read the address of the 1.txt data block in the 1.txt index node block.
  • Step 12 The host uses this address to read the data of 1.txt.
  • step 2 step 4, step 6, step 8 and step 10 all need to access the hard disk.
  • step 4 step 6, step 8 and step 10 all need to access the hard disk.
  • the number of times the hard disk needs to be accessed is relatively large, which makes the overall time delay of path information analysis relatively high. Therefore, it is necessary to provide a method for reducing the time delay of analyzing path information.
  • a key-value storage system is used to provide storage services for storing and managing the metadata files of the file system.
  • the system architecture used is shown in Figure 4, which is based on the Portable Operating System Interface of UNIX, POSIX )
  • the key-value storage system set up the file system interface wrapper layer (the wrapper layer can be understood as a piece of code, and the key-value interface is converted at the wrapper layer, which is actually realized by the host by running this piece of code).
  • the application calls the storage service of the metadata file of the file system, it sees and uses POSIX, and the key-value storage system exposes the key-value interface to the wrapper layer of the file system interface.
  • the key-value interface of the key-value storage system is converted to the POSIX used by the file system after passing through the package layer of the file system interface, so as to provide the storage service of the metadata file of the file system to the applications using POSIX.
  • the key-value pairs organized by the key-value storage system are stored in storage devices (such as hard disks, etc.), and corresponding operations are performed on the data in the storage device according to the call of the key-value interface (for example, when the key-value storage system is LevelDB, you can The key-value pairs are organized into SST in batches and stored in the storage device, and corresponding operations are performed on the data in the SST in the storage device according to the call of the key-value interface).
  • the wrapper layer of the file system interface completes the conversion between the key-value interface and the file system POSIX. Under the above system architecture, the application does not perceive that the storage service for providing metadata files is actually a key-value storage system.
  • the above-mentioned metadata file when stored in the key-value storage system, it may be stored based on the file system, or may also be stored based on other methods, which is not limited in the embodiment of the present application.
  • the above-mentioned storage device can be a storage device in a local storage service, or a storage device in a cloud storage service, such as a storage device in an Elastic Block Store (EBS), a storage device in an object storage system S3, etc. .
  • EBS Elastic Block Store
  • the above key-value storage system is any storage system, such as LevelDB, TiKV, etc.
  • the key-value storage system is LevelDB as an example for description.
  • the standard interface of POSIX can be open(A), where A is the path information of the file to be opened, and the open() interface indicates to open a file, and which target file to open is specified by A.
  • the key-value interface is the interface of the key-value storage system, such as GET (Key), etc., which means to obtain the value (Value) corresponding to the key (Key).
  • the conversion of the package layer is: taking the path information /home/foo/1.txt as an example, the POSIX standard interface submits the open ("/home/foo/1.txt") operation, and the package layer is converted into multiple ordered keys Value operations: GET (/), GET (home), GET (foo), GET (1.txt).
  • GET /
  • GET home
  • GET GET
  • GET (1.txt
  • the method for obtaining the index node number can be executed by the device for obtaining the index node number.
  • the device for obtaining the index node number can be a hardware device, such as a host, or a software device (for example, a set of devices running on a hardware device). software program).
  • FIG. 5 exemplarily provides a possible architecture diagram of the host of the present application.
  • the host may include a processor 501, a memory 502, a communication interface 503, and a bus 504.
  • the number of processors 501 may be one or more, and FIG. 5 only illustrates one of the processors 501.
  • the processor 501 may be a central processing unit (Central Processing Unit, CPU). If the host has multiple processors 501, the types of the multiple processors 501 may be different or may be the same. Optionally, multiple processors of the host may also be integrated into a multi-core processor.
  • CPU Central Processing Unit
  • the memory 502 stores computer instructions and data, and the memory 502 can store computer instructions and data required to implement the method for obtaining an index node number provided in this application.
  • the memory 502 stores instructions for implementing the execution steps of the acquiring module in the method for acquiring the index node number provided in this application.
  • the memory 502 stores instructions for determining the execution steps of a module in the method for obtaining an index node number provided in this application.
  • the memory 502 can be any one or any combination of the following storage media: non-volatile memory (such as read-only memory (ROM), solid state disk (SSD), hard disk (Hard Disk) Drive, HDD), optical disc, etc.), volatile memory.
  • the communication interface 503 may be any one or any combination of the following devices: a network interface (such as an Ethernet interface), a wireless network card, and other devices with a network access function.
  • the communication interface 503 is used for data communication between the host and other hosts or terminals.
  • the bus 504 can connect the processor 501 with the memory 502 and the communication interface 503. In this way, through the bus 504, the processor 501 can access the memory 502, and can also use the communication interface 503 to interact with other hosts or terminals.
  • the host executes the computer instructions in the memory 502, and uses the host to implement the method for obtaining the index node number provided in this application. For example, the host is made to execute the steps performed by the determining module in the above method for obtaining the index node number.
  • the method for obtaining the index node number provided in the embodiment of the present application will be described below.
  • the following takes the host that executes the method for obtaining the index node number as an example to illustrate the solution.
  • the host Before obtaining the index node number, the host converts the metadata file of the file system into storage using the key-value storage system.
  • the process of the host writing the metadata file in the key-value storage system is exactly the same as the process described above, except that when creating an index item, if the data block stores the index node number of the metadata file and the metadata file For the key-value pair of the index node block, on the basis of the index item of the index node number of the metadata file and the location information of the data block where the index node block of the metadata file is located, the index block corresponding to the data block is added:
  • the identifier of the metadata file also called the file name of the metadata file
  • the index entry of the inode number of the metadata file (the index entry key is the identity of the metadata file, and the index entry value is the inode number of the metadata file ), that is, the correspondence between the identifier of the metadata file and the index node number of the metadata file is added.
  • the host when creating an index entry for the identifier of the metadata file corresponding to the path component (which can be referred to as the identifier of the path component) and the index node number of the metadata file corresponding to the path component, The host can obtain the index node number of the metadata file corresponding to the path component from the data of the previous path component of the path component (the host can obtain it when the data of the previous path component is written into the key-value storage system).
  • the host when parsing a certain path component, the host can directly find the index node number of the metadata file corresponding to the path component in the index block, without obtaining the data of the previous path component adjacent to the path component , Then there is no need to access the hard disk to obtain the data of the previous path component, so the number of hard disk accesses can be reduced. How to find it will be described in detail in the process shown in Figure 8 below.
  • the metadata file is stored in the SST data block of the SST in the form of key-value pairs.
  • the path information of the metadata file as /home/foo/1.txt as an example, first create a key-value pair of the metadata file in the SST data block of the SST, which can be specifically: the key is the index node number of the path component home, The value is the index node block of path component home; the key is the index node number of path component foo, and the value is the index node block of path component foo; the key is the index node number of path component 1.txt, and the value is path component 1.txt Inode block.
  • the SST data block also stores a data identifier whose key is the path component home and a key-value pair whose value is the data of the path component home.
  • the path component foo is similar to the path component home, and will not be repeated here.
  • the data of the file 1.txt is not metadata, and the data of the file 1.txt may not be stored in the manner of a metadata file.
  • the index item of each key-value pair in the SST data block is recorded in the SST index block, and one key-value pair in the SST data block corresponds to one index item.
  • the index items include: the index item key is the path component home Identifies that the index item value corresponding to the index item key is the index node number of the path component; the index item key is the index node number of the path component home, and the index item value corresponding to the index item key is the SST where the index node block of the path component home is located The location information of the data block.
  • the index item includes: the index item key is the data identifier of the path component home, The index item value corresponding to the index item key is the location information of the data of the path component home.
  • the path component foo and the path component 1.txt are similar to the path component home, and will not be repeated here.
  • the host can find the index node number of the path component from the SST index block corresponding to the SST data block where the index node block of the path component is located, instead of acquiring the data of the previous path component of the path component, so There is no need to obtain the data of the previous path component, and then do not access the hard disk, which can reduce the number of hard disk accesses.
  • the index item value may also include the access authority information of the metadata file, etc.
  • the host can determine Get the index node number of any metadata file and the data block where the index node block is located. For example, the index node number of the path component foo is stored in the metadata file data corresponding to the path component home, so the index node number of the metadata file corresponding to the path component foo can be obtained.
  • the previous path component of the path component foo is the path component home
  • the previous path component of the path component 1.txt is the path component foo.
  • Step 801 The host obtains the identifier of the metadata file corresponding to the target path component.
  • the application transmits the path information of the file to the key-value storage system of the host.
  • the path information of the file to be obtained includes path information that meets the requirements of the corresponding POSIX interface.
  • the key-value storage system of the host parses any path component in the path information (which can be referred to as the target path component), it can obtain the identifier of the metadata file corresponding to the target path component, and the identifier may be corresponding to the target path component
  • the file name of the metadata file can also be a logical identifier.
  • the application submits the open ("/home/foo/1.txt") operation to the package layer on the host through POSIX, and the package layer on the host converts the open ("/home/foo/1.txt") operation to
  • the key-value operations recognized by the key-value storage system are GET (/), GET (home), GET (foo), GET (1.txt).
  • the key-value storage system of the host can receive GET (/) operations, GET (home) operations, GET (foo) operations, and GET (1.txt) operations.
  • the above-mentioned application may be an application installed on the host, or may not be an application installed on the host. Before the file system operates on the file, it must first obtain the metadata file of the file to be obtained. In this application, the metadata file of the file system is stored using the key-value storage system, so the application will transmit the path information of the file to the key value of the host Storage System.
  • the application will not perceive that the storage service that provides the metadata of the file system is actually the key-value.
  • Storage System the path component arranged at the top of the path information is the root directory.
  • the metadata file of the root directory will be cached in the memory of the host, so the host does not get the index node of the root directory based on the index node number Block, so the target path component is any path component except the root directory path component in the path information.
  • Step 802 The host determines the first index block corresponding to the identifier of the metadata file among the index blocks loaded into the memory.
  • the host may use the identifier of the metadata file corresponding to the target path component in the index block loaded into the memory of the host to determine the first index block corresponding to the identifier of the metadata file.
  • the first index block stores the corresponding relationship between the identifier of the metadata file and the index node number
  • the data block corresponding to the first index block stores the index node block of the metadata file.
  • Step 803 The host determines the index node number corresponding to the identifier of the metadata file according to the corresponding relationship.
  • the host can find the inode number corresponding to the identifier of the metadata file corresponding to the target path component in the correspondence relationship between the identifier of the metadata file and the index node number, that is, obtain the metadata corresponding to the target path component The i-node number of the file.
  • the host can obtain the index node number of the metadata file corresponding to the target path component in the memory of the host without accessing the hard disk to obtain it, the time delay for resolving path information can be reduced.
  • the host determines the index block corresponding to the data block where the first index node block is located in the index block loaded into the memory as the identifier corresponding to the metadata file corresponding to the target path component
  • the first index block is the index node block of the metadata file corresponding to the previous path component
  • the previous path component is the path component arranged before the target path component in the path information.
  • the host first uses the identifier of the metadata file corresponding to the target path component to search for the inode number of the metadata file corresponding to the target path component in the memory buffer area of the key-value storage system. If the inode number of the metadata file corresponding to the target path component exists in the memory buffer area, the index node number is returned to POSIX; if the inode number of the metadata file corresponding to the target path component does not exist in the memory buffer area, the host Determine the path component before the target path component in the path information. Then the host determines the data block where the first index node block of the path component before the target path component is located, and determines the index block corresponding to the data block. The host determines the index block as the first index block corresponding to the identifier of the metadata file corresponding to the target path component.
  • the data volume of the metadata file of the file corresponding to the path information to be parsed is relatively small, and the index node block of the metadata file corresponding to the path component under the same path information is more likely to be stored in the data block under one index block. Big.
  • the index node block of the metadata file corresponding to the target path component is also stored in the data block under the index block, and then the index block stores the correspondence between the identifier of the metadata file corresponding to the target path component and the index node number relationship.
  • the host may determine the index block loaded into the memory of the host as the first index block corresponding to the identifier of the metadata file, and the host may obtain the index node of the metadata file corresponding to the target path component from the first index block number. In this way, the host does not need to access the hard disk, and can obtain the index node number of the metadata file corresponding to the target path component, which can reduce the delay in parsing the path information.
  • the host determines the index block corresponding to the data block where the second index node block is located in the index block loaded into the memory as the first index block corresponding to the identifier of the metadata file , Where the second index node block is the index node block of the metadata file corresponding to the first path component, and the first path component is the previous path component of the target path component in the path information.
  • the host can determine the previous path component of the target path component in the path information.
  • the host uses the identifier of the metadata file corresponding to the previous path component to determine the index block where the second index node block of the metadata file corresponding to the previous path component is located, and the index block may be referred to as the second index block later.
  • the host determines the second index block loaded into the memory as the first index block corresponding to the identifier of the metadata file corresponding to the target path component.
  • the host uses the identifier of the metadata file corresponding to the previous path component to determine the SST index block of the previous path component, and in the SST index block, uses the identifier of the metadata file corresponding to the target path component to find the target path component The index node number of the corresponding metadata file.
  • the reason why the second index block is determined as the first index block corresponding to the identifier of the metadata file corresponding to the target path component is:
  • the number of sub-files under the previous path component of the target path component is relatively small, so that only data blocks under one index block can be used to store the sub-files under the previous path component, then the index block under the previous path component
  • the index node block of the metadata file corresponding to the target path component is stored in the data block, so in the second index block where the metadata file corresponding to the previous path component is located, the metadata file corresponding to the target path component is stored Identifies the corresponding inode number.
  • the host can determine the second index block as the first index block corresponding to the identifier of the metadata file, and then can obtain the index node number of the metadata file corresponding to the target path component from the first index block. Therefore, the host does not need to access the hard disk, and can obtain the index node number of the metadata file corresponding to the target path component, which can reduce the time delay of resolving the path information.
  • the host cannot find the index node number of the metadata file corresponding to the target path component in the second index block.
  • some of the above-mentioned other situations include but are not limited to the following situations: the number of sub-files under the previous path component of the target path component is relatively large, so that storing the sub-files of the previous path component needs to use data blocks under multiple index blocks To be completely stored.
  • the index node block of the metadata file corresponding to the target path component and the index node block of the previous path component do not belong to the data blocks under one index block, then the metadata corresponding to the target path component
  • the index node number of the file is not stored in the second index block.
  • the host When the host does not find the index node number of the metadata file corresponding to the target path component in the second index block, it can determine that other index blocks other than the second index block in the index block loaded into the memory (that is, the key-value storage In the system, the index blocks loaded into the memory except for the second index block).
  • the host uses the identifier of the metadata file corresponding to the target path component to find in the memory cache area whether there is an index node number corresponding to the identifier, and if there is a corresponding identifier The index node number of the metadata file corresponding to the target path component is obtained and returned to POSIX.
  • the host can also obtain the first index block corresponding to the identifier of the metadata file from the index block loaded in the memory, and then obtain the index node number of the metadata file corresponding to the target path component from the first index block . Therefore, the host does not need to access the hard disk, and can obtain the index node number of the metadata file corresponding to the target path component, which can reduce the time delay of resolving the path information.
  • the data of the previous path component of the target path component may also be stored in the data block of other index blocks by means of related technologies.
  • the host needs to use the previous path component.
  • the data identifier of a path component is sequentially searched for the location information of the data of the previous path component in the memory buffer area and other index blocks. After the host finds the location information of the data of the previous path component, it also needs to access the hard disk to obtain the data of the metadata file corresponding to the previous path component, and read the index of the metadata file corresponding to the target path component from the data. Node number.
  • the host can search for the index node number of the metadata file corresponding to the target path component in the memory buffer area or other index blocks loaded into the memory, without accessing the hard disk to obtain the element corresponding to the previous path component.
  • the data of the data file can reduce the number of hard disk accesses.
  • the index node number of the metadata file corresponding to the path component and the key-value pair of the index node block are stored, and the The key-value pair of the identifier of the metadata file corresponding to the path component and the index node number.
  • the host can return to POSIX the indication information that the index node block of the metadata file corresponding to the target path component is lacking.
  • the host searches for each index block in the other index blocks in order in other index blocks loaded into the memory, and determines the first index block corresponding to the identifier of the metadata file.
  • the specific treatment is:
  • the host can determine the writing order of metadata files corresponding to other index blocks in the data blocks of the key-value storage system. According to the writing time sequence of the metadata files, the location with the earliest writing time of the metadata files is first searched. Specifically, the memory buffer area is first searched (described in the previous article, so I will not repeat it here), and then search for other index blocks. When the host searches for other index blocks, the host loads other index blocks into the memory of the host in sequence according to the writing time sequence of the metadata file. For each index block loaded into the memory of the host, the metadata corresponding to the target path component is used The identifier of the file determines whether it is the first index block corresponding to the identifier. If it is the first index block corresponding to the tag, the host executes step 803.
  • the host continues to load the next index block to the memory of the host according to the time sequence of writing the metadata file , Until other index blocks are found, or until the first index block corresponding to the identifier of the metadata file corresponding to the target path component is found.
  • the third index block in other index blocks is searched before the fourth index block in other index blocks, the third index block is the index block corresponding to the data block where the first metadata file is located, and the fourth index block is the first index block.
  • the index block corresponding to the data block where the binary data file is located the writing time point of the first metadata file is earlier than the writing time point of the second metadata file, that is, the first time length corresponding to the first metadata file is less than the first time
  • the second duration corresponding to the binary data file is the distance between the start writing time of the first metadata file and the current time point
  • the second duration is the distance between the start writing time of the second metadata file and the current time. The duration of the point.
  • the host when the host determines the first index block corresponding to the identifier of the metadata file corresponding to the target path component among other index blocks loaded into the memory, it first searches for the index block newly written into the metadata file. Since the newly stored data has a high probability of being searched, relatively searching for fewer index blocks, the host can determine the first index block corresponding to the identifier of the metadata file corresponding to the target path component, which takes less time.
  • the memory buffer area is C 0 (including memtable and immutable), and the latest written data is written in C 0.
  • the data will be sequentially from C 0 Move gradually to C 1 until C k .
  • the search process from the new data to the old data is from C 0 to C k in turn . What needs to be explained here is to search for memtable first, then immutable.
  • the host may obtain the element corresponding to the previous path component in the index node block.
  • the amount of data in the data file The host determines whether the amount of data is greater than the preset value. If the amount of data is less than or equal to the preset value, the host may use the process shown in FIG. 8 when parsing the index node number of the target path component. If the amount of data is greater than the preset value, the host can use the process shown in Figure 8 when parsing the index node number of the target path component, or obtain the index node block based on the metadata file corresponding to the previous path component.
  • the data of the metadata file corresponding to the previous path component The host obtains the index node number of the metadata file corresponding to the target path component from the data.
  • the host uses the index node number of the metadata file corresponding to the target path component as the index item key, and stores it in the key value store.
  • the system searches for the index item value corresponding to this index item key, and obtains the index node block of the metadata file corresponding to the target path component according to the index item value.
  • the key-value storage system is LevelDB
  • the target path component is foo
  • the host uses the index node number of the metadata file corresponding to foo as the index item key, in sequence C index entry value 0 (memtable, immutable), C SST 1 layer, SST C SST C k layer until layer 1 foo search path components corresponding metadata file corresponding to the inode number, to find if a layer in To the index item value corresponding to the index node number of the metadata file corresponding to foo, there is no need to continue searching backward.
  • the index corresponding to the index node number of the metadata file corresponding to the path component foo is the index node block corresponding to the index node number of the metadata file corresponding to the path component foo.
  • the host When searching for the index item value corresponding to the index node number of the metadata file corresponding to the path component foo in the SST of the C 1 layer, the SST of the C 2 layer and the SST of any layer of the C k layer, the host first checks the SST of the SST The location information corresponding to the index node number of the metadata file corresponding to the path component foo is found in the index block, and the location information is the index item value corresponding to the index node number of the metadata file corresponding to the path component foo. The host uses the location information to determine the SST data block where the inode block of the metadata file corresponding to the path component foo is located.
  • the host uses the index node number of the metadata file corresponding to the path component foo, and in the SST data block, determines the content corresponding to the index node number of the metadata file corresponding to the path component foo, which is the element corresponding to the path component foo The inode block of the data file.
  • the SST index block of the SST to which the index node block of the path component belongs the index node number of the metadata file corresponding to the path component and the metadata corresponding to the path component are recorded
  • the index item of the location information of the SST data block to which the inode block of the file belongs but it will not be in the SST to which the SST index block belongs.
  • the reason for using the location information to find the data block where the inode block is located is: current SST
  • the index node block in may not be the latest index node block, which will make the obtained index node block incorrect.
  • the target path component in the path information is taken as an example to illustrate the process of obtaining the index node number.
  • the host can use the process of FIG. 8 to obtain the index node number, which is not limited in the embodiment of the present application.
  • each path component is analyzed in turn according to the arrangement order of the path components of the path information, and the metadata file corresponding to each path component is obtained.
  • the index node number when parsing to the index node number of the metadata file corresponding to the last path component of the path information, the metadata file corresponding to the last path component is obtained through the index node number of the metadata file corresponding to the last path component In the index node block of, and then obtain the file corresponding to the path information.
  • the host may first parse the path component in the forefront according to the order of the path components in the path information, and then parse the second path component in the arrangement to obtain the metadata file corresponding to the second path component. Inode number and inode block. The host then parses the third path component of the arrangement to obtain the index node number and index node block of the metadata file corresponding to the third path component, until all path components in the path information are resolved, and the last path of the path information is obtained The index node number and index node block of the component. The host obtains the address information of the file corresponding to the path information in the index node block of the last path component. Then, the host uses the address information to determine the location where the file corresponding to the path information is stored, and obtains the file corresponding to the path information from the location.
  • the reason why the host obtains the index node block of the metadata file corresponding to the path components other than the last path component in the path information is: 1)
  • the solution in the embodiment of this application conforms to the POSIX specification, because the application is submitted to the key-value store through POSIX The operation of the system is to obtain the index node block of the metadata file corresponding to each path component, so the key-value storage system of the host must return the index node block to POSIX to meet the requirements of POSIX; 2)
  • Path information is used here /home/foo/1.txt as an example, the key-value storage system of the host returns the index node block of the metadata file corresponding to the path component home to POSIX.
  • POSIX confirms that the upper directory of the path component foo (that is, the path component home) is correct , Will continue to parse the path component foo; 3)
  • the path component in the path information may be updated (for example, the path information is /home/foo/1.txt, after the update, it becomes /home/aa/bb/foo/1 .txt), the correct path component can only be parsed in order to ensure that the index node block of the metadata file corresponding to the correct path component is returned to POSIX. Therefore, in order to ensure the normal process of path information parsing, the key-value storage system of the host must return to POSIX the index node block of the metadata file corresponding to each path component.
  • the embodiments of this application also provide a process of parsing path information for /home/foo/1.txt when the key-value storage system is LevelDB, assuming that the SST index block and the file system The data of the root directory / has been cached in the host's memory.
  • Step S1 the host uses the identifier of the path component home in the data of the root directory "/" to obtain the index node number of the path component home.
  • Step S2 the host uses a path component home inode number, sequentially memtable, immutable, C SST 1 layer, C SST SST until C k layer 2 layer, the multipath components home inode number as an index item key , Find the index item value corresponding to the index node number of the path component home. If the index item value corresponding to the index node number of the path component home is found in the memtable and immutable, the host may determine the index item value as the index node block of the path component home.
  • the host may be sequentially SST C 1 layer, C SST 2 layers, C k layer SST, the path component of home
  • the index node number of is used as the index item key to find the index item value corresponding to the index node number of the path component home. If the host finds the location information corresponding to the index node number of the path component home in the SST index block of a certain layer (the location information is the index item value corresponding to the index node number of the path component home), the host ends the search.
  • the SST index block is the index node block of the path component home.
  • the host uses the location information to determine in the hard disk the SST data block where the index node block of the path component home is located. Then the host uses the index node number of the path component home, and in the SST data block, determines the content corresponding to the index node number of the path component home, which is the index node block corresponding to the path component home. Then the host returns the index node block of the path component home to POSIX.
  • Step S3 if the host does not find the index node number of the path component foo in the memtable and immutable of the key-value storage system, the host searches for the path in the SST index block of the SST data block where the metadata file corresponding to the path component home is located The index node number of component foo. Specifically, the host can use the identifier of the path component foo as the index item key to find the corresponding index item value, and the index item value is the index node number of the path component foo.
  • Step S4 If the host finds the index node number of the path component foo in the SST index block of the SST data block where the metadata file corresponding to the path component home is located, it is determined that the SST index block is an index corresponding to the identifier of the path component foo Block, use the index node number to access the hard disk to obtain the index node block of the path component foo (for processing, see the process of obtaining the index node block of the path component home), and return it to POSIX.
  • the host does not find the index node number of the path component foo in the SST index block of the SST data block where the metadata file corresponding to the path component home is located, it will be in the memtable, immutable, and the SST where the metadata file corresponding to the path component home is located.
  • search for the index node number of the path component foo see the description in step S1 for specific processing).
  • step S5 If the host finds the index node number of the path component foo in the memtable, the immutable, or any of the other SST index blocks, it executes the processing of finding the index node block corresponding to the index node number (specifically, the processing is in front of The description will not be repeated here), the processing of step S5 is executed. If the host does not find the index node number of the path component foo in the memtable, the immutable, and the other SST index blocks, it returns the indication information that the metadata file is lacking, and does not perform the processing of step S5 and subsequent steps.
  • Step S5 if the host does not find the index node number of the path component 1.txt in the memtable and immutable of the key-value storage system, the host is in the SST index block of the SST data block where the metadata file corresponding to the path component foo is located, Find the index node number of path component 1.txt. Specifically, the host can use the identifier of the path component 1.txt as the index item key to find the corresponding index item value, and the index item value is the index node number of the path component 1.txt.
  • Step S6 If the host finds the index node number of the path component 1.txt in the SST index block of the SST data block where the metadata file corresponding to the path component foo is located, it is determined that the SST index block is the same as the path component 1.txt The corresponding index block is identified, the processing of searching the index node block of path component 1.txt is executed (the specific processing is described above, and will not be repeated here), and the processing of step S7 is executed.
  • the host does not find the index node number of the path component 1.txt in the SST index block of the SST data block where the metadata file corresponding to the path component foo is located, it will be in the memtable, immutable, and the SST index block where the path component foo is located.
  • use the identifier of path component 1.txt to find the index node number of path component 1.txt.
  • step S7 If the host finds the index node number of path component 1.txt in the memtable, the immutable, or any of the SST index blocks in the other SST index block, it executes the search for the index node block corresponding to the index node number Processing (the specific processing is described above, and will not be repeated here), the processing of step S7 is executed. If the host does not find the index node number of the path component 1.txt in the memtable, the immutable, and other SST index blocks, it returns the indication information that the metadata file is lacking and does not perform step S7.
  • Step S7 the host finds the address of the data block of the path component 1.txt in the index node block of the path component 1.txt. Based on the address, the host determines the location of the 1.txt file of the path component, and reads the 1.txt file from the location.
  • the solution of the related technology needs to access the hard disk five times (step 2, step 4, step 6, step 8, and step 10), and the solution of this application is adopted , Reducing the process of accessing the hard disk to obtain the data of the path component home and the data of the path component foo, that is, there is no need to perform the processing of the above steps 4 and 8, so only need to access the hard disk three times to obtain the data of 1.txt. Therefore, the solution of this application can reduce the number of hard disk accesses.
  • the above description is based on the four path components included in the path information. When the path information includes more path components, the number of hard disk accesses can also be reduced.
  • the index node number of the metadata file corresponding to the path component is stored in the index block, and the index block is loaded into the host memory.
  • the host can obtain the index node number of the metadata file corresponding to the path component from the index block of the memory of the host, instead of obtaining the metadata file data corresponding to the previous path component of the path component, so it can Reduce the number of accesses to the hard disk, thereby speeding up the analysis of the file system path information.
  • this application is aimed at the case where the directory entry cache of the file system is missing. This is because if the directory entry cache of the file system exists, you can directly use the directory entry of the file system to read the index of the file to be obtained For the node number, the file to be obtained is read based on the index node number (the process of obtaining the file to be obtained based on the index node number has been described above and will not be repeated here). Among them, the situation where the directory entry of the file system is missing may include insufficient storage space of the directory entry of the file system, and the directory entry of the file system cannot be loaded.
  • Fig. 9 is a structural diagram of an apparatus for obtaining an index node number provided by an embodiment of the present application.
  • the device can be implemented as part or all of the device through software, hardware or a combination of the two.
  • the apparatus provided in the embodiment of the present application can implement the process described in FIG. 8 of the embodiment of the present application.
  • the apparatus includes: an obtaining module 910 and a determining module 920, wherein:
  • the obtaining module 910 is configured to obtain the identifier of the metadata file corresponding to the target path component, where the target path component is any one of the multiple path components in the path information to be parsed, which can be specifically used to implement the steps The acquisition function in 801 and its hidden steps;
  • the determining module 920 is used for:
  • the memory is the memory of the device that executes the method
  • the inode number corresponding to the identifier of the metadata file is determined, wherein the data block corresponding to the first index block stores the inode block of the metadata file, which can be specifically used to implement the steps The determination function in 802 and step 803 and the implicit steps contained therein.
  • the determining module 920 is configured to:
  • the index block corresponding to the data block in which the first index node block is located is determined as the first index block corresponding to the identifier of the metadata file, wherein the first index node block Is the index node block of the metadata file corresponding to the previous path component, and the previous path component is the path component arranged before the target path component in the path information.
  • the determining module 920 is configured to:
  • the index block corresponding to the data block where the second index node block is located is determined as the first index block corresponding to the identifier of the metadata file, wherein the second index node block Is the index node block of the metadata file corresponding to the first path component, and the first path component is the previous path component of the target path component in the path information.
  • the determining module 920 is configured to:
  • the first index block corresponding to the identifier of the metadata file is determined, wherein the other index blocks are the index blocks loaded into the memory except for the second index An index block other than a block, the second index block is an index block corresponding to the data block where the second index node block is located, and the second index node block is the index node block of the metadata file corresponding to the first path component,
  • the first path component is the previous path component of the target path component in the path information.
  • the determining module 920 is configured to:
  • each index block in the other index blocks is sequentially searched, and the first index block corresponding to the identifier of the metadata file is determined, wherein the other index blocks
  • the third index block in is searched before the fourth index block in the other index blocks, the third index block is the index block corresponding to the data block where the first metadata file is located, and the fourth index block is In the index block corresponding to the data block where the second metadata file is located, the writing time point of the first metadata file is earlier than the writing time point of the second metadata file.
  • the target path component is any path component other than the root directory path component in the path information.
  • the division of modules in the embodiments of this application is illustrative, and it is only a logical function division. In actual implementation, there may also be other division methods.
  • the functional modules in each embodiment of this application can be integrated into one
  • the processor may also exist alone physically, or two or more modules may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software functional modules.
  • the index node number of the path component is stored in the index block, and the index block is loaded into the memory of the host.
  • the host when the host resolves the target path component in the path information, the host can download the path component from the memory of the host.
  • the index node number of the metadata file corresponding to the target path component is determined in the index block of the target path component, without the need to obtain the metadata file data corresponding to the previous path component of the target path component, so the number of times to access the hard disk can be reduced, and the Reduce the delay in resolving path information.
  • a computer-readable storage medium stores computer instructions.
  • the computing device executes the above Provides a method to obtain the index node number.
  • a computer program product containing computer instructions is also provided, which when running on a computing device, causes the computing device to execute the method for obtaining an index node number provided above.
  • the computer program product includes one or more computer instructions, and when the computer program instructions are loaded and executed on a server or a terminal, the processes or functions described in the embodiments of the present application are generated in whole or in part.
  • the computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions may be transmitted from a website, computer, server, or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a server or a terminal, or a data storage device such as a server or data center integrated with one or more available media.
  • the usable medium may be a magnetic medium (such as a floppy disk, a hard disk, and a magnetic tape), an optical medium (such as a digital video disk (Digital Video Disk, DVD), etc.), or a semiconductor medium (such as a solid-state hard disk, etc.).

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种获取索引节点号的方法、装置、计算设备和存储介质。该方法包括:在解析待解析的路径信息时,对于该路径信息中的目标路径分量,可以获取目标路径分量对应的元数据文件的标识,在被加载至内存的索引块中确定与该元数据文件的标识对应的第一索引块,第一索引块存储有元数据文件的标识与索引节点号的对应关系,根据该对应关系,确定该元数据文件的标识对应的索引节点号,该第一索引块对应的数据块存储有该元数据文件的数据。该方法可以降低解析路径信息的时延。

Description

获取索引节点号的方法、装置、计算设备和存储介质
本申请要求在2019年12月10日提交中国国家知识产权局、申请号为201911261725.5的中国专利申请的优先权,发明名称为“获取索引节点号的方法、装置、计算设备和存储介质”的中国专利申请的优先权,在2019年07月30日提交中国国家知识产权局、申请号为201910695741.9的中国专利申请的优先权,发明名称为“加速文件系统路径解析的方法,计算机设备和系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及存储技术领域,特别涉及一种获取索引节点号的方法、装置、计算设备和存储介质。
背景技术
使用键值存储系统来存储文件系统的元数据是解决文件系统的元数据性能瓶颈的有效解决方案之一。键值存储系统使用“键”、“值”(Key Value,KV)的方式来管理存储在其中的数据,这种数据管理方式非常适合诸如文件系统的元数据这样的小数据。文件系统的元数据存放在键值存储系统中时,一般以文件的文件名或其它逻辑标识作为键,该文件的文件系统索引节点(inode)作为值。
文件系统进行各种操作前,首先需要获取目标文件的元数据。文件系统对传入的路径信息进行解析(路径解析),通过目录项(directory entry)(dentry,即文件名和文件名对应的索引节点号(inode number)组成的对)来获取目标文件的元数据。虽然现有文件系统一般使用目录项缓存(dentry cache,dcache)来加速文件系统元数据性能,但是,文件系统目录项缓存的空间有限,且目录项是文件系统中诸多操作的必要参数,因此目录项缓存并不能满足文件系统对目录项的所有查找请求。当文件系统未在目录项缓存中查找到需要的目录项时,文件系统需要通过对路径信息的解析来访问存储系统,以获取需要的目录项及文件元数据。
大多键值存储系统基于日志结构合并树(Log-Structured Merge tree,LSM树),键值存储系统可以分为内存结构和盘上结构,内存结构包括内存表(memory table,memtable)、不可写内存表(immutable memory table,immutable)、有序字符串表(Sorted String Table,SST)以及有序字符串表信息缓存(SST Info Cache),盘上结构包括SST。SST由SST数据块和SST索引块两部分组成,SST数据块存储“键”和“值”(即键值对),SST索引块对SST数据块中的键值对进行索引,以快速的查找键值对在SST数据块中的地址。
相关技术中,主机在对待解析的路径信息中任一路径分量进行解析时,主机可以通过访问硬盘,获取该路径分量的前一个路径分量对应的元数据文件的数据,从该数据中查找到该路径分量对应的元数据文件的索引节点号。然后主机基于该路径分量对应的元数据文件的索引节点号,获取到该路径分量对应的元数据文件的索引节点块,基于该索引节点块,获取该路径分量对应的元数据文件的数据。
这样,在解析路径信息时,采用相关技术的方案,需要访问硬盘才能获取到路径分量对应的元数据文件的索引节点号,由于访问硬盘花费的时间比较多,所以导致解析路径信息的时延比较高。
发明内容
为了降低解析路径信息的整体时延,本申请实施例提供了一种获取索引节点号的方法、装置、计算设备和存储介质。
第一方面,提供了一种获取索引节点号的方法,该方法包括:获取目标路径分量对应的元数据文件的标识,其中,目标路径分量为待解析的路径信息中的多个路径分量中的任一路径分量,在被加载至内存的索引块中确定与元数据文件的标识对应的第一索引块,其中,第一索引块存储有元数据文件的标识与索引节点号的对应关系,内存为执行方法的设备的内存。根据对应关系,确定元数据文件的标识对应的索引节点号,其中,第一索引块对应的数据块存储有元数据文件的索引节点块。
其中,待解析的路径信息中包括的路径分量为多个。
本申请所示的方案,在对待解析路径信息的任一路径分量(可以称为是目标路径分量)进行解析时,主机可以获取目标路径分量对应的元数据文件的标识(该标识可以是目标路径分量的元数据文件的文件名)。然后主机可以在被加载至内存的索引块中,确定与该元数据文件的标识对应的第一索引块。然后主机在第一索引块中,使用目标路径分量对应的元数据文件的标识,查找该元数据文件的标识对应的索引节点号。这样,由于主机可以在主机的内存中获取到目标路径分量对应的元数据文件的索引节点号,而不需要访问硬盘获取,所以可以降低解析路径信息的时延。
在一种可能的实现方式中,在被加载至内存的索引块中,将第一索引节点块所在的数据块对应的索引块,确定为元数据文件的标识对应的第一索引块,其中,第一索引节点块为之前的路径分量对应的元数据文件的索引节点块,之前的路径分量为路径信息中排列在目标路径分量之前的路径分量。
本申请所示的方案,待解析的路径信息对应的文件的元数据文件的数据量比较小,同一路径信息下的路径分量对应的元数据文件的索引节点块,存储在一个索引块下的数据块的可能性比较大。这样,目标路径分量对应的元数据文件的索引节点块也会存储在该索引块下的数据块中,那么该索引块中存储有目标路径分量对应的元数据文件的标识与索引节点号的对应关系。主机可以将加载至主机的内存的该索引块确定为该元数据文件的标识对应的第一索引块,进而可以从第一索引块,获取到目标路径分量对应的元数据文件的索引节点号。这样,主机不需要访问硬盘,就可以获取到目标路径分量对应的元数据文件的索引节点号,可以降低解析路径信息的时延。
在一种可能的实现方式中,在被加载至内存的索引块中,将第二索引节点块所在的数据块对应的索引块,确定为元数据文件的标识对应的第一索引块,其中,第二索引节点块为第一路径分量对应的元数据文件的索引节点块,第一路径分量为路径信息中目标路径分量的前一个路径分量。
本申请所示的方案,目标路径分量的前一个路径分量下的子文件的数量比较少,使得存储该前一个路径分量下的子文件仅使用一个索引块下的数据块即可,那么该前一个 路径分量的索引块下的数据块中存储有目标路径分量对应的元数据文件的索引节点块,所以在该前一个路径分量对应的元数据文件所在的索引块中,存储有目标路径分量对应的元数据文件的标识对应的索引节点号。这样,主机可以将该索引块,确定为该元数据文件的标识对应的第一索引块,进而可以从第一索引块,获取到目标路径分量对应的元数据文件的索引节点号。因此,主机不需要访问硬盘,就可以获取到目标路径分量对应的元数据文件的索引节点号,可以降低解析路径信息的时延。
在一种可能的实现方式中,在属于被加载至内存的索引块的其它索引块中,确定元数据文件的标识对应的第一索引块,其中,其它索引块为被加载至内存的索引块中除第二索引块之外的索引块,第二索引块为第二索引节点块所在的数据块对应的索引块,第二索引节点块为第一路径分量对应的元数据文件的索引节点块,第一路径分量为路径信息中目标路径分量的前一个路径分量。
本申请所示的方案,目标路径分量的前一个路径分量下的子文件的数量比较多,使得存储该前一个路径分量下的子文件使用多个索引块下的数据块,那么该前一个路径分量的索引块(该索引块可以称为是第二索引块)下的数据块中未存储有目标路径分量对应的元数据文件的索引节点块,所以在该前一个路径分量对应的元数据文件所在的索引块中,未存储有目标路径分量对应的元数据文件的标识对应的索引节点号。主机可以在被加载内存的其它索引块中(被加载至内存的索引块中除第二索引块之外的索引块),确定目标路径分量对应的元数据文件的标识对应的第一索引块。这样,主机也可以从被加载内存的索引块中,获取到元数据文件的标识对应的第一索引块,进而可以从第一索引块,获取到目标路径分量对应的元数据文件的索引节点号。因此,主机不需要访问硬盘,就可以获取到目标路径分量对应的元数据文件的索引节点号,可以降低解析路径信息的时延。
在一种可能的实现方式中,在属于被加载至内存的索引块的其它索引块中,依次查找其它索引块中的各索引块,确定元数据文件的标识对应的第一索引块,其中,其它索引块中的第三索引块在其它索引块中的第四索引块之前被查找,第三索引块为第一元数据文件所在的数据块对应的索引块,第四索引块为第二元数据文件所在的数据块对应的索引块,第一元数据文件的写入时间点早于第二元数据文件的写入时间点。
本申请所示的方案,主机在被加载至内存的其它索引块中,确定目标路径分量对应的元数据文件的标识对应的第一索引块时,是先查找最新写入元数据文件的索引块。由于新存储的数据被查找的概率大,所以相对查找较少的索引块,主机就能确定出目标路径分量对应的元数据文件的标识对应的第一索引块,花费的时间较少。
在一种可能的实现方式中,目标路径分量为路径信息中除根目录路径分量之外的任一路径分量。
第二方面,提供了一种获取索引节点号的装置,该装置包括:
获取模块,用于获取目标路径分量对应的元数据文件的标识,其中,所述目标路径分量为待解析的路径信息中的多个路径分量中的任一路径分量;
确定模块,用于:
在被加载至内存的索引块中确定与所述元数据文件的标识对应的第一索引块,其 中,所述第一索引块存储有所述元数据文件的标识与索引节点号的对应关系,所述内存为执行所述方法的设备的内存;
根据所述对应关系,确定所述元数据文件的标识对应的索引节点号,其中,所述第一索引块对应的数据块存储有所述元数据文件的索引节点块。
在一种可能的实现方式中,所述确定模块,用于:
在被加载至内存的索引块中,将第一索引节点块所在的数据块对应的索引块,确定为所述元数据文件的标识对应的第一索引块,其中,所述第一索引节点块为之前的路径分量对应的元数据文件的索引节点块,所述之前的路径分量为所述路径信息中排列在所述目标路径分量之前的路径分量。
在一种可能的实现方式中,所述确定模块,用于:
在被加载至内存的索引块中,将第二索引节点块所在的数据块对应的索引块,确定为所述元数据文件的标识对应的第一索引块,其中,所述第二索引节点块为第一路径分量对应的元数据文件的索引节点块,所述第一路径分量为所述路径信息中所述目标路径分量的前一个路径分量。
在一种可能的实现方式中,所述确定模块,用于:
在属于被加载至内存的索引块的其它索引块中,确定所述元数据文件的标识对应的第一索引块,其中,其它索引块为被加载至内存的索引块中除第二索引块之外的索引块,所述第二索引块为第二索引节点块所在的数据块对应的索引块,所述第二索引节点块为第一路径分量对应的元数据文件的索引节点块,所述第一路径分量为所述路径信息中所述目标路径分量的前一个路径分量。
在一种可能的实现方式中,所述确定模块,用于:
在属于被加载至内存的索引块的其它索引块中,依次查找所述其它索引块中的各索引块,确定所述元数据文件的标识对应的第一索引块,其中,所述其它索引块中的第三索引块在所述其它索引块中的第四索引块之前被查找,所述第三索引块为第一元数据文件所在的数据块对应的索引块,所述第四索引块为第二元数据文件所在的数据块对应的索引块,所述第一元数据文件的写入时间点早于所述第二元数据文件的写入时间点。
在一种可能的实现方式中,所述目标路径分量为所述路径信息中除根目录路径分量之外的任一路径分量。
第三方面,提供了一种获取索引节点号的装置,该装置包括处理器和存储器,其中,所述处理器用于执行所述存储器包括的计算机指令,实现上述第一方面所述的获取索引节点号的方法。
第四方面,提供了一种获取索引节点号的计算设备,所述计算设备包括处理器和存储器,其中:
所述存储器中存储有计算机指令;所述处理器执行所述计算机指令,以实现上述第一方面所述的获取索引节点号的方法。
第五方面,提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算 机指令,当所述计算机可读存储介质中的计算机指令被计算设备执行时,使得所述计算设备执行上述第一方面所述的获取索引节点号的方法。
第六方面,提供了一种包含指令的计算机程序产品,当其在计算设备上运行时,使得计算设备执行上述第一方面所述的获取索引节点号的方法,或者使得计算设备实现上述第二方面及其可能的实现方式的装置的功能。
附图说明
图1是本申请一个示例性实施例提供的LSM树的系统架构图;
图2是本申请一个示例性实施例提供的SST的结构示意图;
图3是本申请一个示例性实施例提供的元数据存储服务的系统的结构示意图;
图4是本申请一个示例性实施例提供的主机的结构示意图;
图5是本申请一个示例性实施例提供的元数据键值化存储的示意图;
图6是本申请一个示例性实施例提供的SST索引块的结构示意图;
图7是本申请一个示例性实施例提供的SST索引块的结构示意图;
图8是本申请一个示例性实施例提供的获取索引节点号的方法的流程示意图;
图9是本申请一个示例性实施例提供的获取索引节点号的装置的结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
为了便于对本申请实施例的理解,下面首先介绍本申请实施例所涉及到的名词的概念:
文件系统,用于在存储设备上管理数据存储。文件系统可以是任意一种文件系统,如第四代扩展文件系统(4th extended file system,Ext4)、闪存友好文件系统(Flash friendly file system,F2FS)等。
解析路径信息(也可以称为是路径解析),通过对文件的路径信息进行解析,获取文件的过程。具体的,在对文件的路径信息进行解析的过程中,依次对文件的路径信息中的每个路径分量进行解析,得到所要获取的文件的地址信息,基于该地址信息,获取到文件。
LSM树,广泛应用于键值存储系统(键值存储系统使用键值对存储数据)。如图1所示,LSM树的索引树结构是一大一小两颗树,较小的一个树存储在主机的内存C 0(可以称为是内存缓存区),较大的一个树持久化到硬盘(如C 1、C 2、…、C k)。数据的写入操作会首先操作主机的内存,随着主机的内存中树的不断变大,会触发与硬盘中的树进行合并操作。LSM树应用在数据库上可以有多种实现(如基于LSM树实现的键值数据库LevelDB和RocksDB),LSM树可以分为内存结构和盘上结构。内存结构可以包括内存表(memtable)、不可写内存表(immutable)(memtable和immutable可以称为是内存缓存区)、SST信息缓存(SST Info Cache),内存结构为上述C 0,盘上结构的每一层相当于上述C 1、C 2、…、C k
SST,是键值存储系统将键值对持久化到硬盘时组织键值对的形式,如图2所示,LSM树中包括多个SST,每个SST可以由两部分组成,一部分是SST索引块,另一部分是SST数据块(一个SST中的SST数据块为一个或多个)。在SST数据块中使用“键”和“值”的形式存储数据,在SST索引块中对SST数据块的“键”和“值”进行索引,以快速定位查找的键值对在SST数据块中的位置信息。因此,在生成一个新的SST时,键值存储系统先确定SST数据块,再根据该SST数据块生成SST索引块,在生成SST索引块中记录SST数据块中键值对的位置信息。对于某个SST,主机在访问该SST时,该SST的索引块才会被加载到主机的内存中,具体是加载到SST信息缓存。
元数据文件的索引节点块,存储在SST数据块中,存储文件的元数据文件的信息。如元数据文件可以包括文件的创建者及权限、文件的创建日期、文件的大小及文件的数据标识等。元数据文件的索引节点块,用于查找元数据文件的数据主体。
元数据文件的索引节点号,用于索引路径分量对应的元数据文件的索引节点块。对于一个路径分量,不管该路径分量对应的元数据文件的索引节点块中的信息是否有更新,用于索引该路径分量对应的元数据文件的索引节点块的索引节点号不会改变。
目前在文件系统中,主机将文件系统的元数据转换为使用键值存储系统存储,以键值存储系统为LevelDB为例,具体处理为:文件系统的元数据文件使用键值存储系统来存储时,主机需要将文件系统的元数据文件转换为键值对的形式。每个元数据文件的数据需要两个键值对存储,一个键值对存储元数据文件的索引节点块,该键值对的键为元数据文件的索引节点块的标识(后续可以称为是索引节点号),该键对应的值为索引节点块;另一个键值对存储元数据文件的数据主体,该键值对的键为元数据文件的数据标识,该键对应的值为元数据文件的数据。
例如,1.txt文件的元数据文件的路径信息为/home/foo/1.txt,将元数据文件键值化存储后,结构图如图3所示,最左侧的“/”为根目录,“home”为“/”的子目录,“foo”为“home”的子目录,“/”、“home”和“foo”作为目录,它们对应的元数据文件均可以使用两个键值对表示,一个键值对存储元数据文件的索引节点块,另一个键值对存储元数据文件的数据主体(如对于“home”,一个键值对存储home对应的元数据文件的索引节点块,另一个键值对存储home对应的元数据文件的数据主体)。在图3中,“etc”表示根目录“/”的某个其他子目录,“bar”表示“home”的某个其他子目录。此处需要说明的是,对于普通文件1.txt,由于1.txt的数据可以使用任何方式存储,所以1.txt的键值对有可能仅有一个,即仅有索引节点号与索引节点块的键值对。
主机在将元数据文件键值化后,主机可以将元数据文件的键值对存储在数据块中。主机将键值对存储在数据块后,在数据块对应的索引块中建立索引项(索引项键包括索引项键和索引项值),且一个索引项对应一个键值对。具体的,某个数据块中存储有元数据文件的索引节点号与元数据文件的索引节点块的键值对,该键值对在该数据块对应的索引块中的索引项为:元数据文件的索引节点号与元数据文件的索引节点块所在数据块的位置信息的索引项(索引项键为元数据文件的索引节点号,索引项值为元数据文件的索引节点块所在数据块的位置信息)。某个数据块中存储有元数据文件的数据标识与元数据文件的数据的键值对,该键值对在该数据块对应的索引块中的索引项为:元数据文件的数据标识与元数据文件的数据的位置信息的索引项(索引项键为元数据文件的数 据标识,索引项值为元数据文件的数据的位置信息)。
此处需要说明的是,由于在文件系统下,文件系统使用“/”切分路径信息,将路径信息切分为多个路径分量,每个路径分量实际上对应一个文件(该文件可以为目录文件或者普通文件)。若路径分量对应目录文件,则该目录文件为该路径分量对应的元数据文件,若路径分量对应普通文件,则该普通文件的索引节点块为该路径分量对应的元数据文件,而该普通文件的数据不是该路径分量对应的元数据文件。例如,路径信息为/home/foo/1.txt,最左侧的“/”、“home”、“foo”和“1.txt”均可以称为是路径分量,最左侧的“/”、“home”、“foo”分别对应的文件为目录文件,“1.txt”对应的文件为普通文件。
这样,由于索引块中存储有元数据文件的索引节点号与元数据文件的索引节点块所在数据块的位置信息的索引项,后续在解析某个路径分量时,主机可以使用该路径分量对应的元数据文件的索引节点号,找到索引节点块所在数据块的位置信息,从而获得索引节点块所在数据块,进而从该数据块中,获取索引节点。进而可以从索引节点块中,获取到该路径分量对应的元数据文件的数据标识。而且由于索引块中存储有路径分量对应的元数据文件的数据标识与元数据文件的数据的位置信息的索引项,主机可以使用路径分量对应的元数据文件的数据标识,查找到对应的位置信息,使用该位置信息,找到该路径分量对应的元数据文件的数据。
此处需要说明的是,为了后续方便描述,将“路径分量对应的元数据文件的索引节点号”简称为“路径分量的索引节点号”;将“路径分量对应的元数据文件的索引节点块”简称为“路径分量的索引节点块”;将“路径分量对应的元数据文件的数据标识”简称为“路径分量的数据标识”;将“路径分量对应的元数据文件的数据”简称为“路径分量的数据”。
主机在获取某个文件的数据时,首先要获取该文件的索引节点块,相关技术中具体处理步骤为(以使用路径信息/home/foo/1.txt查找文件1.txt的数据为例进行说明(根目录/、home、foo和1.txt可以称为是路径分量,根目录/的元数据信息一般为已知,被缓存在主机的内容中)):
步骤1,在主机启动时,根目录“/”对应的元数据文件已经被存储在主机的内存,主机使用路径分量home的标识,在根目录“/”对应的元数据文件中查找到路径分量home的索引节点号。
步骤2,主机使用路径分量home的索引节点号,在键值存储系统的内存缓存区(memtable、immutable)中,查找该索引节点号对应的索引节点块。若该内存缓存区不存在该索引节点号对应的索引节点块,则主机依次在C 1层至C k层的SST索引块的索引项中,使用路径分量home的索引节点号,查找路径分量home的索引节点块所在的SST数据块的位置信息。主机使用该位置信息在硬盘中确定出该SST数据块,然后主机使用该索引节点号,在该SST数据块中读取路径分量home的索引节点块。此处需要说明的是,在读取至某个SST时,才会将该SST的SST索引块缓存至主机的内存中。
步骤3,主机从路径分量home的索引节点块中读取到路径分量home的数据标识。
步骤4,主机使用该数据标识,在SST索引块的路径分量的数据标识与路径分量的数据的位置信息的索引项中,查找路径分量home的数据标识对应的位置信息。主机使 用该位置信息,从硬盘中读取路径分量home的数据。
步骤5,主机在路径分量home的数据中查找到路径分量foo的索引节点号。
步骤6,主机使用路径分量foo的索引节点号,在键值存储系统的内存缓存区(memtable、immutable)中,查找该索引节点号对应的索引节点块。若该内存缓存区不存在索引节点号对应的索引节点块,则主机依次在C 1层至C k层的SST索引块的索引项中,使用路径分量foo的索引节点号,查找路径分量foo的索引节点块所在的SST数据块的位置信息。主机使用该位置信息在硬盘中确定出该SST数据块,然后主机使用该索引节点号,在该SST数据块中读取路径分量foo的索引节点块。
步骤7,主机从路径分量foo的索引节点块中读取到路径分量foo的数据标识。
步骤8,主机使用该数据标识,在SST索引块的路径分量的数据标识与路径分量的数据的位置信息的索引项中,查找路径分量foo的数据标识对应的位置信息。主机使用该位置信息,从硬盘中读取到路径分量foo的数据。
步骤9,主机在路径分量foo的数据中查找路径分量1.txt的索引节点号。
步骤10,主机使用路径分量1.txt的索引节点号,在键值存储系统的内存缓存区(memtable、immutable)中,查找该索引节点号对应的索引节点块。若该内存缓存区不存在索引节点号对应的索引节点块,则主机依次在C 1层至C k层的SST索引块的索引项中,使用路径分量1.txt的索引节点号,查找路径分量1.txt的索引节点块所在的SST数据块的位置信息。主机使用该位置信息在硬盘中确定出该SST数据块,然后主机使用该索引节点号,在该SST数据块中读取路径分量1.txt的索引节点块。
后续主机还可以执行步骤11和步骤12读取到1.txt的数据,具体处理为:
步骤11,在1.txt的索引节点块中读取1.txt数据块的地址。
步骤12,主机使用该地址,读取到1.txt的数据。
通过上述描述可知,上述步骤2、步骤4、步骤6、步骤8和步骤10均需要访问硬盘。这样,在解析的路径信息的路径分量比较多时,需要访问硬盘的次数比较多,使得路径信息的解析的整体时延比较高,所以需要提供一种降低解析路径信息的时延的方法。
还需要说明的是,上述内存缓存区设置在主机的内存中。
在对本申请实施例提供的获取索引节点号的方法介绍之前,首先对本申请实施例所适用的应用场景和系统进行介绍。
本申请实施例中,使用键值存储系统提供存储和管理文件系统的元数据文件的存储服务,使用的系统架构如图4所示,在可移植操作系统接口(Portable Operating System Interface of UNIX,POSIX)与键值存储系统之间设置文件系统接口的包裹层(包裹层可以理解为一段代码,在包裹层对键值接口进行转换,实际上是主机通过运行这一段代码实现)。应用调用文件系统的元数据文件的存储服务时,所见和所使用的是POSIX,键值存储系统向文件系统接口的包裹层所暴露的是键值接口。键值存储系统的键值接口通过文件系统接口的包裹层的包裹后,转换为文件系统使用的POSIX,从而向使用POSIX的应用提供文件系统的元数据文件的存储服务。键值存储系统组织的键值对被存储在存储设备(如硬盘等)中,根据键值接口的调用来对存储设备中的数据进行相应的操作(如在键值存储系统是LevelDB时,可以将键值对批量组织成SST的形式存储到存储设备中, 根据键值接口的调用来对存储设备中SST中的数据进行相应的操作)。文件系统接口的包裹层完成键值接口与文件系统POSIX之间的转换工作。在上述系统架构下,应用不感知为其提供元数据文件的存储服务实际上是键值存储系统。
需要说明的是,上述元数据文件在存储至键值存储系统时,可以基于文件系统进行存储,也可以基于其他方式存储,本申请实施例不做限定。上述存储设备可以是本地存储服务中的存储设备,也可以是云存储服务中的存储设备,如弹性块存储服务(Elastic Block Store,EBS)中的存储设备、对象存储系统S3中的存储设备等。
还需要说明的是,上述键值存储系统是任意一种存储系统,如LevelDB,TiKV等,在后续的过程中,使用键值存储系统为LevelDB为例进行说明。
还需要说明的是,POSIX的标准接口可以为open(A),其中,A为所要打开的文件的路径信息,open()接口表示打开一个文件,具体打开哪个目标文件由A指定。键值接口是键值存储系统的接口,如GET(键(Key))等,表示获取键(Key)对应的值(Value)。包裹层的转换为:以路径信息/home/foo/1.txt为例,POSIX标准接口提交open(“/home/foo/1.txt”)操作,通过包裹层转换为多个有序的键值操作:GET(/)、GET(home)、GET(foo)、GET(1.txt)。此处仅为一种举例的形式,不作为本申请实施例的限定。
获取索引节点号的方法可以由获取索引节点号的装置执行,获取索引节点号的装置可以是一个硬件装置,如主机等,也可以是一个软件装置(如可以为运行在硬件装置上的一套软件程序)。
在获取索引节点号的方法由主机执行时,图5示例性的提供了本申请的主机的一种可能的架构图。主机可以包括处理器501、存储器502、通信接口503和总线504。在主机中,处理器501的数量可以是一个或多个,图5仅示意了其中一个处理器501。可选的,处理器501可以是中央处理器(Central Processing Unit,CPU)。若主机具有多个处理器501,多个处理器501的类型可以不同,或者可以相同。可选的,主机的多个处理器还可以集成为多核处理器。
存储器502存储计算机指令和数据,存储器502可以存储实现本申请提供的获取索引节点号的方法所需的计算机指令和数据。例如,存储器502存储用于实现本申请提供的获取索引节点号的方法中获取模块执行步骤的指令。再例如,存储器502存储用于本申请提供的获取索引节点号的方法中确定模块执行步骤的指令等。存储器502可以是以下存储介质的任一种或任一种组合:非易失性存储器(如只读存储器(Read-Only Memory,ROM)、固态硬盘(Solid State Disk,SSD)、硬盘(Hard Disk Drive,HDD)、光盘等)、易失性存储器。
通信接口503可以是以下器件的任一种或任一种组合:网络接口(如以太网接口)、无线网卡等具有网络接入功能的器件。
通信接口503用于主机与其他主机或者终端进行数据通信。
总线504可以将处理器501与存储器502、通信接口503连接。这样,通过总线504,处理器501可以访问存储器502,还可以利用通信接口503与其它主机或者终端进行数据交互。
在本申请中,主机执行存储器502中的计算机指令,使用主机实现本申请提供的获 取索引节点号的方法。例如,使得主机执行上述获取索引节点号的方法中由确定模块执行的步骤。
下面将对本申请实施例提供的获取索引节点号的方法进行说明,以下以执行获取索引节点号的方法的主体为主机为例进行方案的说明。
在进行获取索引节点号之前,主机将文件系统的元数据文件转换为使用键值存储系统存储。
本实施例中,主机在键值存储系统写入元数据文件的过程与上述描述过程完全相同,只不过在建立索引项时,若数据块存储有元数据文件的索引节点号与元数据文件的索引节点块的键值对,则在上述元数据文件的索引节点号与元数据文件的索引节点块所在数据块的位置信息的索引项的基础上,该数据块对应的索引块中增加了:元数据文件的标识(也可以称为元数据文件的文件名)与元数据文件的索引节点号的索引项(索引项键为元数据文件的标识,索引项值为元数据文件的索引节点号),即增加了元数据文件的标识与元数据文件的索引节点号的对应关系。
具体的对于某个路径分量对应的元数据文件,在建立路径分量对应元数据文件的标识(可以称为是路径分量的标识)与路径分量对应的元数据文件的索引节点号的索引项时,主机可以在该路径分量的前一个路径分量的数据中获取到该路径分量对应的元数据文件的索引节点号(主机可以在该前一个路径分量的数据写入键值存储系统时获取)。这样,在解析某个路径分量时,主机可以在索引块中直接查找到该路径分量对应的元数据文件的索引节点号,而不需要从该路径分量相邻的前一个路径分量的数据中获得,那么也不需要访问硬盘获取该前一个路径分量的数据,所以可以减少硬盘的访问次数。具体如何查找,在后面图8所示的流程中进行详细说明。
具体的,本申请实施例在键值存储系统LevelDB中,将元数据文件使用键值对的方式在SST的SST数据块中进行存储。以元数据文件的路径信息为/home/foo/1.txt为例,首先在SST的SST数据块中建立元数据文件的键值对,具体可以为:键为路径分量home的索引节点号,值为路径分量home的索引节点块;键为路径分量foo的索引节点号,值为路径分量foo的索引节点块;键为路径分量1.txt的索引节点号,值为路径分量1.txt的索引节点块。SST数据块中还存储有键为路径分量home的数据标识、值为路径分量home的数据的键值对,路径分量foo与路径分量home类似,此处不再赘述。对于路径分量1.txt,由于文件1.txt是普通文件,所以文件1.txt的数据不是元数据,进而文件1.txt的数据可以不按照元数据文件的方式进行存储。
相应的,如图6所示,在SST索引块中记录SST数据块中各键值对的索引项,SST数据块中一个键值对对应一个索引项。在SST数据块中键值对为路径分量home的索引节点号和路径分量home的索引节点块时,在该SST数据块对应的SST索引块中,索引项包括:索引项键为路径分量home的标识,该索引项键对应的索引项值为路径分量的索引节点号;索引项键为路径分量home的索引节点号,该索引项键对应的索引项值为路径分量home的索引节点块所在SST数据块的位置信息。在SST数据块中键值对为路径分量home的数据标识和路径分量home的数据时,在该SST数据块对应的SST索引块中,索引项包括:索引项键为路径分量home的数据标识,该索引项键对应的索引项值 为路径分量home的数据的位置信息。路径分量foo和路径分量1.txt,与路径分量home类似,此处不再赘述。这样,主机可以从路径分量的索引节点块所在SST数据块对应的SST索引块中,查找到该路径分量的索引节点号,而不需要从该路径分量的前一个路径分量的数据中获取,所以不需要获取该前一个路径分量的数据,进而不要访问硬盘,可以减少硬盘的访问次数。
另外,在索引项键为路径分量的标识时,索引项值还可以包括元数据文件的访问权限信息等。
此处需要说明的是,对于任一元数据文件,由于键值存储系统是先将元数据文件对应的键值对存储至数据块中,然后才建立这些键值对的索引信息,所以主机可以确定出任一元数据文件的索引节点号,以及索引节点块所在的数据块。例如,在路径分量home对应的元数据文件的数据中存储有路径分量foo的索引节点号,所以可以获取到路径分量foo对应的元数据文件的索引节点号。
此处还需要说明的是,假设路径信息为/home/foo/1.txt,路径分量foo的前一个路径分量为路径分量home,路径分量1.txt的前一个路径分量为路径分量foo。
上述在索引块中存储数据块的键值对的索引信息的方式仅为一种可行的方式,当然也可以是按照其它方式。例如,如图7所示,以路径信息为/home/foo/1.txt为例,将上述描述的SST索引块中的三个索引项,组织在一个索引项键和索引项值的对应关系中。
以下结合图8对路径信息的解析过程进行说明:
步骤801,主机获取目标路径分量对应的元数据文件的标识。
本实施例中,有应用想要从主机上读取文件(该文件后续可以被称为是待获取文件),该应用会将文件的路径信息传输给主机的键值存储系统。待获取文件的路径信息包括满足POSIX相应接口要求的路径信息。主机的键值存储系统在解析该路径信息中的任一路径分量时(可以称为是目标路径分量),可以获取目标路径分量对应的元数据文件的标识,该标识可以是目标路径分量对应的元数据文件的文件名,也可以是一个逻辑标识。
例如,应用通过POSIX提交open(“/home/foo/1.txt”)操作至主机上的包裹层,主机上的包裹层将open(“/home/foo/1.txt”)操作,转换为键值存储系统所能识别的键值操作GET(/)、GET(home)、GET(foo)、GET(1.txt)。这样,主机的键值存储系统就可以接收到GET(/)操作、GET(home)操作、GET(foo)操作、GET(1.txt)操作。
需要说明的是,上述应用可以是安装在主机上的应用,也可以不是安装在主机上的应用。文件系统对文件进行操作前,首先要获取待获取文件的元数据文件,而本申请中文件系统的元数据文件使用键值存储系统存储,所以应用会将文件的路径信息传输至主机的键值存储系统。
还需要说明的是,由于POSIX与键值存储系统之间设置有包裹层,进行操作的转换,所以对于应用,其不会感知到为其提供文件系统的元数据的存储服务实际上是键值存储系统。此处路径信息中排列在最前面的路径分量为根目录,在主机启动时,根目录的元数据文件会被缓存在主机的内存中,所以主机不基于索引节点号,获取根目录的索引节点块,所以目标路径分量为路径信息中除根目录路径分量之外的任一路径分量。
步骤802,主机在被加载至内存的索引块中确定与元数据文件的标识对应的第一索 引块。
本实施例中,主机可以在被加载至主机的内存的索引块中,使用目标路径分量对应的元数据文件的标识,确定出与该元数据文件的标识对应的第一索引块。如前文中描述,第一索引块存储有元数据文件的标识与索引节点号的对应关系,第一索引块对应的数据块存储有该元数据文件的索引节点块。
步骤803,主机根据对应关系,确定元数据文件的标识对应的索引节点号。
本实施例中,主机可以在元数据文件的标识与索引节点号的对应关系中,查找到目标路径分量对应的元数据文件的标识对应的索引节点号,即获取到目标路径分量对应的元数据文件的索引节点号。
这样,由于主机可以在主机的内存中获取到目标路径分量对应的元数据文件的索引节点号,而不需要访问硬盘获取,所以可以降低解析路径信息的时延。
上述步骤802的一种可能实现方式中,主机在被加载至内存的索引块中,将第一索引节点块所在的数据块对应的索引块,确定为目标路径分量对应的元数据文件的标识对应的第一索引块,第一索引节点块为之前的路径分量对应的元数据文件的索引节点块,之前的路径分量为路径信息中排列在目标路径分量之前的路径分量。
本实施例中,对于目标路径分量,主机首先使用目标路径分量对应的元数据文件的标识,在键值存储系统的内存缓存区中查找是否存在目标路径分量对应的元数据文件的索引节点号。若该内存缓存区存在目标路径分量对应的元数据文件的索引节点号,则向POSIX返回该索引节点号;若该内存缓存区不存在目标路径分量对应的元数据文件的索引节点号,则主机确定路径信息中目标路径分量之前的路径分量。然后主机确定目标路径分量之前的路径分量的第一索引节点块所在的数据块,确定该数据块对应的索引块。主机将该索引块确定为与目标路径分量对应的元数据文件的标识对应的第一索引块。
这样,待解析的路径信息对应的文件的元数据文件的数据量比较小,同一路径信息下的路径分量对应的元数据文件的索引节点块,存储在一个索引块下的数据块的可能性比较大。这样,目标路径分量对应的元数据文件的索引节点块也会存储在该索引块下的数据块中,那么该索引块中存储有目标路径分量对应的元数据文件的标识与索引节点号的对应关系。主机可以将加载至主机的内存的该索引块,确定为该元数据文件的标识对应的第一索引块,进而主机可以从第一索引块,获取到目标路径分量对应的元数据文件的索引节点号。这样,主机不需要访问硬盘,就可以获取到目标路径分量对应的元数据文件的索引节点号,可以降低解析路径信息的时延。
上述步骤802的一种可能实现方式中,主机在被加载至内存的索引块中,将第二索引节点块所在的数据块对应的索引块,确定为元数据文件的标识对应的第一索引块,其中,第二索引节点块为第一路径分量对应的元数据文件的索引节点块,第一路径分量为路径信息中目标路径分量的前一个路径分量。
本实施例中,在主机的内存缓存区不存在目标路径分量对应的元数据文件的索引节点号的情况下,主机可以确定路径信息中目标路径分量的前一个路径分量。主机使用该前一个路径分量对应的元数据文件的标识,确定该前一个路径分量对应的元数据文件的第二索引节点块所在的索引块,该索引块后续可以称为是第二索引块。主机将加载至该内存的第二索引块,确定为与目标路径分量对应的元数据文件的标识对应的第一索引 块。例如,主机使用该前一个路径分量对应元数据文件的标识,确定该前一个路径分量的SST索引块,在该SST索引块中,使用目标路径分量对应的元数据文件的标识,查找目标路径分量对应的元数据文件的索引节点号。
上述过程中将第二索引块,确定为与目标路径分量对应的元数据文件的标识对应的第一索引块的原因为:
目标路径分量的前一个路径分量下的子文件的数量比较少,使得存储该前一个路径分量下的子文件仅使用一个索引块下的数据块即可,那么该前一个路径分量的索引块下的数据块中存储有目标路径分量对应的元数据文件的索引节点块,所以在该前一个路径分量对应的元数据文件所在的第二索引块中,存储有目标路径分量对应的元数据文件的标识对应的索引节点号。这样,主机可以将第二索引块,确定为该元数据文件的标识对应的第一索引块,进而可以从第一索引块,获取到目标路径分量对应的元数据文件的索引节点号。因此,主机不需要访问硬盘,就可以获取到目标路径分量对应的元数据文件的索引节点号,可以降低解析路径信息的时延。
对于另外一些情况,第二索引块中未存储目标路径分量对应的元数据文件的索引节点号,那么主机在第二索引块,就查找不到目标路径分量对应的元数据文件的索引节点号。其中,上述另外一些情况包括但不限于以下情况:目标路径分量的前一个路径分量下的子文件的数量比较多,使得存储该前一个路径分量的子文件需要使用多个索引块下的数据块才能完全存储。这样,在这种情况下,目标路径分量对应的元数据文件的索引节点块与该前一个路径分量的索引节点块就不属于一个索引块下的数据块中,那么目标路径分量对应的元数据文件的索引节点号未存储在第二索引块。这种情况下,可以按照下述方式进行查找:
主机在第二索引块中未查找到目标路径分量对应的元数据文件的索引节点号时,可以确定被加载至内存的索引块中除第二索引块之外的其它索引块(即键值存储系统中,被加载至内存的索引块中除第二索引块之外的其它索引块)。在键值存储系统的内存缓存区以及该其它索引块中,主机使用目标路径分量对应的元数据文件的标识,在内存缓存区,查找是否存在该标识对应的索引节点号,若存在该标识对应的索引节点号,则获取到目标路径分量对应的元数据文件的索引节点号,返回给POSIX。若未存在该标识对应的索引节点号,则在被加载至主机的内存的其它索引块中,确定与目标路径分量对应的元数据文件的标识对应的第一索引块。这样,主机也可以从被加载内存的索引块中,获取到元数据文件的标识对应的第一索引块,进而可以从第一索引块,获取到目标路径分量对应的元数据文件的索引节点号。因此,主机不需要访问硬盘,就可以获取到目标路径分量对应的元数据文件的索引节点号,可以降低解析路径信息的时延。
此处需要说明的是,对应上述另外一些情况,采用相关技术的方式,目标路径分量的前一个路径分量的数据有可能也存储在其它索引块的数据块下,此时,主机需要使用该前一个路径分量的数据标识,依次在内存缓存区和其它索引块中,查找该前一个路径分量的数据的位置信息。在主机查找到该前一个路径分量的数据的位置信息后,还需要访问硬盘获取该前一个路径分量对应的元数据文件的数据,从该数据中读取目标路径分量对应的元数据文件的索引节点号。而本申请中,主机可以在内存缓存区或者被加载至内存的其它索引块中,查找目标路径分量对应的元数据文件的索引节点号,而不需要访 问硬盘获取该前一个路径分量对应的元数据文件的数据,可以减少硬盘的访问次数。
此处还需要说明的是,在内存缓存区中存储一个路径分量对应的元数据文件时,是存储该路径分量对应的元数据文件的索引节点号与索引节点块的键值对,以及存储该路径分量对应的元数据文件的标识与索引节点号的键值对。
另外,若内存缓存区和在其它索引块的任一索引块中,均不存在目标路径分量对应的元数据文件的索引节点号,则表示目标路径分量对应的元数据文件的索引节点块不存在。主机可以向POSIX返回目标路径分量对应的元数据文件的索引节点块缺乏的指示信息。
在一种可能的实现方式中,主机在被加载至内存的其它索引块中,依次查找其它索引块中的各索引块,确定元数据文件的标识对应的第一索引块。具体处理为:
主机可以确定其它索引块所对应的元数据文件在写入键值存储系统的数据块的写入顺序,按照元数据文件的写入时间顺序,元数据文件写入时间早的位置优先被查找。具体的先查找内存缓存区(前文中已经描述,此处不再赘述),然后再查找其它索引块。主机在查找其它索引块时,主机按照元数据文件的写入时间顺序,将其它索引块依次加载至主机的内存中,每加载至主机的内存中一个索引块,使用目标路径分量对应的元数据文件的标识,确定是否是该标识对应的第一索引块。如果是该标识对应的第一索引块,则主机执行步骤803,如果不是该标识对应的第一索引块,则主机继续按照元数据文件的写入时间顺序,加载下一个索引块至主机的内存,直至找完其它索引块,或者直至找到与目标路径分量对应的元数据文件的标识对应的第一索引块。例如,其它索引块中的第三索引块在其它索引块中的第四索引块之前被查找,第三索引块为第一元数据文件所在的数据块对应的索引块,第四索引块为第二元数据文件所在的数据块对应的索引块,第一元数据文件的写入时间点早于第二元数据文件的写入时间点,也即第一元数据文件对应的第一时长小于第二元数据文件对应的第二时长,第一时长为第一元数据文件的开始写入时间点距离当前时间点的时长,第二时长为第二元数据文件的开始写入时间点距离当前时间点的时长。
这样,主机在被加载至内存的其它索引块中,确定目标路径分量对应的元数据文件的标识对应的第一索引块时,是先查找最新写入元数据文件的索引块。由于新存储的数据被查找的概率大,所以相对查找较少的索引块,主机就能确定出目标路径分量对应的元数据文件的标识对应的第一索引块,花费的时间较少。
例如,在基于LSM树的键值存储系统中,内存缓存区为C 0(包括memtable和immutable),最新写入的数据写入在C 0,随着后续的写操作,数据会依次从C 0逐渐移动至C 1,直至C k。从新数据向旧数据的查找过程,即为依次从C 0查找至C k,此处需要说明的是先查找memtable,再查找immutable。
在一种可能的实现方式中,在主机获取到目标路径分量的前一个路径分量对应的元数据文件的索引节点块时,主机可以在该索引节点块中,获取该前一个路径分量对应的元数据文件的数据的数据量。主机判断该数据量是否大于预设数值,若该数据量小于或等于预设数值,则主机在解析目标路径分量的索引节点号时,可以采用图8所示的流程。若该数据量大于预设数值,则主机在解析目标路径分量的索引节点号时,可以采用图8所示的流程,也可以基于前一个路径分量对应的元数据文件的索引节点块,获取该前一 个路径分量对应的元数据文件的数据。主机从该数据中,获取到目标路径分量对应的元数据文件的索引节点号。
在一种可能的实现方式中,主机查找到目标路径分量对应的元数据文件的索引节点号后,主机以该目标路径分量对应的元数据文件的索引节点号为索引项键,在键值存储系统中查找这个索引项键对应的索引项值,根据该索引项值获得目标路径分量对应的元数据文件的索引节点块。
例如,在键值存储系统为LevelDB时,假设路径信息为/home/foo/1.txt,目标路径分量为foo,主机使用foo对应的元数据文件的索引节点号作为索引项键,依次在C 0(memtable、immutable)、C 1层的SST、C 1层的SST直至C k层的SST中查找路径分量foo对应的元数据文件的索引节点号对应的索引项值,若在某一层查找到foo对应的元数据文件的索引节点号对应的索引项值,则不需要再向后继续查找。具体在memtable、immutable中查找索引节点号对应的值时,由于memtable、immutable是使用键值对的方式存储,所以在memtable、immutable中,路径分量foo对应的元数据文件的索引节点号对应的索引项值即为路径分量foo对应的元数据文件的索引节点号对应的索引节点块。而在C 1层的SST、C 2层的SST直至C k层中任一层的SST中查找路径分量foo对应的元数据文件的索引节点号对应的索引项值时,主机首先在SST的SST索引块中查找到路径分量foo对应的元数据文件的索引节点号对应的位置信息,该位置信息为路径分量foo对应的元数据文件的索引节点号对应的索引项值。主机使用该位置信息,确定出路径分量foo对应的元数据文件的索引节点块所在的SST数据块。然后主机使用路径分量foo对应的元数据文件的索引节点号,在该SST数据块中,确定路径分量foo对应的元数据文件的索引节点号对应的内容,该内容即为路径分量foo对应的元数据文件的索引节点块。
此处需要说明的是,对于某个路径分量,虽然该路径分量的索引节点块所属SST的SST索引块中记录了该路径分量对应的元数据文件的索引节点号与该路径分量对应的元数据文件的索引节点块所属SST数据块的位置信息的索引项,但是并不会在该SST索引块所属的SST中,使用该位置信息查找到该索引节点块所在的数据块的原因为:当前SST中的索引节点块有可能不是最新的索引节点块,会使获取到的索引节点块不正确。
从图8所示的流程可知,上述图8的流程中,是以路径信息中的目标路径分量为例说明获取索引节点号的流程,对于待解析的路径信息中除根目录之外的路径分量,主机均可以使用图8的流程获取索引节点号,本申请实施例不做限定。
另外,由于本申请实施例中满足POSIX规范,所以在解析待解析的路径信息时,是按照路径信息的各路径分量的排列顺序,依次解析各路径分量,获得各路径分量对应的元数据文件的索引节点号,在解析到路径信息的最后一个路径分量对应的元数据文件的索引节点号时,通过最后一个路径分量对应的元数据文件的索引节点号,获得最后一个路径分量对应的元数据文件的索引节点块,进而获得路径信息对应的文件。
本实施例中,主机可以按照路径信息中各路径分量的排列顺序,首先解析排在最前面的路径分量,然后解析排列的第二个路径分量,获得第二个路径分量对应的元数据文件的索引节点号和索引节点块。主机再解析排列的第三个路径分量,获得第三个路径分量对应的元数据文件的索引节点号和索引节点块,直到路径信息中的所有路径分量均解 析完毕,得到路径信息的最后一个路径分量的索引节点号和索引节点块。主机在最后一个路径分量的索引节点块中,获取路径信息对应的文件的地址信息。然后主机使用该地址信息,确定待路径信息对应的文件所存放的位置,从该位置获取路径信息对应的文件。
需要说明的是,在上述路径信息的解析过程中,虽然主机获取到每个路径分量对应的元数据文件的索引节点块,但是主机仅使用最后一个路径分量对应的元数据文件的索引节点块来查找所要获取文件的数据。主机获取路径信息中除最后一个路径分量之外的其它路径分量对应的元数据文件的索引节点块的原因是:1)本申请实施例的方案符合POSIX规范,由于应用通过POSIX提交至键值存储系统的操作是用于获取每个路径分量对应的元数据文件的索引节点块的操作,所以主机的键值存储系统要向POSIX返回索引节点块,从而满足POSIX的要求;2)此处以路径信息/home/foo/1.txt为例,主机的键值存储系统给POSIX返回路径分量home对应的元数据文件的索引节点块,POSIX确认路径分量foo的上层目录(即路径分量home)是正确的,才会继续解析路径分量foo;3)路径信息中的路径分量有可能会发生更新(如路径信息为/home/foo/1.txt,更新后变为/home/aa/bb/foo/1.txt),只有依次解析才会解析到正确的路径分量,保证给POSIX返回正确的路径分量对应的元数据文件的索引节点块。所以为了保证路径信息的解析过程正常进行,主机的键值存储系统要向POSIX返回每个路径分量对应的元数据文件的索引节点块。
为了更好的理解本申请实施例,本申请实施例还提供了键值存储系统为LevelDB时,对/home/foo/1.txt进行路径信息的解析的过程,假设SST索引块和文件系统的根目录/的数据已被缓存到主机的内存中。需要完成以下步骤,以获得文件1.txt的索引节点块(此过程中,将“路径分量对应的元数据文件的索引节点号”简称为“路径分量的索引节点号”;将“路径分量对应的元数据文件的索引节点块”简称为“路径分量的索引节点块”;将“路径分量对应的元数据文件的数据标识”简称为“路径分量的数据标识”;将“路径分量对应的元数据文件的数据”简称为“路径分量的数据”):
步骤S1,主机在根目录“/”的数据中,使用路径分量home的标识,获取到路径分量home的索引节点号。
步骤S2,主机使用路径分量home的索引节点号,依次在memtable、immutable、C 1层的SST、C 2层的SST直至C k层的SST中,将路径分量home的索引节点号作为索引项键,查找路径分量home的索引节点号对应的索引项值。若是在memtable、immutable中找到路径分量home的索引节点号对应的索引项值,则主机可以将该索引项值确定为路径分量home的索引节点块。若主机未在memtable、immutable中找到路径分量home的索引节点号对应的索引项值,则主机可以依次在C 1层的SST、C 2层的SST、C k层中SST中,将路径分量home的索引节点号作为索引项键,查找路径分量home的索引节点号对应的索引项值。若主机在某一层的SST的SST索引块中查找到路径分量home的索引节点号对应的位置信息(该位置信息为路径分量home的索引节点号对应的索引项值),则主机结束查找,该SST索引块即为路径分量home的索引节点块。主机使用该位置信息,在硬盘中确定出路径分量home的索引节点块所在的SST数据块。然后主机使用路径分量home的索引节点号,在该SST数据块中,确定路径分量home的索引节点号对应的内容,该内容即为路径分量home对应的索引节点块。然后主机将路径分量home的索引节 点块,返回给POSIX。
步骤S3,若主机在键值存储系统的memtable、immutable中,未查找到路径分量foo的索引节点号,则主机在路径分量home对应的元数据文件所在SST数据块的SST索引块中,查找路径分量foo的索引节点号。具体的,主机可以使用路径分量foo的标识作为索引项键,查找对应的索引项值,该索引项值即为路径分量foo的索引节点号。
步骤S4,若主机在路径分量home对应的元数据文件所在SST数据块的SST索引块中,查找到路径分量foo的索引节点号,则确定该SST索引块为与路径分量foo的标识对应的索引块,使用该索引节点号,访问硬盘获取路径分量foo的索引节点块(处理过程参见获取路径分量home的索引节点块的过程),返回给POSIX。若主机在路径分量home对应的元数据文件所在SST数据块的SST索引块中,未查找到路径分量foo的索引节点号,则依次在memtable、immutable以及除路径分量home对应的元数据文件所在SST数据块的SST索引块之外的其它SST索引块中,查找路径分量foo的索引节点号(具体处理见步骤S1中的描述)。若主机在该memtable、该immutable、或者该其它SST索引块任一中,查找到路径分量foo的索引节点号,则执行查找该索引节点号对应的索引节点块的处理(具体在处理在前面有描述,此处不再赘述),执行步骤S5的处理。若主机在该memtable、该immutable和该其它SST索引块中,均未查找到路径分量foo的索引节点号,则返回元数据文件缺乏的指示信息,不再执行步骤S5及之后步骤的处理。
步骤S5,若主机在键值存储系统的memtable、immutable中,未查找到路径分量1.txt的索引节点号,则主机在路径分量foo对应的元数据文件所在SST数据块的SST索引块中,查找路径分量1.txt的索引节点号。具体的,主机可以使用路径分量1.txt的标识作为索引项键,查找对应的索引项值,该索引项值即为路径分量1.txt的索引节点号。
步骤S6,若主机在路径分量foo对应的元数据文件所在SST数据块的SST索引块中,查找到路径分量1.txt的索引节点号,则确定该SST索引块为与路径分量1.txt的标识对应的索引块,执行查找路径分量1.txt的索引节点块的处理(具体在处理在前面有描述,此处不再赘述),执行步骤S7的处理。若主机在路径分量foo对应的元数据文件所在SST数据块的SST索引块中,未查找到路径分量1.txt的索引节点号,则依次在memtable、immutable以及除路径分量foo所在的SST索引块之外的其它SST索引块中,使用路径分量1.txt的标识,查找路径分量1.txt的索引节点号。若主机在该memtable、该immutable或者该其它SST索引块中的某个SST索引块任一中,查找到路径分量1.txt的索引节点号,则执行查找该索引节点号对应的索引节点块的处理(具体在处理在前面有描述,此处不再赘述),执行步骤S7的处理。若主机在该memtable、该immutable和其它SST索引块中,均未查找到路径分量1.txt的索引节点号,则返回元数据文件缺乏的指示信息,不再执行步骤S7。
步骤S7,主机在路径分量1.txt的索引节点块,查找到路径分量1.txt的数据块的地址。主机基于该地址,确定路径分量1.txt的文件的位置,从该位置读取1.txt的文件。
这样,在进行路径信息/home/foo/1.txt的解析过程中,对于路径分量home,由于主机不需要基于路径分量home的索引节点块,获取路径分量home的数据(具体处理见 上述步骤4的处理),所以也不需要通过访问硬盘读取路径分量home的数据,进而可以减少一次访问硬盘。同样,对于路径分量foo,由于主机不需要基于路径分量foo的索引节点块,获取路径分量foo的数据(具体处理见上述步骤8的处理),所以也不需要通过访问硬盘读取路径分量foo的数据,进而可以减少一次访问硬盘。可见,对于路径信息为/home/foo/1.txt的解析过程,相关技术的方案需要访问五次硬盘(步骤2、步骤4、步骤6、步骤8和步骤10),而采用本申请的方案,减少了访问硬盘获取路径分量home的数据和路径分量foo的数据的过程,即不需要执行上述步骤4和步骤8的处理,所以仅需要访问三次硬盘,就可以获取到1.txt的数据,所以采用本申请的方案可以减少硬盘的访问次数。以上是以路径信息中包括4个路径分量进行说明,在路径信息包括更多的路径分量时,同样也可以减少硬盘的访问次数。
本申请实施例中,索引块中存储有路径分量对应的元数据文件的索引节点号,而索引块被加载至主机内存中,这样,主机进行路径信息的解析时,对于某个路径分量,由于主机可以从主机的内存的索引块中,获取到该路径分量对应的元数据文件的索引节点号,而不需要从该路径分量的前一个路径分量对应的元数据文件的数据中获取,所以可以减少硬盘的访问次数,进而可以加速文件系统的路径信息的解析。
需要说明的是,本申请针对的是文件系统的目录项缓存发生缺失的情况,这是由于若文件系统的目录项缓存的存在,可以直接使用文件系统的目录项读取到待获取文件的索引节点号,基于索引节点号读取到待获取文件(基于索引节点号获取到待获取文件的过程已在前面进行描述,此处不再赘述)。其中,文件系统的目录项发生缺失的情况可以包括文件系统的目录项的存储空间不足、文件系统的目录项无法加载等。
图9是本申请实施例提供的获取索引节点号的装置的结构图。该装置可以通过软件、硬件或者两者的结合实现成为装置中的部分或者全部。本申请实施例提供的装置可以实现本申请实施例图8所述的流程,该装置包括:获取模块910和确定模块920,其中:
获取模块910,用于获取目标路径分量对应的元数据文件的标识,其中,所述目标路径分量为待解析的路径信息中的多个路径分量中的任一路径分量,具体可以用于实现步骤801中的获取功能以及其包含的隐含步骤;
确定模块920,用于:
在被加载至内存的索引块中确定与所述元数据文件的标识对应的第一索引块,其中,所述第一索引块存储有所述元数据文件的标识与索引节点号的对应关系,所述内存为执行所述方法的设备的内存;
根据所述对应关系,确定所述元数据文件的标识对应的索引节点号,其中,所述第一索引块对应的数据块存储有所述元数据文件的索引节点块,具体可以用于实现步骤802和步骤803中的确定功能以及其包含的隐含步骤。
在一种可能的实现方式中,所述确定模块920,用于:
在被加载至内存的索引块中,将第一索引节点块所在的数据块对应的索引块,确定为所述元数据文件的标识对应的第一索引块,其中,所述第一索引节点块为之前的路径分量对应的元数据文件的索引节点块,所述之前的路径分量为所述路径信息中排列在所述目标路径分量之前的路径分量。
在一种可能的实现方式中,所述确定模块920,用于:
在被加载至内存的索引块中,将第二索引节点块所在的数据块对应的索引块,确定为所述元数据文件的标识对应的第一索引块,其中,所述第二索引节点块为第一路径分量对应的元数据文件的索引节点块,所述第一路径分量为所述路径信息中所述目标路径分量的前一个路径分量。
在一种可能的实现方式中,所述确定模块920,用于:
在属于被加载至内存的索引块的其它索引块中,确定所述元数据文件的标识对应的第一索引块,其中,所述其它索引块为被加载至内存的索引块中除第二索引块之外的索引块,所述第二索引块为第二索引节点块所在的数据块对应的索引块,所述第二索引节点块为第一路径分量对应的元数据文件的索引节点块,所述第一路径分量为所述路径信息中所述目标路径分量的前一个路径分量。
在一种可能的实现方式中,所述确定模块920,用于:
在属于被加载至内存的索引块的其它索引块中,依次查找所述其它索引块中的各索引块,确定所述元数据文件的标识对应的第一索引块,其中,所述其它索引块中的第三索引块在所述其它索引块中的第四索引块之前被查找,所述第三索引块为第一元数据文件所在的数据块对应的索引块,所述第四索引块为第二元数据文件所在的数据块对应的索引块,所述第一元数据文件的写入时间点早于所述第二元数据文件的写入时间点。
在一种可能的实现方式中,所述目标路径分量为所述路径信息中除根目录路径分量之外的任一路径分量。
本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时也可以有另外的划分方式,另外,在本申请各个实施例中的各功能模块可以集成在一个处理器中,也可以是单独物理存在,也可以两个或两个以上模块集成为一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
本申请实施例中,索引块中存储有路径分量的索引节点号,而索引块被加载至主机内存中,这样,在主机解析路径信息中的目标路径分量时,由于主机可以从主机的内存中的索引块中确定目标路径分量对应的元数据文件的索引节点号,而不需要从目标路径分量的前一个路径分量对应的元数据文件的数据中获取,所以可以减少访问硬盘的次数,进而可以降低解析路径信息的时延。
本申请实施例中,还提供了一种计算机可读存储介质,计算机可读存储介质存储有计算机指令,当计算机可读存储介质中存储的计算机指令被计算设备执行时,使得计算设备执行上述所提供的获取索引节点号的方法。
本申请实施例中,还提供了一种包含计算机指令的计算机程序产品,当其在计算设备上运行时,使得计算设备执行上述所提供的获取索引节点号的方法。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现,当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令,在服务器或终端上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴光缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向 另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是服务器或终端能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(如软盘、硬盘和磁带等),也可以是光介质(如数字视盘(Digital Video Disk,DVD)等),或者半导体介质(如固态硬盘等)。

Claims (13)

  1. 一种获取索引节点号的方法,其特征在于,所述方法包括:
    获取目标路径分量对应的元数据文件的标识,其中,所述目标路径分量为待解析的路径信息中的多个路径分量中的任一路径分量;
    在被加载至内存的索引块中确定与所述元数据文件的标识对应的第一索引块,其中,所述第一索引块存储有所述元数据文件的标识与索引节点号的对应关系,所述内存为执行所述方法的设备的内存;
    根据所述对应关系,确定所述元数据文件的标识对应的索引节点号,其中,所述第一索引块对应的数据块存储有所述元数据文件的索引节点块。
  2. 根据权利要求1所述的方法,其特征在于,所述在被加载至内存的索引块中确定与所述元数据文件的标识对应的第一索引块,包括:
    在被加载至内存的索引块中,将第一索引节点块所在的数据块对应的索引块,确定为所述元数据文件的标识对应的第一索引块,其中,所述第一索引节点块为之前的路径分量对应的元数据文件的索引节点块,所述之前的路径分量为所述路径信息中排列在所述目标路径分量之前的路径分量。
  3. 根据权利要求1所述的方法,其特征在于,所述在被加载至内存的索引块中确定与所述元数据文件的标识对应的第一索引块,包括:
    在被加载至内存的索引块中,将第二索引节点块所在的数据块对应的索引块,确定为所述元数据文件的标识对应的第一索引块,其中,所述第二索引节点块为第一路径分量对应的元数据文件的索引节点块,所述第一路径分量为所述路径信息中所述目标路径分量的前一个路径分量。
  4. 根据权利要求1所述的方法,其特征在于,所述在被加载至内存的索引块中确定与所述元数据文件的标识对应的第一索引块,包括:
    在属于被加载至内存的索引块的其它索引块中,确定所述元数据文件的标识对应的第一索引块,其中,所述其它索引块为被加载至内存的索引块中除第二索引块之外的索引块,所述第二索引块为第二索引节点块所在的数据块对应的索引块,所述第二索引节点块为第一路径分量对应的元数据文件的索引节点块,所述第一路径分量为所述路径信息中所述目标路径分量的前一个路径分量。
  5. 根据权利要求4所述的方法,其特征在于,所述在属于被加载至内存的索引块的其它索引块中,确定所述元数据文件的标识对应的第一索引块,包括:
    在属于被加载至内存的索引块的其它索引块中,依次查找所述其它索引块中的各索引块,确定所述元数据文件的标识对应的第一索引块,其中,所述其它索引块中的第三索引块在所述其它索引块中的第四索引块之前被查找,所述第三索引块为第一元数据文件所在的数据块对应的索引块,所述第四索引块为第二元数据文件所在的数据块对应的索引块,所述第一元数据文件的写入时间点早于所述第二元数据文件的写入时间点。
  6. 根据权利要求1至4任一项所述的方法,其特征在于,所述目标路径分量为所述路径信息中除根目录路径分量之外的任一路径分量。
  7. 一种获取索引节点号的装置,其特征在于,所述装置包括存储器和处理器,其中,所述存储器中存储有计算机指令,所述处理器执行所述计算机指令,用于实现如下步骤:
    获取目标路径分量对应的元数据文件的标识,其中,所述目标路径分量为待解析的路径信息中的多个路径分量中的任一路径分量;
    在被加载至内存的索引块中确定与所述元数据文件的标识对应的第一索引块,其中,所述第一索引块存储有所述元数据文件的标识与索引节点号的对应关系,所述内存为执行所述方法的设备的内存;
    根据所述对应关系,确定所述元数据文件的标识对应的索引节点号,其中,所述第一索引块对应的数据块存储有所述元数据文件的索引节点块。
  8. 根据权利要求7所述的装置,其特征在于,所述处理器,用于:
    在被加载至内存的索引块中,将第一索引节点块所在的数据块对应的索引块,确定为所述元数据文件的标识对应的第一索引块,其中,所述第一索引节点块为之前的路径分量对应的元数据文件的索引节点块,所述之前的路径分量为所述路径信息中排列在所述目标路径分量之前的路径分量。
  9. 根据权利要求7所述的装置,其特征在于,所述处理器,用于:
    在被加载至内存的索引块中,将第二索引节点块所在的数据块对应的索引块,确定为所述元数据文件的标识对应的第一索引块,其中,所述第二索引节点块为第一路径分量对应的元数据文件的索引节点块,所述第一路径分量为所述路径信息中所述目标路径分量的前一个路径分量。
  10. 根据权利要求7所述的装置,其特征在于,所述处理器,用于:
    在属于被加载至内存的索引块的其它索引块中,确定所述元数据文件的标识对应的第一索引块,其中,所述其它索引块为被加载至内存的索引块中除第二索引块之外的索引块,所述第二索引块为第二索引节点块所在的数据块对应的索引块,所述第二索引节点块为第一路径分量对应的元数据文件的索引节点块,所述第一路径分量为所述路径信息中所述目标路径分量的前一个路径分量。
  11. 根据权利要求10所述的装置,其特征在于,所述处理器,用于:
    在属于被加载至内存的索引块的其它索引块中,依次查找所述其它索引块中的各索引块,确定所述元数据文件的标识对应的第一索引块,其中,所述其它索引块中的第三索引块在所述其它索引块中的第四索引块之前被查找,所述第三索引块为第一元数据文件所在的数据块对应的索引块,所述第四索引块为第二元数据文件所在的数据块对应的 索引块,所述第一元数据文件的写入时间点早于所述第二元数据文件的写入时间点。
  12. 根据权利要求7至11任一项所述的装置,其特征在于,所述目标路径分量为所述路径信息中除根目录路径分量之外的任一路径分量。
  13. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机指令,当所述计算机可读存储介质中的计算机指令被计算设备执行时,使得所述计算设备执行所述权利要求1-6中任一权利要求所述的方法。
PCT/CN2020/095483 2019-07-30 2020-06-10 获取索引节点号的方法、装置、计算设备和存储介质 WO2021017655A1 (zh)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201910695741 2019-07-30
CN201910695741.9 2019-07-30
CN201911261725.5A CN112306957A (zh) 2019-07-30 2019-12-10 获取索引节点号的方法、装置、计算设备和存储介质
CN201911261725.5 2019-12-10

Publications (1)

Publication Number Publication Date
WO2021017655A1 true WO2021017655A1 (zh) 2021-02-04

Family

ID=74230066

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/095483 WO2021017655A1 (zh) 2019-07-30 2020-06-10 获取索引节点号的方法、装置、计算设备和存储介质

Country Status (1)

Country Link
WO (1) WO2021017655A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101354726A (zh) * 2008-09-17 2009-01-28 中国科学院计算技术研究所 一种机群文件系统的内存元数据管理方法
CN102520995A (zh) * 2011-12-06 2012-06-27 北京航空航天大学 软件远程流式加载方法及系统
CN106446197A (zh) * 2016-09-30 2017-02-22 华为数字技术(成都)有限公司 一种数据存储方法、装置及系统
CN106682003A (zh) * 2015-11-06 2017-05-17 中国电信股份有限公司 分布式存储命名空间的路径分割映射方法和装置
CN106874481A (zh) * 2017-02-20 2017-06-20 郑州云海信息技术有限公司 一种分布式文件系统元数据信息读取方法及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101354726A (zh) * 2008-09-17 2009-01-28 中国科学院计算技术研究所 一种机群文件系统的内存元数据管理方法
CN102520995A (zh) * 2011-12-06 2012-06-27 北京航空航天大学 软件远程流式加载方法及系统
CN106682003A (zh) * 2015-11-06 2017-05-17 中国电信股份有限公司 分布式存储命名空间的路径分割映射方法和装置
CN106446197A (zh) * 2016-09-30 2017-02-22 华为数字技术(成都)有限公司 一种数据存储方法、装置及系统
CN106874481A (zh) * 2017-02-20 2017-06-20 郑州云海信息技术有限公司 一种分布式文件系统元数据信息读取方法及系统

Similar Documents

Publication Publication Date Title
US11182356B2 (en) Indexing for evolving large-scale datasets in multi-master hybrid transactional and analytical processing systems
US10579609B2 (en) Multi-user search system with methodology for bypassing instant indexing
US7444317B2 (en) System and method for managing file names for file system filter drivers
US10210191B2 (en) Accelerated access to objects in an object store implemented utilizing a file storage system
US9767108B2 (en) Retrieval device, method for controlling retrieval device, and recording medium
KR100330576B1 (ko) 컴퓨터네트워크로부터월드와이드웹상의페이지위치을파악하고문서위치를파악하는시스템및방법
US8560569B2 (en) Method and apparatus for performing bulk file system attribute retrieval
CN103077199B (zh) 一种文件资源查找定位方法及装置
EP2863310B1 (en) Data processing method and apparatus, and shared storage device
US10997037B1 (en) Method and system for enhanced backup database indexing
US11221921B2 (en) Method, electronic device and computer readable storage medium for data backup and recovery
US20180181584A1 (en) Method and system for maintaining and searching index records
CN106484820B (zh) 一种重命名方法、访问方法及装置
US20200134043A1 (en) Duplicate Request Checking for File System Interfaces
WO2020125630A1 (zh) 文件读取
US11151081B1 (en) Data tiering service with cold tier indexing
US10990571B1 (en) Online reordering of database table columns
GB2520361A (en) Method and system for a safe archiving of data
US20180276267A1 (en) Methods and system for efficiently performing eventual and transactional edits on distributed metadata in an object storage system
CN112306957A (zh) 获取索引节点号的方法、装置、计算设备和存储介质
US11755555B2 (en) Storing an ordered associative array of pairs using an append-only storage medium
CN109246102B (zh) 一种支撑大规模认证数据快速存储及检索的系统及方法
US20220342888A1 (en) Object tagging
US10019483B2 (en) Search system and search method
WO2021017655A1 (zh) 获取索引节点号的方法、装置、计算设备和存储介质

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: 20848219

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20848219

Country of ref document: EP

Kind code of ref document: A1