CN110515562A - A kind of disk access method and device - Google Patents

A kind of disk access method and device Download PDF

Info

Publication number
CN110515562A
CN110515562A CN201910810187.4A CN201910810187A CN110515562A CN 110515562 A CN110515562 A CN 110515562A CN 201910810187 A CN201910810187 A CN 201910810187A CN 110515562 A CN110515562 A CN 110515562A
Authority
CN
China
Prior art keywords
write
unit
chinese ink
brush dipped
data
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
Application number
CN201910810187.4A
Other languages
Chinese (zh)
Inventor
孙京本
刘清林
刘如意
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Wave Intelligent Technology Co Ltd
Original Assignee
Suzhou Wave Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Wave Intelligent Technology Co Ltd filed Critical Suzhou Wave Intelligent Technology Co Ltd
Priority to CN201910810187.4A priority Critical patent/CN110515562A/en
Publication of CN110515562A publication Critical patent/CN110515562A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0647Migration mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0656Data buffering arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0674Disk device
    • G06F3/0676Magnetic disk device

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

The embodiment of the present application discloses a kind of disk access method and device, and for improving disk utilization and reducing disk access frequency, this method comprises: obtaining write operation requests, write operation requests include write-in data;When the size that data are written is less than or equal to first threshold, write-in data buffer storage is write with a brush dipped in Chinese ink into unit into memory;When the memory space for writing with a brush dipped in Chinese ink unit writes full data or writes with a brush dipped in Chinese ink time of unit write-in data and reach second threshold, pilot brush r/w cell is by the Data Migration write with a brush dipped in Chinese ink in unit to writing with a brush dipped in Chinese ink in the corresponding disk storage space of unit.

Description

