Data writing method and device of block equipment and medium

A data writing and block device technology, applied in the field of data writing to block devices, can solve the problems of affecting the service life of block devices, increasing the overall system overhead, occupying the system, etc., to ensure performance, reduce the overall system overhead, and avoid writing Magnified effect

Active Publication Date: 2018-04-27
ZHENGZHOU YUNHAI INFORMATION TECH CO LTD
View PDF6 Cites 10 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, when new data arrives, the above-mentioned file system needs to write the data into the log first, and then write the data from the log into the data file and store it in the block device after a period of time. Therefore, before the data is stored in the block device, it needs to go through t

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Data writing method and device of block equipment and medium
  • Data writing method and device of block equipment and medium
  • Data writing method and device of block equipment and medium

Examples

Experimental program
Comparison scheme
Effect test

Example Embodiment

[0040] Example one

[0041] figure 1 This is a flowchart of a method for writing data to a block device according to an embodiment of the present invention. Please refer to figure 1 , The specific steps of the block device data writing method include:

[0042] Step S10: Obtain the data to be written and the total amount of data.

[0043] It should be noted that since data needs to be written into the block device, the total amount of data needs to be known in advance, and then the block device will open up corresponding storage space for data storage in subsequent steps.

[0044] Step S11: Apply for a storage space whose capacity meets the total amount of data in the block device, and write the data into the storage space in blocks.

[0045] It is understandable that this step is to apply for a storage space in the block device that corresponds to the total amount of data to be written, and then write the data directly into the storage space to store the data in the block device. It s...

Example Embodiment

[0051] Example two

[0052] figure 2 This is a flowchart of another method for writing data to a block device according to an embodiment of the present invention. figure 2 Steps S10 and S12 and figure 1 The same, I won't repeat them here.

[0053] Such as figure 2 As shown, as a preferred embodiment, before applying for a storage space whose capacity meets the total amount of data in the block device, the method further includes:

[0054] Step S20: Build a B+ tree, and record the available space in the block device through the B+ tree.

[0055] Correspondingly, step S11 is specifically:

[0056] Step S21: Select the available space in the B+ tree to apply for storage space in the block device.

[0057] It should be noted that because the traversal efficiency of the data in the B+ tree is higher, the use of the B+ tree to record the available space of the block device can more quickly traverse the available space of the block device, thereby improving the overall data writing effectiv...

Example Embodiment

[0070] Example three

[0071] In the above, the embodiment of the data writing method of the block device is described in detail. The present invention also provides a data writing device of the block device corresponding to the method, due to the embodiment of the device part and the implementation of the method part The examples correspond to each other, so please refer to the description of the embodiment of the method part for the embodiment of the device part, which will not be repeated here.

[0072] image 3 It is a structural diagram of a data writing apparatus for a block device provided by an embodiment of the present invention. The data writing apparatus of the block device provided by the embodiment of the present invention specifically includes:

[0073] The obtaining calculation module 10 is used to obtain the data to be written and the total amount of data.

[0074] The block device writing module 11 is used to apply for a storage space with a capacity in accordance w...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a data writing method and device of block equipment and a medium. The method comprises the steps of acquiring data to be written and the total data amount of the data; applyinga storage space the capacity of which is in accordance with the total data amount in the block equipment, and writing data sub-blocks to the storage space; generating address offsets of the data in the storage space and the attribute information of the data to write the address offsets and the attribute information into a key value database, and writing the address offsets and the attribute information into the block equipment through a MiniFS file system. According to the method, a data writing mechanism is further improved on the basis of the MiniFS file system only with the basic functionsof a film system, the data does not need to be written into logs again before stored to the block equipment, and therefore the influence on the service life of the block equipment is reduced. The method reduces the overall system expense caused during data writing and ensures the overall performance of the system. In addition, the data writing device of the block equipment and the medium have theadvantages above.

Description

technical field [0001] The invention relates to the field of data storage, in particular to a data writing method, device and medium of a block device. Background technique [0002] With the advent of the era of big data, the added value of data is gradually increasing, and more and more enterprises attach importance to safe and reliable storage of data. [0003] At present, the most mainstream data storage method is to adopt a distributed storage system, and finally write the data to the block device to realize the safe storage of the data. The most common method at present is to use conventional file systems such as xfs and ext4. However, when new data arrives, the above-mentioned file system needs to write the data into the log first, and then write the data from the log into the data file and store it in the block device after a period of time. Therefore, before the data is stored in the block device, it needs to go through the log and I / O operations between data files ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F3/06
CPCG06F3/061G06F3/064G06F3/067
Inventor 李成杰
Owner ZHENGZHOU YUNHAI INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products