CN109522240A - A kind of data processing method and device - Google Patents
A kind of data processing method and device Download PDFInfo
- Publication number
- CN109522240A CN109522240A CN201811231339.7A CN201811231339A CN109522240A CN 109522240 A CN109522240 A CN 109522240A CN 201811231339 A CN201811231339 A CN 201811231339A CN 109522240 A CN109522240 A CN 109522240A
- Authority
- CN
- China
- Prior art keywords
- data
- page
- written
- capacity
- storage system
- Prior art date
- Legal status (The legal status 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 status listed.)
- Withdrawn
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/0223—User address space allocation, e.g. contiguous or non contiguous base addressing
- G06F12/023—Free address space management
- G06F12/0238—Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
- G06F12/0246—Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
Landscapes
- Engineering & Computer Science (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
The embodiment of the present application discloses a kind of data processing method and device, obtain the page in linux kernel, there are the first data in the page, according to writing position of second data in page, second data are written in page, if the sum of data length of the first data and the second data is equal to the capacity of page, storage system is written into page.That is, for the first data and the second data, its capacity is respectively less than the capacity of page, therefore will do it the reading and rewriting of the initial data in twice storage system in the prior art, and in the embodiment of the present application, if the sum of data length of the first data and the second data is equal to the capacity of page, then storage system directly can be written into page, the reading without carrying out the initial data in storage system reduces reading data number, the time delay for reducing data modification improves the efficiency of data modification.
Description
Technical field
The present invention relates to field of computer technology, more particularly to a kind of data processing method and device.
Background technique
The basic unit of linux kernel memory management is page (page), and page is the storage location of fixed size, in kernel
When client needs to modify to the data in storage system, be written into linux kernel first data fill to
In page, then page is written to storage system.However, if the length of data to be written is less than the capacity of page, it will be to be written
Enter after data fill into page, there is the position not being filled in page, the data of the position be it is random, page is written
To storage system, the data on position not being filled in page can replace the data in storage system on corresponding position, lead
The data in storage system are caused to be rewritten by mistake.
To solve the above-mentioned problems, the data modification mode of the prior art is determined generally according to the length of data to be written
The number of page, so that it is determined that the corresponding data to be written of each page, are less than corresponding page in the length of data to be written
Capacity when, from storage system read equal to page capacity and correspond to the original of data to be modified including data to be written
Data, filling are data to be written into page, then by data rewriting to be modified, and finally modified page is written to storage
Corresponding position in system.
However, needing to read a large amount of data from storage system, leading to data when having multiple data to be written at the same time
The time delay of modification increases, and efficiency is lower.
Summary of the invention
In order to solve the above technical problems, the embodiment of the present application provides a kind of data processing method and device, by kernel
In data to be written are polymerize, and then modified, reduced to the initial data in storage system according to data to be written
The number that initial data is read from storage system, reduces the time delay of data modification, improves the efficiency of data modification.
The embodiment of the present application provides a kind of data processing method, which comprises
The page in linux kernel is obtained, there are the first data in the page;
According to writing position of second data in the page, second data are written in the page;Described second
The data length of data is less than the capacity of the page;
If the sum of data length of first data and second data is equal to the capacity of the page, the page is write
Enter storage system.
Optionally, the page is written in second data by the writing position according to the second data in the page
In, comprising:
If according to second data in the page writing position and the first data depositing in the page
Storage space is set, and determines that first data and second data are continuous, then second data is written in the page.
Optionally, the writing position according to second data in the page and first data are described
Storage location in page, determines that first data and second data are continuous, comprising:
According to storage location of first data in the page, the continuous position in the page is determined;
If writing position of second data in the page is identical as the continuous position, it is determined that first number
According to continuous with second data.
Optionally, the method also includes:
If the sum of data length of first data and second data is less than the capacity of the page, according to third number
According to the writing position in the page, the third data are written in the page;
If the sum of data length of first data, second data and the third data is equal to the appearance of the page
Storage system is written in the page by amount.
Optionally, the method also includes:
If the sum of data length of first data and second data is less than the capacity of the page, and described in write-in
Reach preset time threshold after second data, or, according to writing position of second data in the page and described
Storage location of first data in the page determines that first data and the data in the page are discontinuous, then replicates institute
State the first data;
The initial data equal with the capacity of the page is read from the storage system, the initial data includes first
Corresponding first data to be modified of data and corresponding second data to be modified of the second data;
The initial data is written in the page;
It is the first data by the first data modification to be modified in the page, the second data to be modified in the page is repaired
It is changed to the second data;
Storage system is written into the modified page.
The embodiment of the present application also provides a kind of data processing equipment, described device includes:
Page acquiring unit, for obtaining the page in linux kernel, there are the first data in the page;
Second data are written for the writing position according to the second data in the page for first writing unit
In the page;The data length of second data is less than the capacity of the page;
First modification unit, if the sum of the data length for first data and second data is equal to the page
Capacity, by the page be written storage system.
Optionally, first writing unit is specifically used for:
If according to second data in the page writing position and the first data depositing in the page
Storage space is set, and determines that first data and second data are continuous, then second data is written in the page.
Optionally, the writing position according to second data in the page and first data are described
Storage location in page, determines that first data and second data are continuous, comprising:
According to storage location of first data in the page, the continuous position in the page is determined;
If writing position of second data in the page is identical as the continuous position, it is determined that first number
According to continuous with second data.
Optionally, described device further include:
Second writing unit, if the sum of the data length for first data and second data is less than the page
Capacity the third data are written in the page according to writing position of the third data in the page;
Second modification unit, if the data length for first data, second data and the third data
The sum of be equal to the page capacity, by the page be written storage system.
Optionally, described device further include:
Copied cells, if the sum of the data length for first data and second data is less than the appearance of the page
Amount, and second data are written and reach preset time threshold later, or, the write-in according to second data in the page
The storage location of position and first data in the page determines that first data do not connect with the data in the page
It is continuous, then replicate first data;
Reading unit, for reading the initial data equal with the capacity of the page, the original from the storage system
Beginning data include corresponding first data to be modified of the first data and corresponding second data to be modified of the second data;
Fills unit, for the initial data to be written in the page;
Page modification unit will be in the page for being the first data by the first data modification to be modified in the page
Second data modification to be modified is the second data;
Third modifies unit, for storage system to be written in the modified page.
The embodiment of the present application provides a kind of data processing method and device, obtains the page in linux kernel, deposits in the page
The second data are written in page according to writing position of second data in page in the first data, if the first data and the second number
According to the sum of data length be equal to the capacity of page, then storage system is written into page.That is, for the first data and the second number
According to, capacity is respectively less than the capacity of page, therefore will do it in the prior art initial data in twice storage system reading and
It rewrites, and in the embodiment of the present application, it, can be straight if the sum of data length of the first data and the second data is equal to the capacity of page
It connects and storage system is written into page, the reading without carrying out the initial data in storage system reduces reading data number, drops
The low time delay of data modification, improves the efficiency of data modification.
Detailed description of the invention
In order to more clearly explain the technical solutions in the embodiments of the present application, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations as described in this application
Example, for those of ordinary skill in the art, is also possible to obtain other drawings based on these drawings.
The schematic diagram that Fig. 1 is a kind of page in the embodiment of the present application;
Fig. 2 is a kind of flow chart of data processing method provided by the embodiments of the present application;
Fig. 3 is a kind of structural block diagram of data processing equipment provided by the embodiments of the present application.
Specific embodiment
Inventor has found that data modification mode in the prior art, generally according to the length of data to be written
The number of page is determined, so that it is determined that the corresponding data to be written of each page, are less than corresponding in the length of data to be written
When the capacity of page, it can be read from storage system equal to the capacity of page and corresponding to be modified including data to be written
The initial data of data, filling is data to be written into page, then by data rewriting to be modified, finally by modified page
The corresponding position into storage system is written.
For example, to be repaired in initial data refering to what is shown in Fig. 1, being a kind of page in the embodiment of the present application of schematic diagram
The length len for changing data is 5KB, and initial position pos of the pending data in initial data file is 1MB, then by original number
It is split according to according to the capacity of page, forms multiple data blocks, it is assumed that the capacity of page is 4KB, to be processed in initial data
Data before data can be divided into 256 data blocks, then pending data is the 257th and 258 data blocks in initial data, be
Each data block establishes call number, call number since 0, then the corresponding call number of pending data be 256 and 257, according to
The call number for handling data can be written into data corresponding to two page:page256 and page257.
The data block for being 256 for call number, since 4KB therein is required to be written over, can directly will be to be written
Enter data to fill to page256, then the position where the data block for being 256 by page256 write-in call number.
And the data block for being 257 for call number, since 1KB therein needs are written over, other 3KB need to keep former
Shape, if further including the random data of 3KB in page257, by page257 by the data to be written write-in page257 of 1KB
After the data block that call number is 257 is written, other 3KB in the data block are covered by the random data in page257, cause to count
According to modification mistake.Therefore, for the data block of call number 257, first the data block that call number is 257 can be read,
Initial position in initial data is 257*4KB, by the data write-in page257 of reading, then by the preceding 1KB in page257
Data modification be data to be written, then by modified page257 write-in call number be 257 data block, realize original
The modification of data.
When data to be written are less, this method can satisfy the requirement of data rewriting, but more in data to be written
When, it needs to read a large amount of data from storage system, causes the time delay of data modification to increase, efficiency is lower.
Based on this, the embodiment of the present application provides a kind of data processing method and device, obtains the page in linux kernel,
There are the first data in the page the second data is written in page, according to writing position of second data in page if the first data
It is equal to the capacity of page with the sum of the data length of the second data, then storage system is written into page.That is, for the first data
With the second data, capacity is respectively less than the capacity of page, therefore will do it the initial data in twice storage system in the prior art
Reading and rewriting, and in the embodiment of the present application, if the sum of data length of the first data and the second data is equal to the capacity of page,
Then storage system directly can be written into page, the reading without carrying out the initial data in storage system reduces data reading
Number is taken, the time delay of data modification is reduced, improves the efficiency of data modification.
With reference to the accompanying drawing, the specific reality of method and device provided by the embodiments of the present application is described in detail by embodiment
Existing mode.
A kind of flow chart of data processing method provided by the embodiments of the present application is shown with reference to Fig. 2, this method can wrap
Include following steps.
S101 obtains the page in linux kernel.
Page (page) in kernel is the basic unit of kernel memory management, has fixed size, in core client
When needing to modify to the data in storage system, it can be written into data in linux kernel and fill into page, then
Page is written to storage system.
In the embodiment of the present application, the capacity of page can be 4KB, it is of course also possible to be other numerical value, not limit herein
It is fixed.
There are the first data in page, the data length of the first data is less than the capacity of page.First data are corresponding
In the data to be written of the page, for replacing the data to be modified of corresponding position in storage system, the first data can be company
Continuous one piece of data, such as the continuous data for occupying the 0-1KB in page, are also possible to discontinuous multiple segment data, such as
Occupy the data of the 0-1KB and 2-3KB in page.
The second data are written in the page according to writing position of second data in this page by S102.
Second data also correspond to the data to be written of the page, and the data length of the second data is less than the appearance of page
Amount.Under normal conditions, the writing position of the second data and the first data in page is not identical.
According to writing position of second data in page, the second data can be written in the page.Specifically, can be with
First judge the storage location of writing position and the first data in page according to the second data in page, judges the first number
According to whether continuous with the second data.
When it is implemented, the continuous position in page can be determined according to storage location of first data in page, if
Writing position of second data in page is identical as continuous position, it is determined that the first data and the second data are continuous.In the first number
When according to for continuous one piece of data and multiple segment data, continuous judgment mode can be different.
When first data are discontinuous multiple segment data, it can be determined in page according to the storage location of the first data
Continuous position, such as the first data occupy the data of 0-1KB and 2-3KB in page, then can determine the continuous position in page
Setting to be 1KB or 3KB, and when writing position of second data in page is 1KB, the first data and the second data are continuous, will
Second data are written in page.
When first data are continuous one piece of data, the storage location of available first data obtains the company in page
Continuous position, can also determine the continuous position of page according to the data length of the first data.Wherein, the data of the first data are long
Degree is the data length in page, and the data length in page can be indicated by len_in_page, thus may determine that
The continuous position of page is len_in_page, and the writing position of the second data is indicated with len_in_pos.For example, len_in_
When page is 1KB, if len_in_pos is also 1KB, the first data and the second data are continuous.
In the embodiment of the present application, if judging, the first data and the second data are continuous, the second data can be written
In page, the continuous data in page are constituted, then can be at this time the first data and the second data with the data length in page
The sum of data length, the data length in page, i.e. rewriting len_in_ can be rewritten according to the data length of the second data
page。
In the embodiment of the present application, if judging, the first data and the second data are discontinuous, the second data can also be written
In page, the discontinuous multiple segment data in page is constituted, it is to be understood that the length of the first data and the second data at this time
The sum of be less than page capacity.
In the embodiment of the present application, if judging, the first data and the second data are discontinuous, can also replicate the first data, from
Read the initial data equal with the capacity of page in storage system, it is corresponding first to be repaired including the first data in initial data
Change data and corresponding second data to be modified of the second data, by initial data be written page in, by first in page to
Modification data modification is the first data, is the second data by the second data modification to be modified in page, then will be modified
Page is written in storage system, realizes the modification of the data in storage system.That is, corresponding for the same page
Data can be realized as long as carrying out a reading data from storage system in two data to be written of one data and the second data
Modification, compared to carry out reading data every time in the prior art, reduce the number of reading data, therefore number can be saved
According to modification time delay, data modification efficiency is improved.
If the sum of data length of the first data and the second data is equal to the capacity of page storage system is written in page by S103.
After the second data are written in page, if the sum of data length of the first data and the second data is equal to the appearance of page
Amount illustrate that the first data and the second data are continuous and all capacity of occupancy page, that is to say, that by all data in page
It is written in storage system, not will cause the mistake modification of data, at this point it is possible to which storage system is written in page.
When the sum of data of the first data and the second data are less than the capacity of page, directly page cannot be written and stored
In system, at this point it is possible to there is following two embodiment:
The first, page has corresponding third data, according to writing position of the third data in page, by third data
It is written in page, if the sum of the first data, data length of the second data and third data are equal to the capacity of page, illustrates first
Data, the second data and third data are continuous and occupy all capacity of page, at this point it is possible to which storage system is written in page.
Wherein, the writing mode of third data can refer to the writing mode of the second data, and this will not be repeated here.
Second, there is no corresponding data by page, therefore reach preset time threshold after the second data are written, can
To be modified according to the first data and the second data to storage system, specifically, the first data and the second data can be replicated,
Read the initial data equal with the capacity of page from storage system, in initial data including the first data corresponding first to
Data and corresponding second data to be modified of the second data are modified, initial data is written in page, by first in page
Data modification to be modified is the first data, is the second data by the second data modification to be modified in page, then will be modified
Page is written in storage system, realizes the modification of the data in storage system.
After modifying to the data in storage system, the correlated condition of page, such as dirty data state can be updated,
Readable state or write-back state then update the size of file in addition, if the file size in storage system is changed.
The embodiment of the present application provides a kind of data processing method, obtains the page in linux kernel, and there are first in the page
Data the second data are written in page, according to writing position of second data in page if the number of the first data and the second data
It is equal to the capacity of page according to the sum of length, then storage system is written into page.That is, for the first data and the second data,
Capacity is respectively less than the capacity of page, therefore will do it the reading and rewriting of the initial data in twice storage system in the prior art,
And in the embodiment of the present application, if the sum of data length of the first data and the second data be equal to page capacity, can directly by
Page write-in storage system, the reading without carrying out the initial data in storage system reduce reading data number, reduce
The time delay of data modification improves the efficiency of data modification.
In order to make it easy to understand, above-mentioned data processing method is introduced with regard to specific application scenarios below.
There are the first data as data to be written, and the data length of the first data is 1KB, the capacity less than page
4KB, writes first data into page, occupies 0-1KB, then the data length len_in_page of page is 1KB, while page
Continuous position is 1KB.At this point it is possible to which there are following two situations:
1, the second data are as data to be written if it does not exist, and same page corresponding with the first data, then can be
After preset time, the first data are replicated, corresponding initial data are read from storage system, and be written in page, by original number
Content modification corresponding with the first data is the first data in, and modified page is written in storage system, realizes storage
The modification of data in system.
2, the second data are as data to be written if it exists, and same page corresponding with the first data, then have first
Data and the whether continuous two kinds of situations of the second data:
2.1, the first data and the second data are continuous, such as the writing position of the second data is 1KB, then writes the second data
Enter in page, judge whether the sum of data length of the first data and the second data is equal to the capacity of page, if so, such as second
The data length of data is 3KB, and page is written in storage system, realizes the modification of data in storage system;If it is not, such as
The data length of two data is 1KB, then can wait third data.
2.1.1, third data if it exists, and third data and the second data are continuous, then third data are written in page,
If whether the sum of data length of the first data, the second data and third data is equal to the capacity of page, such as third data
Data length is 2KB, then page is written in storage system, realizes the modification of data in storage system.
2.1.2, third data, and write-in the second data arrival preset time if it does not exist, then can replicate the first data
With the second data, the initial data equal with the capacity of page is read from storage system, includes the first data in initial data
Initial data is written in page for corresponding first data to be modified and the second data corresponding second data to be modified, is inciting somebody to action
The first data modification to be modified in page is the first data, is the second data by the second data modification to be modified in page,
Modified page is written in storage system again, realizes the modification of the data in storage system.
If 2.2, the first data and the second data are discontinuous, such as the writing position of the second data is 3KB, then can be with:
2.2.1, the modification of the data in storage system is directly carried out with reference to 2.1.2;
2.2.2, the second data are written in page, wait third data.
2.2.2.1, then page can be written in third data by third data if it exists, if the first data, the second data and
Whether the sum of data length of third data is equal to the capacity of page, then page is written in storage system, realizes storage system
The modification of middle data.
2.2.2.2, third data, and write-in the second data arrival preset time if it does not exist, then deposited with reference to 2.1.2
The modification of data in storage system.
Based on above method, the embodiment of the present application also provides a kind of data processing equipments, refering to what is shown in Fig. 3, being this Shen
Please a kind of structural block diagram of data processing equipment that provides of embodiment, which includes:
Page acquiring unit 110, for obtaining the page in linux kernel, there are the first data in the page;
First writing unit 120 writes second data for the writing position according to the second data in the page
Enter in the page;The data length of second data is less than the capacity of the page;
First modification unit 130, if the sum of the data length for first data and second data is equal to institute
Storage system is written in the page by the capacity for stating page.
Optionally, first writing unit is specifically used for:
If according to second data in the page writing position and the first data depositing in the page
Storage space is set, and determines that first data and second data are continuous, then second data is written in the page.
Optionally, the writing position according to second data in the page and first data are described
Storage location in page, determines that first data and second data are continuous, comprising:
According to storage location of first data in the page, the continuous position in the page is determined;
If writing position of second data in the page is identical as the continuous position, it is determined that first number
According to continuous with second data.
Optionally, described device further include:
Second writing unit, if the sum of the data length for first data and second data is less than the page
Capacity the third data are written in the page according to writing position of the third data in the page;
Second modification unit, if the data length for first data, second data and the third data
The sum of be equal to the page capacity, by the page be written storage system.
Optionally, described device further include:
Copied cells, if the sum of the data length for first data and second data is less than the appearance of the page
Amount, and second data are written and reach preset time threshold later, or, the write-in according to second data in the page
The storage location of position and first data in the page determines that first data do not connect with the data in the page
It is continuous, then replicate first data;
Reading unit, for reading the initial data equal with the capacity of the page, the original from the storage system
Beginning data include corresponding first data to be modified of the first data and corresponding second data to be modified of the second data;
Fills unit, for the initial data to be written in the page;
Page modification unit will be in the page for being the first data by the first data modification to be modified in the page
Second data modification to be modified is the second data;
Third modifies unit, for storage system to be written in the modified page.
The embodiment of the present application provides a kind of data processing equipment, obtains the page in linux kernel, and there are first in the page
Data the second data are written in page, according to writing position of second data in page if the number of the first data and the second data
It is equal to the capacity of page according to the sum of length, then storage system is written into page.That is, for the first data and the second data,
Capacity is respectively less than the capacity of page, therefore will do it the reading and rewriting of the initial data in twice storage system in the prior art,
And in the embodiment of the present application, if the sum of data length of the first data and the second data be equal to page capacity, can directly by
Page write-in storage system, the reading without carrying out the initial data in storage system reduce reading data number, reduce
The time delay of data modification improves the efficiency of data modification.
" first " in the titles such as " first ... " mentioned in the embodiment of the present application, " first ... " is used only to do name
Word mark, does not represent first sequentially.The rule is equally applicable to " second " etc..
As seen through the above description of the embodiments, those skilled in the art can be understood that above-mentioned implementation
All or part of the steps in example method can add the mode of general hardware platform to realize by software.Based on this understanding,
The technical solution of the application can be embodied in the form of software products, which can store is situated between in storage
In matter, such as read-only memory (English: read-only memory, ROM)/RAM, magnetic disk, CD etc., including some instructions to
So that a computer equipment (can be the network communication equipments such as personal computer, server, or router) executes
Method described in certain parts of each embodiment of the application or embodiment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for method reality
For applying example and apparatus embodiments, since it is substantially similar to system embodiment, so describe fairly simple, related place ginseng
See the part explanation of system embodiment.Equipment and system embodiment described above is only schematical, wherein making
It may or may not be physically separated for the module of separate part description, the component shown as module can be
Or it may not be physical module, it can it is in one place, or may be distributed over multiple network units.It can be with
Some or all of the modules therein is selected to achieve the purpose of the solution of this embodiment according to the actual needs.The common skill in this field
Art personnel can understand and implement without creative efforts.
The above is only the preferred embodiment of the application, is not intended to limit the protection scope of the application.It should refer to
Out, for those skilled in the art, it under the premise of not departing from the application, can also make several improvements
And retouching, these improvements and modifications also should be regarded as the protection scope of the application.
Claims (10)
1. a kind of data processing method, which is characterized in that the described method includes:
The page in linux kernel is obtained, there are the first data in the page;
According to writing position of second data in the page, second data are written in the page;Second data
Data length be less than the page capacity;
If the sum of data length of first data and second data is equal to the capacity of the page, page write-in is deposited
Storage system.
2. the method according to claim 1, wherein the write-in position according to the second data in the page
It sets, second data is written in the page, comprising:
If according to second data in the storage position of writing position and first data in the page in the page
It sets, determines that first data and second data are continuous, then second data are written in the page.
3. according to the method described in claim 2, it is characterized in that, the write-in according to second data in the page
The storage location of position and first data in the page determines that first data and second data are continuous,
Include:
According to storage location of first data in the page, the continuous position in the page is determined;
If writing position of second data in the page is identical as the continuous position, it is determined that first data with
Second data are continuous.
4. method according to claim 1 to 3, which is characterized in that the method also includes:
If the sum of data length of first data and second data is less than the capacity of the page, existed according to third data
The third data are written in the page writing position in the page;
If the sum of data length of first data, second data and the third data is equal to the capacity of the page,
Storage system is written into the page.
5. method according to claim 1 to 3, which is characterized in that the method also includes:
If the sum of data length of first data and second data is less than the capacity of the page, and is written described second
Reach preset time threshold after data, or, the writing position and described first according to second data in the page
Storage location of the data in the page determines that first data and the data in the page are discontinuous, then replicates described
One data;
The initial data equal with the capacity of the page is read from the storage system, the initial data includes the first data
Corresponding first data to be modified and corresponding second data to be modified of the second data;
The initial data is written in the page;
It is the first data by the first data modification to be modified in the page, is by the second data modification to be modified in the page
Second data;
Storage system is written into the modified page.
6. a kind of data processing equipment, which is characterized in that described device includes:
Page acquiring unit, for obtaining the page in linux kernel, there are the first data in the page;
First writing unit will be described in second data write-in for the writing position according to the second data in the page
In page;The data length of second data is less than the capacity of the page;
First modification unit, if the sum of the data length for first data and second data is equal to the appearance of the page
Storage system is written in the page by amount.
7. device according to claim 6, which is characterized in that first writing unit is specifically used for:
If according to second data in the storage position of writing position and first data in the page in the page
It sets, determines that first data and second data are continuous, then second data are written in the page.
8. device according to claim 7, which is characterized in that the write-in according to second data in the page
The storage location of position and first data in the page determines that first data and second data are continuous,
Include:
According to storage location of first data in the page, the continuous position in the page is determined;
If writing position of second data in the page is identical as the continuous position, it is determined that first data with
Second data are continuous.
9. according to device described in claim 6-8 any one, which is characterized in that described device further include:
Second writing unit, if the sum of the data length for first data and second data is less than the appearance of the page
The third data are written in the page according to writing position of the third data in the page for amount;
Second modification unit, if for the sum of first data, second data and data length of the third data
Equal to the capacity of the page, storage system is written into the page.
10. according to device described in claim 6-8 any one, which is characterized in that described device further include:
Copied cells, if the sum of the data length for first data and second data is less than the capacity of the page,
And reach preset time threshold after write-in second data, or, the write-in position according to second data in the page
It sets and storage location of first data in the page, determines that first data do not connect with the data in the page
It is continuous, then replicate first data;
Reading unit, for reading the initial data equal with the capacity of the page, the original number from the storage system
According to including corresponding first data to be modified of the first data and corresponding second data to be modified of the second data;
Fills unit, for the initial data to be written in the page;
Page modification unit, for being the first data by the first data modification to be modified in the page, by second in the page
Data modification to be modified is the second data;
Third modifies unit, for storage system to be written in the modified page.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811231339.7A CN109522240A (en) | 2018-10-22 | 2018-10-22 | A kind of data processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811231339.7A CN109522240A (en) | 2018-10-22 | 2018-10-22 | A kind of data processing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109522240A true CN109522240A (en) | 2019-03-26 |
Family
ID=65772429
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811231339.7A Withdrawn CN109522240A (en) | 2018-10-22 | 2018-10-22 | A kind of data processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109522240A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111966285A (en) * | 2020-07-20 | 2020-11-20 | 四川虹美智能科技有限公司 | Method, main control chip and system for storing data into EEPROM |
CN115858421A (en) * | 2023-03-01 | 2023-03-28 | 浪潮电子信息产业股份有限公司 | Cache management method, device, equipment, readable storage medium and server |
-
2018
- 2018-10-22 CN CN201811231339.7A patent/CN109522240A/en not_active Withdrawn
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111966285A (en) * | 2020-07-20 | 2020-11-20 | 四川虹美智能科技有限公司 | Method, main control chip and system for storing data into EEPROM |
CN111966285B (en) * | 2020-07-20 | 2022-09-06 | 四川虹美智能科技有限公司 | Method, main control chip and system for storing data into EEPROM |
CN115858421A (en) * | 2023-03-01 | 2023-03-28 | 浪潮电子信息产业股份有限公司 | Cache management method, device, equipment, readable storage medium and server |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108234641A (en) | Data read-write method and device based on distributed consensus protocol realization | |
CN103888378B (en) | A kind of data exchange system and method based on caching mechanism | |
CN106201659B (en) | A kind of method and host of live migration of virtual machine | |
CN104461768B (en) | copy storage device and copy storage method | |
CN106990926A (en) | A kind of processing method of solid state hard disc abrasion equilibrium | |
CN110968529A (en) | Method and device for realizing non-cache solid state disk, computer equipment and storage medium | |
CN110297603A (en) | Random write performance method for improving, device and computer equipment based on solid state hard disk | |
CN110109868A (en) | Method, apparatus and computer program product for index file | |
CN109471843A (en) | A kind of metadata cache method, system and relevant apparatus | |
CN104054076B (en) | Date storage method, database purchase node failure processing method and processing device | |
CN110083379A (en) | A kind of server component upgrade method and relevant apparatus | |
CN109522240A (en) | A kind of data processing method and device | |
CN108255989A (en) | Picture storage method, device, terminal device and computer storage media | |
CN104268097B (en) | A kind of metadata processing method and system | |
CN109086462A (en) | The management method of metadata in a kind of distributed file system | |
WO2020256831A1 (en) | Smart contract information redirect to updated version of smart contract | |
CN113535087B (en) | Data processing method, server and storage system in data migration process | |
CN103064749B (en) | Inter-process communication method | |
CN109788006B (en) | Data equalization method and device and computer equipment | |
CN106325769A (en) | Data storage method and device | |
CN108958974A (en) | A kind of Snapshot Method, device, system and readable storage medium storing program for executing | |
CN105808451A (en) | Data caching method and related apparatus | |
CN108519860B (en) | SSD read hit processing method and device | |
CN115202589B (en) | Placement group member selection method, device and equipment and readable storage medium | |
CN109766313A (en) | Geological project data processing method, device and computer equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20190326 |
|
WW01 | Invention patent application withdrawn after publication |