A kind of disk access method and device
Technical field
This application involves technical field of data storage, and in particular to a kind of disk access method and device.
Background technique
Disk array (Redundant Arrays of Independent Drives, RAID) is by the independent magnetic of many blocks Disk is combined into the huge disk group of a capacity and carries out data storage.Disk array can be full flash array, full flash array It is by solid storage medium, such as solid state hard disk (Solid State Disk, SSD) or other flash medias, the independence of composition Storage array or equipment.
When using disk array as storage equipment, disk in the accessible disk array of host, such as to disk Data are written or from disk read data.In the prior art, when disk array receives the write operation requests of host transmission, directly It connects and writes data into disk.But this kind of mode may cause that disk utilization is relatively low, disk access is frequent, to accelerate magnetic Mill damage reduces the service life of disk.
Summary of the invention
In view of this, the embodiment of the present application provides a kind of disk access method and device, to improve disk utilization and drop Low disk access frequency.
To solve the above problems, technical solution provided by the embodiments of the present application is as follows:
A kind of disk access method, which comprises
Write operation requests are obtained, the write operation requests include write-in data;
When the size of said write data is less than or equal to first threshold, by said write data buffer storage into memory Write with a brush dipped in Chinese ink unit;
When the memory space for writing with a brush dipped in Chinese ink unit writes full data or the time for writing with a brush dipped in Chinese ink unit write-in data reaches the Unit is write with a brush dipped in Chinese ink when two threshold values, described in control the Data Migration write with a brush dipped in Chinese ink in unit is write with a brush dipped in Chinese ink into the corresponding disk of unit described in deposit It stores up in space.
In one possible implementation, the write operation requests further include write-in logical address, by said write number According to be cached in memory write with a brush dipped in Chinese ink unit after, the method also includes:
In the storage location write with a brush dipped in Chinese ink in unit and described the corresponding disk of unit is write with a brush dipped in Chinese ink according to said write data Position of the memory space in total disk storage space determines the write-in physical address of said write data;
By the corresponding relationship of said write logical address and said write physical address be saved in logical address with physically Location mapping table.
In one possible implementation, the method also includes:
Read operation request is obtained, the read operation request includes reading logical address;
The logical address and physical address mapping table is searched, determines the corresponding reading of the reading logical address physically Location;
Data are read from the corresponding disk storage space of the reading physical address.
It is in one possible implementation, described that said write data buffer storage is write with a brush dipped in Chinese ink into unit into memory, comprising:
Each write with a brush dipped in Chinese ink in memory searches whether that there are residual memory spaces to be greater than or equal to said write number in unit According to size write with a brush dipped in Chinese ink unit;
The unit of writing with a brush dipped in Chinese ink that any residual memory space is greater than or equal to the size of said write data is determined as target brush Said write data buffer storage is write with a brush dipped in Chinese ink unit to the target by r/w cell;
When each residual memory space for writing with a brush dipped in Chinese ink unit is respectively less than the size of said write data, unit is write with a brush dipped in Chinese ink according to n Residual memory space said write data are divided into n part, by every partial write data buffer storage after division to correspond to Write with a brush dipped in Chinese ink unit, n is the integer more than or equal to 2.
In one possible implementation, the method also includes:
It divides in advance and each writes with a brush dipped in Chinese ink the corresponding disk storage space of unit.
A kind of disk access device, described device include:
First acquisition unit, for obtaining write operation requests, the write operation requests include write-in data;
Cache unit, for when the size of said write data be less than or equal to first threshold when, by said write data It is cached in memory and writes with a brush dipped in Chinese ink unit;
Writing unit, the memory space for writing with a brush dipped in Chinese ink unit described in writes full data or data are written in the unit of writing with a brush dipped in Chinese ink Time when reaching second threshold, write with a brush dipped in Chinese ink unit described in control and the Data Migration write with a brush dipped in Chinese ink in unit write with a brush dipped in Chinese ink into unit described in In corresponding disk storage space.
In one possible implementation, the write operation requests further include write-in logical address, and described device is also wrapped It includes:
First determination unit, for according to said write data in the storage location write with a brush dipped in Chinese ink in unit and the brush Position of the corresponding disk storage space of r/w cell in total disk storage space, determines the write-in of said write data physically Location;
Storage unit, for the corresponding relationship of said write logical address and said write physical address to be saved in logic Address and physical address mapping table.
In one possible implementation, described device further include:
Second acquisition request, for obtaining read operation request, the read operation request includes reading logical address;
Second determination unit determines the reading logically for searching the logical address and physical address mapping table The corresponding reading physical address in location;
Reading unit, for reading data from the corresponding disk storage space of the reading physical address.
In one possible implementation, the cache unit, comprising:
Subelement is searched, for when the size of said write data is less than or equal to first threshold, in memory each A write with a brush dipped in Chinese ink searches whether that the size for being greater than or equal to said write data there are residual memory space writes with a brush dipped in Chinese ink unit in unit;
First caching subelement, the brush of the size for any residual memory space to be greater than or equal to said write data R/w cell is determined as target and writes with a brush dipped in Chinese ink unit, and said write data buffer storage is write with a brush dipped in Chinese ink unit to the target;
Second caching subelement, the residual memory space for that each ought write with a brush dipped in Chinese ink unit are respectively less than the big of said write data Small, said write data are divided into n part by the residual memory space for writing with a brush dipped in Chinese ink unit according to n, by every part after division Write-in data buffer storage writes with a brush dipped in Chinese ink unit to corresponding, and n is the integer more than or equal to 2.
In one possible implementation, described device further include:
Division unit each writes with a brush dipped in Chinese ink the corresponding disk storage space of unit for dividing in advance.
It can be seen that the embodiment of the present application has the following beneficial effects:
The embodiment of the present application first determines whether write-in number after disk array gets the write operation requests including data are written According to size, when be written data size be less than or equal to first threshold when, illustrate this time request be written data volume it is smaller, then First write-in data buffer storage is write with a brush dipped in Chinese ink in unit to the one of memory.Writing when any memory space for writing with a brush dipped in Chinese ink unit expires, then will write with a brush dipped in Chinese ink list Data Migration in member is into corresponding disk storage space.In this way, write-once disk storage space is continuous, opposite More data avoid and data repeatedly and/or discontinuously are written to disk, to improve the utilization rate of disk and reduction The access frequency of disk.Meanwhile in order to avoid cache-time is longer in memory for data to be written, unit write-in number is being write with a brush dipped in Chinese ink According to time reach second threshold when, also the Data Migration write with a brush dipped in Chinese ink in unit is guaranteed to write into corresponding disk storage space Disk can be correctly written in by entering data.
Detailed description of the invention
Fig. 1 is a kind of application scenarios schematic diagram provided by the embodiments of the present application;
Fig. 2 is a kind of flow chart of disk access method provided by the embodiments of the present application;
Fig. 3 is a kind of schematic diagram of disk access device provided by the embodiments of the present application.
Specific embodiment
In order to make the above objects, features, and advantages of the present application more apparent, with reference to the accompanying drawing and it is specific real Mode is applied to be described in further detail the embodiment of the present application.
Inventor has found in the research to traditional disk access process, when disk array receives the IO of host transmission (Input/Output, input/output) request, that is, receive the disk access requests of host transmission, when the disk access requests When for write request, then the write-in data that write request carries are write direct into disk.The data volume that each write request carries It is not of uniform size, when receiving the write request of multiple small datas, disk can be made to frequently write into.Also, writing position very may be used Can not continuously, will cause the reduction of the disk useful space, cause disk utilization relatively low.Therefore, disk is visited in the prior art Ask process there are disk utilizations that technical problem relatively low, that disk access is frequent reduces the disk longevity to disk can be accelerated to wear Life.
Based on this, the embodiment of the present application provides a kind of disk access method, writes behaviour including write-in data getting After requesting, the size of write-in data is first determined whether, when the size that data are written is less than or equal to first threshold, illustrate this time It requests the data volume of write-in smaller, then first writes with a brush dipped in Chinese ink write-in data buffer storage in unit to the one of memory.When any unit write with a brush dipped in Chinese ink Memory space is write completely, then by the Data Migration write with a brush dipped in Chinese ink in unit into corresponding disk storage space.In this way, write-once disk Memory space is continuous, relatively large number of data, avoids and data repeatedly and/or discontinuously are written to disk, thus It improves the utilization rate of disk and reduces the access frequency of disk.Meanwhile in order to avoid data to be written cache in memory Time is longer, write with a brush dipped in Chinese ink unit write-in data time reach second threshold when, also by the Data Migration write with a brush dipped in Chinese ink in unit to pair In the disk storage space answered, guarantee that write-in data can be correctly written in disk.
The embodiment of the present application in order to facilitate understanding, it is shown in Figure 1, show the exemplary application field of the embodiment of the present application The block schematic illustration of scape.Wherein, disk access method provided by the embodiments of the present application can be applied in redundant array of inexpensive disks 1 02, In In practical application, the control module in disk array specifically can be applied to, as module is rolled up in log.
In specific implementation, host 101 can send write request to redundant array of inexpensive disks 1 02, and redundant array of inexpensive disks 1 02 passes through this Shen Please embodiment provide disk access method will be written data be written disk.In addition, host 101 can also be to redundant array of inexpensive disks 1 02 Read requests are sent, redundant array of inexpensive disks 1 02 is anti-from disk reading data also by disk access method provided by the embodiments of the present application It feeds host 101.
It will be understood by those skilled in the art that block schematic illustration shown in FIG. 1 is only that presently filed embodiment can be An example being wherein achieved.The scope of application of the application embodiment is not limited by any aspect of the frame.
The specific implementation of the embodiment of the present application technical solution for ease of understanding, below in conjunction with attached drawing to the embodiment of the present application The disk access method of offer is illustrated.
Before illustrating disk access method provided by the embodiments of the present application, firstly, the division to disk is illustrated.I.e. In some possible implementations of the embodiment of the present application, it can divide that each to write with a brush dipped in Chinese ink the corresponding disk storage of unit empty in advance Between.
When using disk array, user can first create storage pool, i.e. one or more magnetic in selection disk array Disk uses.After the completion of storage pool creation, the memory space of storage pool can roll up mould by the control module in disk array, such as log Block is managed.Storage pool can be divided into two spaces, a part of storing data, a part storage member by the control module Data.Metadata such as logical address and physical address mapping table, the logical address and physical address mapping table can be in subsequent realities It applies involved in example, herein first without explanation.
In the space of storing data, first disk can be divided according to fixed size (such as 128M), each division There is the small space for being segmented into fixed number in space afterwards, such as the space of 128M is further subdivided into 8 small spaces, each small sky Between be 16M.In this way, each small space is corresponding with an equal amount of unit of writing with a brush dipped in Chinese ink, i.e., each writes with a brush dipped in Chinese ink the corresponding disk of unit and deposit The size for storing up space is identical as the size for writing with a brush dipped in Chinese ink unit memory space, and completion divides each corresponding disk of unit of writing with a brush dipped in Chinese ink in advance and deposits Store up space.
May include in the embodiment of the present application, in memory it is multiple write with a brush dipped in Chinese ink unit, each unit of writing with a brush dipped in Chinese ink can access pair simultaneously The disk storage space answered.The corresponding relationship for writing with a brush dipped in Chinese ink unit and each disk storage space can change, such as write with a brush dipped in Chinese ink unit 1-8 Corresponding to disk storage space 1-8, after disk storage space 1-8 is filled with data, writes with a brush dipped in Chinese ink unit 1-8 and can correspond to disk and deposit Store up space 9-16.
In advance divided it is each write with a brush dipped in Chinese ink the corresponding disk storage space of unit after, then can be according to the embodiment of the present application The disk access method of offer realizes that disk utilization is higher, the lower disk access process of disk access frequency.
It is shown in Figure 2, a kind of flow chart of disk access method provided by the embodiments of the present application is shown, may include Following steps:
Step 201: obtaining write operation requests, write operation requests include write-in data.
Host can issue access operation request to disk array by the I/O interface of disk array, and access operation request can To be divided into write operation requests and read operation request.It, can be simultaneously when disk array gets the write operation requests that host issues Get the write-in data of write operation requests carrying.Write-in data can be understood as host and need some disk into disk array The data of write-in.In practical applications, for write-in data usually as unit of grain, per unit is 8K size.Such as write-in number According to for 2grain, then the write-in data are 16K size.
Step 202: when the size that data are written is less than or equal to first threshold, by write-in data buffer storage into memory Write with a brush dipped in Chinese ink unit.
After getting write-in data, first determine whether the size of write-in data is less than or equal to first threshold.When writing The size for entering data is less than or equal to first threshold, illustrates that the data volume of the write-in data is smaller, can if writing direct disk It can will cause that disk utilization is not high, write operation is frequent.Then in the embodiment of the present application, when write-in data size be less than or When equal to first threshold, which is write with a brush dipped in Chinese ink into unit into memory.Wherein, first threshold can with individually write with a brush dipped in Chinese ink The storage size of unit is related, such as equal to the storage size for individually writing with a brush dipped in Chinese ink unit, or writes with a brush dipped in Chinese ink list less than single The storage size of member, the value of first threshold can determines according to actual conditions, and the embodiment of the present application does not limit this.
In disk array initialization, it may be predetermined that write with a brush dipped in Chinese ink unit number in memory, and each write with a brush dipped in Chinese ink unit Storage size.Write-in data can be cached to brush of any one residual memory space greater than the size of the write-in data In r/w cell.For example, write-in data be 2M, then the write-in data can be written into any one current residual storage space be greater than or Equal to writing with a brush dipped in Chinese ink in unit for 2M.And if each residual memory space for writing with a brush dipped in Chinese ink unit is respectively less than the size that data are written, also Write-in data can be split as multiple portions, be cached to multiple write with a brush dipped in Chinese ink in unit respectively.
Therefore, it can determine that the write-in data to be cached writes with a brush dipped in Chinese ink unit according to the size of write-in data.Then one In a little possible implementations, data buffer storage will be written when the size that data are written is less than or equal to first threshold in step 202 The specific implementation for writing with a brush dipped in Chinese ink unit into memory may include:
When the size that data are written is less than or equal to first threshold, each write with a brush dipped in Chinese ink in unit in memory is searched whether Be greater than or equal to the size that data are written there are residual memory space writes with a brush dipped in Chinese ink unit;
The unit of writing with a brush dipped in Chinese ink that any residual memory space is greater than or equal to the size of write-in data is determined as target and writes with a brush dipped in Chinese ink list Write-in data buffer storage is write with a brush dipped in Chinese ink unit to target by member;
When the size of each residual memory space for writing with a brush dipped in Chinese ink unit respectively less than write-in data, the surplus of unit is write with a brush dipped in Chinese ink according to n Remaining memory space is divided into n part for data are written, and every partial write data buffer storage after division is write with a brush dipped in Chinese ink list to corresponding Member, n are the integer more than or equal to 2.
That is, in the embodiment of the present application, when write-in data, which need first to be cached to, to be write with a brush dipped in Chinese ink in unit, first each It is a write with a brush dipped in Chinese ink to search whether to exist in unit write with a brush dipped in Chinese ink unit and can cache the write-in data, i.e., residual memory space is greater than or equal to and writes Enter the size of data, if it is present write-in data buffer storage satisfactory is write with a brush dipped in Chinese ink in unit to any.If each write with a brush dipped in Chinese ink The residual memory space of unit is respectively less than the size that data are written, then can be incited somebody to action according to the residual memory space size for writing with a brush dipped in Chinese ink unit Write-in data are divided into multiple portions, so that the write-in data of each part is cached to some and write with a brush dipped in Chinese ink in unit.
For example, write-in data be 6M, exist write with a brush dipped in Chinese ink unit residual memory space be 8M, then the write-in data can be direct This is cached to write with a brush dipped in Chinese ink in unit.In another example write-in data are 6M, the residual memory space for writing with a brush dipped in Chinese ink unit 1 is 4M, writes with a brush dipped in Chinese ink unit 2 Residual memory space be 4M, then can will write-in data be divided into 4M and 2M two parts, first part is cached to and writes with a brush dipped in Chinese ink list Member 1, first part is cached to and writes with a brush dipped in Chinese ink unit 2.
Step 203: writing full data when the memory space for writing with a brush dipped in Chinese ink unit or write with a brush dipped in Chinese ink time of unit write-in data and reach the When two threshold values, pilot brush r/w cell is by the Data Migration write with a brush dipped in Chinese ink in unit to writing with a brush dipped in Chinese ink in the corresponding disk storage space of unit.
When the memory space for writing with a brush dipped in Chinese ink unit writes full data, it can control this and write with a brush dipped in Chinese ink the Data Migration that unit will be write with a brush dipped in Chinese ink in unit To writing with a brush dipped in Chinese ink the corresponding disk storage space of unit.After i.e. one or more write-in data buffer storages write with a brush dipped in Chinese ink unit to one, when this is write with a brush dipped in Chinese ink Residual memory space is not present in unit, then this can be write with a brush dipped in Chinese ink to Data Migration in unit to writing with a brush dipped in Chinese ink the corresponding disk storage of unit Space.Data Migration indicates after disk storage space is written in the data write with a brush dipped in Chinese ink in unit, writes with a brush dipped in Chinese ink in unit and does not save these Data, memory recycling can be placed back in by writing with a brush dipped in Chinese ink unit.The process of data write-in disk storage space is referred to as counting According to rule.
And when the memory space for writing with a brush dipped in Chinese ink unit does not write full data, in order to avoid data retention time mistake in memory is written Long, then when the time for writing with a brush dipped in Chinese ink unit write-in data reaching second threshold, also can control this and write with a brush dipped in Chinese ink unit will be write with a brush dipped in Chinese ink in unit Data Migration to writing with a brush dipped in Chinese ink the corresponding disk storage space of unit.Each unit of writing with a brush dipped in Chinese ink can start to count after data cached for the first time When, when the time reaches second threshold and current memory space does not write full data, then the data write with a brush dipped in Chinese ink in unit can also be moved It moves on to and writes with a brush dipped in Chinese ink the corresponding disk storage space of unit.Wherein, second threshold may be set according to actual conditions, the embodiment of the present application To this without limiting.
In addition, when the size that data are written is greater than first threshold, data will be written in some possible implementations Write direct disk storage space.
The size of write-in data is greater than first threshold representative write-in data and is not belonging to small data, writes direct disk storage sky Between not will lead to disk write and enter that frequency is excessively high, and data are written writing direct disk storage space makes to be written the efficiency of data more Efficiently.
In this way, the embodiment of the present application first determines whether after disk array gets the write operation requests including data are written The size that data are written illustrates the data volume of this time request write-in when the size that data are written is less than or equal to first threshold It is smaller, then first write-in data buffer storage is write with a brush dipped in Chinese ink in unit to the one of memory.Writing when any memory space for writing with a brush dipped in Chinese ink unit expires, then will The Data Migration in unit is write with a brush dipped in Chinese ink into corresponding disk storage space.In this way, write-once disk storage space is continuous , relatively large number of data, avoid and data repeatedly and/or discontinuously be written to disk, to improve the utilization of disk Rate and the access frequency for reducing disk.Meanwhile in order to avoid cache-time is longer in memory for data to be written, list is being write with a brush dipped in Chinese ink When the time of member write-in data reaches second threshold, also by the Data Migration write with a brush dipped in Chinese ink in unit to corresponding disk storage space In, guarantee that write-in data can be correctly written in disk.
Based on the above embodiment, in some possible implementations, write operation requests can also include being written logically Location, by be written data buffer storage into memory write with a brush dipped in Chinese ink unit after, disk access method provided by the embodiments of the present application can be with Include:
In the storage location write with a brush dipped in Chinese ink in unit and the corresponding disk storage space of unit is write with a brush dipped in Chinese ink total according to write-in data Position in disk storage space determines the write-in physical address of write-in data;
The corresponding relationship that logical address and write-in physical address is written is saved in logical address and physical address mapping table.
Namely original write operation requests issue be write-in logical address, it is also necessary to determine will write-in data be written disk Actual physical address, that is, need to establish write-in logical address and be written physical address corresponding relationship.Specifically establish the correspondence The mode of relationship is, can write with a brush dipped in Chinese ink storage location in unit and this is write with a brush dipped in Chinese ink the corresponding disk of unit and deposits according to write-in data Position of the space in total disk storage space is stored up, mapping is written position of the data in total disk storage space, thus The write-in physical address of the write-in data is obtained, is established between the write-in logical address of the write-in data and write-in physical address Corresponding relationship.The corresponding relationship can be saved in logical address and physical address mapping table.In practical applications, logical address It can be saved in physical address mapping table in the memory space of the storage metadata pre-established.
After establishing logical address and physical address mapping table, in other possible implementation, the application is real Applying the disk access method that example provides can also include:
Read operation request is obtained, read operation request includes reading logical address;
Logical address and physical address mapping table is searched, determines and reads the corresponding reading physical address of logical address;
Data are read from the corresponding disk storage space of physical address is read.
In the embodiment of the present application, it can also realize from disk and read data.When disk array gets what host issued When read operation request, the available reading logical address for including into read operation request.Acquisition reads logical address and can not Determine position of the data to be read in disk, it is also necessary to be read out logical address to turn for reading physical address It changes.According to logical address and physical address mapping table, it can will read logical address and be converted to reading physical address, by reading object Reason address can read data in disk corresponding position.After obtaining reading data, it can will read data and pass through disk battle array The I/O interface of column feeds back to host.
In this way, the embodiment of the present application can also establish logical address and physical address mapping table, to realize the reading of data.
Shown in Figure 3, the embodiment of the present application also provides a kind of disk access device, the apparatus may include:
First acquisition unit 301, for obtaining write operation requests, the write operation requests include write-in data;
Cache unit 302, for when the size of said write data be less than or equal to first threshold when, by said write number Unit is write with a brush dipped in Chinese ink according to being cached in memory;
Writing unit 303, the memory space for writing with a brush dipped in Chinese ink unit described in writes full data or the unit of writing with a brush dipped in Chinese ink is written Unit is write with a brush dipped in Chinese ink when the time of data reaches second threshold, described in control to write with a brush dipped in Chinese ink the Data Migration write with a brush dipped in Chinese ink in unit described in In the corresponding disk storage space of unit.
In one possible implementation, writing unit is also used to when the size that data are written is greater than first threshold, Write-in data are write direct into disk storage space.
In one possible implementation, the write operation requests further include write-in logical address, and described device is also wrapped It includes:
First determination unit, for according to said write data in the storage location write with a brush dipped in Chinese ink in unit and the brush Position of the corresponding disk storage space of r/w cell in total disk storage space, determines the write-in of said write data physically Location;
Storage unit, for the corresponding relationship of said write logical address and said write physical address to be saved in logic Address and physical address mapping table.
In one possible implementation, described device further include:
Second acquisition request, for obtaining read operation request, the read operation request includes reading logical address;
Second determination unit determines the reading logically for searching the logical address and physical address mapping table The corresponding reading physical address in location;
Reading unit, for reading data from the corresponding disk storage space of the reading physical address.
In one possible implementation, the cache unit, comprising:
Subelement is searched, for when the size of said write data is less than or equal to first threshold, in memory each A write with a brush dipped in Chinese ink searches whether that the size for being greater than or equal to said write data there are residual memory space writes with a brush dipped in Chinese ink unit in unit;
First caching subelement, the brush of the size for any residual memory space to be greater than or equal to said write data R/w cell is determined as target and writes with a brush dipped in Chinese ink unit, and said write data buffer storage is write with a brush dipped in Chinese ink unit to the target;
Second caching subelement, the residual memory space for that each ought write with a brush dipped in Chinese ink unit are respectively less than the big of said write data Small, said write data are divided into n part by the residual memory space for writing with a brush dipped in Chinese ink unit according to n, by every part after division Write-in data buffer storage writes with a brush dipped in Chinese ink unit to corresponding, and n is the integer more than or equal to 2.
In one possible implementation, device further include:
Division unit each writes with a brush dipped in Chinese ink the corresponding disk storage space of unit for dividing in advance.
In this way, the embodiment of the present application first determines whether after disk array gets the write operation requests including data are written The size that data are written illustrates the data volume of this time request write-in when the size that data are written is less than or equal to first threshold It is smaller, then first write-in data buffer storage is write with a brush dipped in Chinese ink in unit to the one of memory.Writing when any memory space for writing with a brush dipped in Chinese ink unit expires, then will The Data Migration in unit is write with a brush dipped in Chinese ink into corresponding disk storage space.In this way, write-once disk storage space is continuous , relatively large number of data, avoid and data repeatedly and/or discontinuously be written to disk, to improve the utilization of disk Rate and the access frequency for reducing disk.Meanwhile in order to avoid cache-time is longer in memory for data to be written, list is being write with a brush dipped in Chinese ink When the time of member write-in data reaches second threshold, also by the Data Migration write with a brush dipped in Chinese ink in unit to corresponding disk storage space In, guarantee that write-in data can be correctly written in disk.
It should be noted that each embodiment in this specification is described in a progressive manner, each embodiment emphasis is said Bright is the difference from other embodiments, and the same or similar parts in each embodiment may refer to each other.For reality For applying system or device disclosed in example, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, phase Place is closed referring to method part illustration.
It should be appreciated that in this application, " at least one (item) " refers to one or more, and " multiple " refer to two or two More than a."and/or" indicates may exist three kinds of relationships, for example, " A and/or B " for describing the incidence relation of affiliated partner It can indicate: only exist A, only exist B and exist simultaneously tri- kinds of situations of A and B, wherein A, B can be odd number or plural number.Word Symbol "/" typicallys represent the relationship that forward-backward correlation object is a kind of "or"." at least one of following (a) " or its similar expression, refers to Any combination in these, any combination including individual event (a) or complex item (a).At least one of for example, in a, b or c (a) can indicate: a, b, c, " a and b ", " a and c ", " b and c ", or " a and b and c ", and wherein a, b, c can be individually, can also To be multiple.
It should also be noted that, herein, relational terms such as first and second and the like are used merely to one Entity or operation are distinguished with another entity or operation, without necessarily requiring or implying between these entities or operation There are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant are intended to contain Lid non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can directly be held with hardware, processor The combination of capable software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only deposit Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology In any other form of storage medium well known in field.
The foregoing description of the disclosed embodiments makes professional and technical personnel in the field can be realized or use the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the application.Therefore, the application It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest scope of cause.

