A data writing method and apparatus
By creating a list of remaining space in the node device to record the index of free data blocks, the problem of high time consumption of searching for free data blocks when the disk is occupied by a large amount is solved, and data writing efficiency is improved.
Patent Information
- Application Number
- CN202110815226.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-19
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2041-07-19
AI Technical Summary
In a node device, when the disk is occupied a lot, the time to find idle data blocks is consumed more, resulting in a reduced data writing efficiency.
When the remaining space of the disk is less than the preset ratio, the free data block is found through bitmap scanning, a residual space linked list is created, the index of the free data block is recorded, and when a write request is received, the target data block is determined from the linked list for writing.
The speed of obtaining free data blocks is accelerated by creating a list of remaining spaces and improving the data writing efficiency of node devices.
Smart Images

Figure CN113704190B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of communication technologies, and in particular, to a data writing method and apparatus. Background Art
[0002] With the development of technologies such as high-definition video, image processing, and video surveillance, the data that users need to store is becoming larger and larger, and the requirements of users for the read and write performance of data are also increasing synchronously.
[0003] In a node device applicable to a file system, the minimum operable unit of a disk is a data block, and the occupancy of each data block can be marked correspondingly by means of a bit bitmap. For example, when a certain bit in the bit bitmap is marked as "0", it indicates that the data block corresponding to this bit is in an idle state, and when a certain bit in the bit bitmap is marked as "1", it indicates that the data block corresponding to this bit is in an occupied state. When the disk is less occupied, the node device can quickly find an idle data block from the disk and complete the writing. If the disk is more occupied, the node device needs to consume a large amount of time to find an idle data block in the bit bitmap, thereby reducing the efficiency of the node device for writing data. Summary of the Invention
[0004] To overcome the problems existing in the related art, this specification provides a data writing method and apparatus.
[0005] Combined with the first aspect of the embodiments of this specification, the present application provides a data writing method, which is applied to a node device and includes:
[0006] If the remaining space of the disk is less than a preset ratio, determine the idle data blocks in an idle state according to the bit bitmap corresponding to the disk;
[0007] Create a remaining space linked list of the disk, where the remaining space linked list records the indexes of the bits of the idle data blocks;
[0008] According to the write request sent by the client, determine the target data block from the remaining space linked list corresponding to the target disk;
[0009] Write the data to be written carried in the write request into the target data block.
[0010] Optionally, after writing the data to be written carried in the write request into the target data block, it further includes:
[0011] According to the remaining space linked list, in the bit bitmap corresponding to the target disk, set the bit corresponding to the target data block to an occupied state;
[0012] Delete the index of the bit corresponding to the target data block in the free space linked list.
[0013] Optionally, after creating the free space linked list of the disk, it further includes:
[0014] Scan the disk and update the free space linked list corresponding to the disk.
[0015] Optionally, after creating the free space linked list of the disk, it further includes:
[0016] If the free space of the disk is not less than a preset ratio and there is no index of the bit of the free data block in the free space list, delete the free space linked list and switch to the tree structure to manage the bitmap.
[0017] Optionally, according to the write request sent by the client, determining the target data block from the free space linked list corresponding to the target disk includes:
[0018] Perform a hash operation on the file name carried in the write request sent by the client, and select the target disk from the disks deployed by itself based on the operation result;
[0019] According to the data length carried in the write request, determine the corresponding number of free data blocks from the free space linked list corresponding to the target disk as the target data blocks.
[0020] Combined with the second aspect of the embodiments of this specification, the present application provides a data writing device, which is applied to a node device and includes:
[0021] A scanning unit, configured to, if the free space of the disk is less than a preset ratio, determine the free data blocks in the idle state according to the bitmap corresponding to the disk;
[0022] A creating unit, configured to create a free space linked list of the disk, where the free space linked list records the indexes of the bits of the free data blocks;
[0023] A determining unit, configured to determine the target data block from the free space linked list corresponding to the target disk according to the write request sent by the client;
[0024] A writing unit, configured to write the data to be written carried in the write request into the target data block.
[0025] Optionally, the device further includes:
[0026] A marking unit, configured to, according to the free space linked list, set the bit corresponding to the target data block to the occupied state in the bitmap corresponding to the target disk;
[0027] A deletion unit, configured to delete the index of the bit corresponding to the target data block in the free space linked list.
[0028] Optionally, the apparatus further includes:
[0029] An update unit, configured to scan the disk and update the free space linked list corresponding to the disk.
[0030] Optionally, the apparatus further includes:
[0031] A switching unit, configured to, if the free space of the disk is not less than a preset ratio and the index of the bit of the free data block does not exist in the free space linked list, delete the free space linked list and switch to a tree structure to manage the bitmap.
[0032] Optionally, the determination unit includes:
[0033] An operation module, configured to perform a hash operation according to the file name carried in the write request sent by the client, and select a target disk from the disks deployed by itself based on the operation result;
[0034] A determination module, configured to determine a corresponding number of free data blocks as target data blocks from the free space linked list corresponding to the target disk according to the data length carried in the write request.
[0035] The technical solution provided by the embodiments of this specification may include the following beneficial effects:
[0036] In the embodiments of this specification, when the free space of a certain disk in the node device is less than the preset space, the bitmap for managing the storage space in the disk is scanned to find the free data blocks not occupied in the disk, a free space linked list is created, and the index of the found free data blocks in the bitmap is recorded in the table. When a write request is received, the target data blocks are determined by looking up the free space linked list, and these target data blocks are allocated to the write request to complete the data writing for the write request, which speeds up the speed of obtaining free data blocks, thereby improving the data writing efficiency of the node device.
[0037] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit this specification. Description of the Drawings
[0038] The drawings here are incorporated into the specification and constitute a part of this specification, showing the embodiments consistent with this specification, and are used together with the specification to explain the principles of this specification.
[0039] Figure 1 It is a flowchart of a data writing method involved in this application;
[0040] Figure 2 is a network architecture diagram of the distributed file system involved in the embodiments of the present application;
[0041] Figure 3 and 4 is a schematic structural diagram of an AVL tree involved in the embodiments of the present application;
[0042] Figure 5 is a schematic diagram of the correspondence between the free space list and the bitmap involved in the embodiments of the present application;
[0043] Figure 6 is a schematic diagram of the correspondence between the free space list and the bitmap involved in another embodiment of the present application;
[0044] Figure 7 is a schematic structural diagram of a data writing device involved in the present application. Detailed Embodiments
[0045] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification.
[0046] The present application provides a data writing method, which is applied to a node device, such as Figure 1 shown, and includes:
[0047] S100. If the remaining space of the disk is less than a preset ratio, determine the free data blocks in the idle state according to the bitmap corresponding to the disk.
[0048] The structure of the distributed file system 1, such as Figure 2As shown in the figure, it may include several node devices and switching devices. The client communicates and connects to the distributed file system through the network or in a direct connection manner. Specifically, taking the distributed file system 1 including two node devices 2 as an example for description, namely node devices 20 and 21. Multiple switching devices can be set between the node devices 2 to achieve different functions. For example, it may include a management switch 3, an interconnection switch 4, and a network switch 5. Among them, the management switch 3 can be connected to a server (or a personal computer, etc.) to manage and control the node devices 2 in the distributed file system 1. The interconnection switch 4 is respectively connected to different node devices 2 and can be used to realize data interaction between the node devices 2. The network switch 5 is connected to the client 6 to realize operations such as data writing and reading. The node device 2 can be provided with multiple disks 7, can be a server including multiple disks 7, or can be a specially set storage device. This solution does not limit this. In Figure 2 In it, two disks 70 and 71 can be set in the node device 20.
[0049] In a hard disk, the smallest operable unit is called a sector. In order to improve the efficiency of data reading and writing, multiple sectors can be formed into a data block for data writing and reading operations. In order to manage the storage space of the disk, the usage status of each data block can be marked in the form of a bitmap. The bit set to 1 indicates that the corresponding data block is in an occupied state, and the bit set to 0 indicates that the corresponding data block is in an idle state. Assuming that the storage space of the disk 70 is divided into N data blocks, denoted as data block 0 to data block N, then, in the bitmap, bits corresponding to the N data blocks can be set, and each bit can establish a corresponding relationship with the corresponding data block. For example, each bit can correspond to the offset of a data block relative to the starting position of the storage space. Based on the starting position and the offset, the specific position of the data block can be determined. The starting position and the offset can be regarded as the position information of a data block.
[0050] After a data block is written with data, the node device 2 will set the corresponding bit in the bitmap to the occupied state (i.e., set to 1). After the data in the data block is cleared, the bit will be reset to the idle state (i.e., set to 0) to recycle resources and be reused during the next write. Since the cleared data is not necessarily continuous data blocks, at this time, in the bitmap, it will present a situation of alternating 0s and 1s. In this case, when writing data, in order to be able to find idle data blocks faster, the query speed can be accelerated by constructing a data structure. For example, a tree structure.
[0051] Such as Figure 3As shown, taking an AVL tree (Adelson-Velsky and Landis Tree, a self-balancing binary search tree) as an example, the root node of the AVL tree can record the number of data blocks in the bitmap managed by the AVL tree that are in the idle state (subsequently referred to as idle data blocks). The child nodes of the AVL tree can record the number of data blocks in the partial bitmap managed under the child node that are in the idle state. The leaf node points to a bit in the bitmap. For example, the leaf node stores the index of a bit.
[0052] When searching for idle data blocks, the node device 20 can be guided to start the search in the AVL tree and perform a hierarchical search according to the AVL tree. As Figure 3 shown, the AVL tree contains 3 levels. Based on the write request confirmation, it is necessary to apply for 3 idle data blocks. For example, for a disk divided into 100 data blocks, the AVL tree is used to manage this disk. During the working process, 80 data blocks are occupied and 20 data blocks are unoccupied.
[0053] In node 1 at the first level of the AVL tree, it can be determined that the number of idle data blocks it manages is 20, and then jump to the second level. In the left node 2, 8 idle data blocks are recorded, and in the right node 3, 12 idle data blocks are recorded. Since both node 2 and node 3 can meet the requirement of 3 idle data blocks, the left node 2 is preferentially selected and then jump to the third level. In the third level, node 2 manages node 5 and node 6. Node 5 records 2 idle data blocks, and node 6 records 6 idle data blocks. It can be determined that the number of idle data blocks managed by node 5 is not enough to meet the application quantity of the write request, while the idle data blocks managed by node 6 can meet the application quantity of the write request. Therefore, node 6 is selected. At this time, since the node at the third level is the leaf node of the AVL tree, the position information of 3 idle data blocks can be directly selected from the idle data blocks managed by node 6 and returned to the node device 20 for the write request to write data. After writing, the bit position of the applied data block in the bitmap is set to 1 and marked as the occupied state, as Figure 4 shown by the data blocks marked in black, and update the number of idle data blocks recorded by each node according to the new mark in the bitmap. It should be noted that the number of nodes in each level is not limited to the number shown in the figure and can be more or less.
[0054] Among them, when selecting a node, a preset strategy can be set. For example, when the number of idle data blocks recorded by a node meets the quantity requirement of the write request, start selecting one by one from the left node to avoid the scattered distribution of idle data blocks caused by random selection and increase the time-consuming of searching the AVL tree. Of course, the preset strategy is not limited to this and can be designed according to actual needs.
[0055] During the normal operation of the node device 20, the disk is continuously written to and cleared, and the bitmap is updated accordingly. In the node device 20, a preset ratio can also be configured for each disk. This preset ratio is used to represent the ratio of the remaining space of a disk, or it can also be used to represent the ratio of the occupied space of the disk. Subsequently, the case of representing the ratio of the remaining space will be used as an example for description. For example, if the preset ratio of disk 70 is set to 30%, it means that when the remaining space of disk 70 is less than 30%, the free data blocks need to be managed through the remaining space linked list. At this time, the node device 20 can scan the disks that reach the preset ratio to determine information such as the remaining free data blocks in the disk and the corresponding bit positions in the bitmap. The corresponding bit position information can include location information.
[0056] S101. Create a remaining space linked list for the disk, where the remaining space linked list records the indexes of the bit positions of the free data blocks.
[0057] The node device 20 creates a remaining space linked list, and this remaining space linked list can be set to correspond to a fixed number of free data blocks. For example, it is set to have 30 entries. As Figure 5 shown, each entry can store the index of the bit position marked as free in a bitmap. Through this index, the bit position in the free state can be quickly found, and then the location information of the corresponding free data block can be determined according to this bit position.
[0058] Moreover, after creating the remaining space linked list, when a write request is received and it is determined that data needs to be written to disk 70, it can be guided to the remaining space linked list to find free data blocks, replacing the search of the AVL tree. Hereinafter, the case where 30 bit positions in the bitmap are marked as free, that is, including 30 free data blocks, will be used as an example for description. It should be noted that each disk can be set with its own way of finding free data blocks, and it is not necessary for all disks to apply this method, which can be set according to actual needs.
[0059] S102. Determine the target data block from the remaining space linked list corresponding to the target disk according to the write request sent by the client.
[0060] Optionally, step S102. Determine the target data block from the remaining space linked list corresponding to the target disk according to the write request sent by the client, including:
[0061] S102A. Perform a hash operation on the file name carried in the write request sent by the client, and select the target disk from the disks deployed by itself based on the operation result.
[0062] S102B. Determine a corresponding number of free data blocks as target data blocks from the remaining space linked list corresponding to the target disk according to the data length carried in the write request.
[0063] When receiving a write request sent by the client, parse the write request. According to the packet information included in the write request, for example, a hash operation can be performed based on the file name carried in the write request to determine the disk corresponding to the write request (disk 70 can be called the target disk). This hash operation can be a hashing operation. Of course, in addition to the file name, it can also be based on packet information such as the five-tuple carried in the write request, and there is no limitation on this.
[0064] After that, the node device 20 can obtain the data length required to be written in the write request, determine the number of data blocks needed according to this data length, for example, 5. At this time, the node device 20 starts searching from the head of the remaining space linked list and applies for 5 entries from entry 1 to entry 5 as the objects for this write. The node device 20 determines the corresponding bit positions in the corresponding bitmap according to the indexes corresponding to the 5 entries determined, and based on the position information corresponding to these bit positions, determines free data blocks as target data blocks.
[0065] S103. Write the data to be written carried in the write request into the target data blocks.
[0066] After determining the position information of the target data blocks, the node device 20 writes the data to be written included in the write request into these data blocks, thereby completing the processing of this write request.
[0067] In the embodiment of this specification, when the remaining space of a certain disk in the node device is less than the preset space, scan the bitmap that manages the storage space in the disk to find the free data blocks not occupied in the disk, create a remaining space linked list, record the indexes of the found free data blocks in the bitmap in this table. When receiving a write request, determine the target data blocks by searching this remaining space linked list, and allocate these target data blocks to this write request to complete the data writing for the write request, which speeds up the speed of obtaining free data blocks, thereby improving the data writing efficiency of the node device.
[0068] Since the data in the disk is updated at any time, the marks in each bit position in the bitmap are also updated in real time. Therefore, if a remaining space linked list is used, it is also necessary to be able to update the indexes recorded in the remaining space linked list as soon as possible to avoid the written data being overwritten due to repeated writes. Optionally, after step S103, writing the data to be written carried in the write request into the target data blocks, it further includes:
[0069] S104. According to the remaining space linked list, in the bitmap corresponding to the target disk, set the bit corresponding to the target data block to the occupied state.
[0070] After the data to be written is written to the selected target data block, based on the correspondence between the remaining space linked list and the bitmap, set the bit corresponding to the target data block to the occupied state, that is, set the bit to "1", so as to mark the data block written this time as occupied in the bitmap.
[0071] S105. Delete the index of the bit corresponding to the target data block in the remaining space linked list.
[0072] After the data to be written is written, clear the corresponding table entries from the remaining space linked list, that is, the above table entries 1 to 5. Clearing the corresponding table entries here means deleting the index of the bit recorded in the table entry and only retaining the empty table entries. At this time, when the node device 20 cannot obtain the index of the bit from a table entry in the remaining space linked list, it will sequentially search the next table entry until it selects the data blocks that meet the number required by the write request.
[0073] Through the above method, the real-time update of the remaining space linked list can be realized, and the data stored in the data block can be prevented from being overwritten by the subsequent data to be written.
[0074] Since the remaining space linked list created by the node device has a set size and may not be able to cover all free data blocks, therefore, after the free data blocks are selected according to the remaining space linked list for the write request, the indexes stored in this part of the remaining space linked list will be cleared, thus freeing up part of the remaining space linked list, which will reduce the efficiency of subsequent searching for the target data block. Optionally, after step S101, creating the remaining space linked list of the disk, it further includes:
[0075] S106. Scan the disk and update the remaining space linked list corresponding to the disk.
[0076] Suppose the created remaining space linked list contains 20 table entries, and 100 data blocks are divided in disk 71. According to the configured preset ratio (30%), after 70 data blocks are occupied, the node device 20 will create a remaining space linked list for disk 71 to replace the AVL tree for bitmap management.
[0077] At this time, the node device 20 scans disk 71, selects 20 bits set to the free state from the bitmap generated for disk 71, and writes the indexes of these bits into the remaining space linked list.
[0078] After that, the node device 20 continues to receive write requests and selects a corresponding number of target data blocks from the remaining space linked list to complete the writing of the data to be written. For example, 8 target data blocks are selected and allocated to the write request, and these target data blocks correspond to table entries 1 to 8 of the remaining space linked list. At this time, the bits corresponding to these 8 table entries are set to "1".
[0079] The node device 20 scans the bitmap recorded in the disk 71 in real time, selects 8 bits in the idle state, and writes the index of the bit into the table entries 1 to 8 of the remaining space linked list, such as Figure 6 As shown in indexes 71 to 78, the remaining space list can be kept as selective as possible, that is, the target data block is selected from the starting position of the remaining space list to write data. In this way, when the node device 20 applies for free data blocks for write requests, it can further achieve higher application efficiency.
[0080] Optionally, after step S101, creating a free space linked list of the disk, the following further includes:
[0081] S107: If the remaining space of the disk is not less than the preset ratio and the bit index of the free data block does not exist in the remaining space list, the remaining space linked list is deleted, and the tree structure is switched to manage the bit map.
[0082] During the operation of the node device 20, the data stored in the disk may also be cleared from the data block, so that the data block of the disk is restored to an idle state. In other words, the proportion of the remaining space contained in the disk may be equal to or greater than the preset proportion. At this time, the efficiency of using the original AVL tree to search for idle data blocks may be higher.
[0083] Then, when the node device 20 determines that the remaining space of a certain disk is not less than the preset ratio, the search for free data blocks can be redirected to the starting position of the AVL tree, that is, the guiding relationship between the remaining free list and the search for free data blocks is released (such as index, etc.), and the created remaining space list is deleted.
[0084] In addition, since the node device 20 has created a free space linked list when the ratio is less than the preset ratio, and at this time, the free data blocks can be quickly found in the free space linked list. Therefore, when the free space is not less than the preset ratio, the node device 20 does not immediately disconnect the guiding relationship between the free space linked list and the search for free data blocks, but stops updating the indexes stored in the free space linked list until the number of free data blocks determined in the free space linked list is insufficient to meet the number of data blocks required by a write request. Then, the guiding relationship between the free space linked list and the free data blocks is disconnected, thereby improving the efficiency of creating the free space linked list at one time and avoiding the resources consumed by repeatedly creating and deleting the free space linked list.
[0085] Correspondingly, the present application provides a data writing device, which is applied to a node device, such as Figure 7 shown, including:
[0086] A scanning unit, configured to determine free data blocks in an idle state according to the bitmap corresponding to the disk if the free space of the disk is less than a preset ratio;
[0087] A creating unit, configured to create a free space linked list of the disk, where indexes of bitmaps of free data blocks are recorded in the free space linked list;
[0088] A determining unit, configured to determine target data blocks from the free space linked list corresponding to the target disk according to a write request sent by a client;
[0089] A writing unit, configured to write the data to be written carried in the write request into the target data blocks.
[0090] Optionally, the device further includes:
[0091] A marking unit, configured to mark the bit corresponding to the target data block as an occupied state in the bitmap corresponding to the target disk according to the free space linked list;
[0092] A deleting unit, configured to delete the index of the bit corresponding to the target data block in the free space linked list.
[0093] Optionally, the device further includes:
[0094] An updating unit, configured to scan the disk and update the free space linked list corresponding to the disk.
[0095] Optionally, the device further includes:
[0096] A switching unit, configured to delete the free space linked list and switch to a tree structure to manage the bitmap if the remaining space of the disk is not less than a preset ratio and the index of the bit position of the free data block does not exist in the remaining space list.
[0097] Optionally, the determination unit includes:
[0098] An operation module, configured to perform a hash operation according to the file name carried in the write request sent by the client, and select a target disk from the disks deployed by itself based on the operation result;
[0099] A determination module, configured to determine a corresponding number of free data blocks as target data blocks from the free space linked list corresponding to the target disk according to the data length carried in the write request.
[0100] The technical solution provided by the embodiments of this specification may include the following beneficial effects:
[0101] In the embodiments of this specification, when the remaining space of a certain disk in the node device is less than the preset space, the bitmap for managing the storage space in this disk is scanned to find the free data blocks not occupied in the disk, and a free space linked list is created. The index of the found free data blocks in the bitmap is recorded in this table. When a write request is received, the target data blocks are determined by searching this free space linked list, and these target data blocks are allocated to this write request to complete the data writing for the write request, which speeds up the speed of obtaining free data blocks, thereby improving the data writing efficiency of the node device.
[0102] It should be understood that this specification is not limited to the exact structure already described and shown in the drawings, and various modifications and changes can be made without departing from its scope.
[0103] The above are only the preferred embodiments of this specification, and are not intended to limit this specification. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of this specification shall be included within the scope of protection of this specification.
Claims
1. A data writing method, characterized in that, applied to a node device, including: If the remaining space of the disk is less than a preset ratio, determine free data blocks in the idle state according to the bit map corresponding to the disk; Create a remaining space linked list of the disk, wherein the remaining space linked list records the indexes of the bit positions of the free data blocks; According to the writing request sent by the client, determine the target data block from the remaining space linked list corresponding to the target disk; Write the data to be written carried in the writing request into the target data block; After creating the remaining space linked list of the disk, further include: If the remaining space of the disk is not less than the preset ratio and the index of the bit position of the free data block does not exist in the remaining space list, delete the remaining space linked list and switch to a tree structure to manage the bit map.
2. The method according to claim 1, characterized in that, After writing the data to be written carried in the writing request into the target data block, further include: According to the remaining space linked list, in the bit map corresponding to the target disk, set the bit position corresponding to the target data block to the occupied state; Delete the index of the bit position corresponding to the target data block in the remaining space linked list.
3. The method according to claim 1, characterized in that, After creating the remaining space linked list of the disk, further include: Scan the disk and update the remaining space linked list corresponding to the disk.
4. The method according to claim 1, characterized in that, The step of determining the target data block from the remaining space linked list corresponding to the target disk according to the writing request sent by the client includes: Perform a hash operation according to the file name carried in the writing request sent by the client, and select the target disk from the disks deployed by itself based on the operation result; According to the data length carried in the writing request, determine the corresponding number of free data blocks from the remaining space linked list corresponding to the target disk as the target data blocks.
5. A data writing device, characterized in that, applied to a node device, including: A scanning unit, configured to determine free data blocks in the idle state according to the bit map corresponding to the disk if the remaining space of the disk is less than a preset ratio; A creating unit, configured to create a remaining space linked list of the disk, wherein the remaining space linked list records the indexes of the bit positions of the free data blocks; A switching unit, configured to delete the remaining space linked list and switch to a tree structure to manage the bit map if the remaining space of the disk is not less than the preset ratio and the index of the bit position of the free data block does not exist in the remaining space list; A determining unit, configured to determine the target data block from the remaining space linked list corresponding to the target disk according to the writing request sent by the client; A writing unit, configured to write the data to be written carried in the writing request into the target data block.
6. The device according to claim 5, characterized in that, further include: A marking unit, configured to, according to the remaining space linked list, set the bit corresponding to the target data block to an occupied state in the bitmap corresponding to the target disk; A deletion unit, configured to delete the index of the bit corresponding to the target data block in the remaining space linked list.
7. The apparatus according to claim 5, wherein, it further comprises: An update unit, configured to scan the disk and update the remaining space linked list corresponding to the disk.
8. The apparatus according to claim 5, wherein, the determination unit comprises: An operation module, configured to perform a hashing operation according to the file name carried in the write request sent by the client, and select a target disk from the disks deployed by itself based on the operation result; A determination module, configured to determine a corresponding number of free data blocks as target data blocks from the remaining space linked list corresponding to the target disk according to the data length carried in the write request.
Citation Information
Patent Citations
Disk storage space allocation method and device, equipment, and storage medium
CN111506269A