Claims (10)

1. a kind of disk access method, which is characterized in that the described method includes:
Write operation requests are obtained, the write operation requests include write-in data;
When the size of said write data is less than or equal to first threshold, by said write data buffer storage writing with a brush dipped in Chinese ink into memory Unit;
When the memory space for writing with a brush dipped in Chinese ink unit write full data or it is described write with a brush dipped in Chinese ink unit write-in data time reach the second threshold Unit is write with a brush dipped in Chinese ink when value, described in control, and the Data Migration write with a brush dipped in Chinese ink in unit is write with a brush dipped in Chinese ink into the corresponding disk storage sky of unit described in Between in.
2. being incited somebody to action the method according to claim 1, wherein the write operation requests further include write-in logical address Said write data buffer storage into memory write with a brush dipped in Chinese ink unit after, the method also includes:
In the storage location write with a brush dipped in Chinese ink in unit and described the corresponding disk storage of unit is write with a brush dipped in Chinese ink according to said write data Position of the space in total disk storage space determines the write-in physical address of said write data;
The corresponding relationship of said write logical address and said write physical address is saved in logical address and physical address to reflect Firing table.
3. according to the method described in claim 2, it is characterized in that, the method also includes:
Read operation request is obtained, the read operation request includes reading logical address;
The logical address and physical address mapping table is searched, determines the corresponding reading physical address of the reading logical address;
Data are read from the corresponding disk storage space of the reading physical address.
4. the method according to claim 1, wherein the writing with a brush dipped in Chinese ink into memory by said write data buffer storage Unit, comprising:
Each write with a brush dipped in Chinese ink in memory searches whether that there are residual memory spaces to be greater than or equal to said write data in unit Size writes with a brush dipped in Chinese ink unit;
The unit of writing with a brush dipped in Chinese ink that any residual memory space is greater than or equal to the size of said write data is determined as target and writes with a brush dipped in Chinese ink list Said write data buffer storage is write with a brush dipped in Chinese ink unit to the target by member;
When each residual memory space for writing with a brush dipped in Chinese ink unit is respectively less than the size of said write data, the surplus of unit is write with a brush dipped in Chinese ink according to n Said write data are divided into n part by remaining memory space, by every partial write data buffer storage after division to corresponding brush R/w cell, n are the integer more than or equal to 2.
5. method according to any of claims 1-4, which is characterized in that the method also includes:
It divides in advance and each writes with a brush dipped in Chinese ink the corresponding disk storage space of unit.
6. a kind of disk access device, which is characterized in that described device includes:
First acquisition unit, for obtaining write operation requests, the write operation requests include write-in data;
Cache unit, for when the size of said write data be less than or equal to first threshold when, by said write data buffer storage Unit is write with a brush dipped in Chinese ink into memory;
Writing unit, for when the memory space for writing with a brush dipped in Chinese ink unit write full data or it is described write with a brush dipped in Chinese ink unit write-in data when Between when reaching second threshold, unit is write with a brush dipped in Chinese ink described in control, and that the Data Migration write with a brush dipped in Chinese ink in unit write with a brush dipped in Chinese ink unit described in is corresponding Disk storage space in.
7. device according to claim 6, which is characterized in that the write operation requests further include write-in logical address, institute State device further include:
First determination unit, in the storage location write with a brush dipped in Chinese ink in unit and described writing with a brush dipped in Chinese ink list according to said write data Position of the corresponding disk storage space of member in total disk storage space, determines the write-in physical address of said write data;
Storage unit, for the corresponding relationship of said write logical address and said write physical address to be saved in logical address With physical address mapping table.
8. device according to claim 7, which is characterized in that described device further include:
Second acquisition request, for obtaining read operation request, the read operation request includes reading logical address;
Second determination unit determines the reading logical address pair for searching the logical address and physical address mapping table The reading physical address answered;
Reading unit, for reading data from the corresponding disk storage space of the reading physical address.
9. device according to claim 6, which is characterized in that the cache unit, comprising:
Subelement is searched, for when the size of said write data is less than or equal to first threshold, each brush in memory The size for being greater than or equal to said write data there are residual memory space is searched whether in r/w cell writes with a brush dipped in Chinese ink unit;
First caching subelement, the size for any residual memory space to be greater than or equal to said write data write with a brush dipped in Chinese ink list Member is determined as target and writes with a brush dipped in Chinese ink unit, and said write data buffer storage is write with a brush dipped in Chinese ink unit to the target;
Second caching subelement, the residual memory space for that each ought write with a brush dipped in Chinese ink unit are respectively less than the size of said write data, Said write data are divided into n part by the residual memory space for writing with a brush dipped in Chinese ink unit according to n, by every partial write after division Data buffer storage writes with a brush dipped in Chinese ink unit to corresponding, and n is the integer more than or equal to 2.
10. according to device described in claim 6-9 any one, which is characterized in that described device further include:
Division unit each writes with a brush dipped in Chinese ink the corresponding disk storage space of unit for dividing in advance.
CN201910810187.4A 2019-08-29 2019-08-29 A kind of disk access method and device Withdrawn CN110515562A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910810187.4A CN110515562A (en) 2019-08-29 2019-08-29 A kind of disk access method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910810187.4A CN110515562A (en) 2019-08-29 2019-08-29 A kind of disk access method and device

Publications (1)

Publication Number Publication Date
CN110515562A true CN110515562A (en) 2019-11-29

Family

ID=68628081

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910810187.4A Withdrawn CN110515562A (en) 2019-08-29 2019-08-29 A kind of disk access method and device

Country Status (1)

Country Link
CN (1) CN110515562A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110888606A (en) * 2019-12-23 2020-03-17 潍柴动力股份有限公司 Flash system and engine
CN113741820A (en) * 2021-09-18 2021-12-03 青岛海信传媒网络技术有限公司 Method for refreshing data from memory to eMMC memory and display equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110888606A (en) * 2019-12-23 2020-03-17 潍柴动力股份有限公司 Flash system and engine
CN113741820A (en) * 2021-09-18 2021-12-03 青岛海信传媒网络技术有限公司 Method for refreshing data from memory to eMMC memory and display equipment
CN113741820B (en) * 2021-09-18 2023-10-03 青岛海信传媒网络技术有限公司 Method for refreshing data from memory to eMMC memory and display device

Similar Documents

Publication Publication Date Title
US11789860B2 (en) Logical to physical mapping management using low-latency non-volatile memory
US20120158674A1 (en) Indexing for deduplication
US10061704B2 (en) Systems and methods for managing cache of a data storage device
US9507705B2 (en) Write cache sorting
US8621134B2 (en) Storage tiering with minimal use of DRAM memory for header overhead
CN106970765B (en) Data storage method and device
CN103399823B (en) The storage means of business datum, equipment and system
CN103761053A (en) Data and method for data processing
CN104616680A (en) Repeating data deleting system based on optical disc storage as well as data operating method and device
US20200341684A1 (en) Managing a raid group that uses storage devices of different types that provide different data storage characteristics
US20240143219A1 (en) Software-hardware combination method for internal mapping address query of zoned namespace
CN111124258B (en) Data storage method, device and equipment of full flash memory array and readable storage medium
CN103677670A (en) Method and device for reading data
CN110515562A (en) A kind of disk access method and device
CN114356246B (en) Storage management method and device for SSD internal data, storage medium and SSD device
CN106844229B (en) Organization method, system and device of solid state disk firmware mapping table
CN104408126B (en) A kind of persistence wiring method of database, device and system
CN112347044B (en) Object storage optimization method based on SPDK
CN114036079A (en) Mapping table compression method and system, memory controller, solid state disk and data reading method
CN108334457B (en) IO processing method and device
KR20220119348A (en) Snapshot management in partitioned storage
CN114625318A (en) Data writing method, device and equipment applied to solid state disk
CN112559384B (en) Dynamic partitioning method for hybrid solid-state disk based on nonvolatile memory
CN110795034B (en) Data migration method, device and equipment of storage system and readable storage medium
CN111813327B (en) Memory system, memory controller and method for detecting half match

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20191129