CN102521156A - Mapping relation access method and mapping relation access device - Google Patents
Mapping relation access method and mapping relation access device Download PDFInfo
- Publication number
- CN102521156A CN102521156A CN2011104127614A CN201110412761A CN102521156A CN 102521156 A CN102521156 A CN 102521156A CN 2011104127614 A CN2011104127614 A CN 2011104127614A CN 201110412761 A CN201110412761 A CN 201110412761A CN 102521156 A CN102521156 A CN 102521156A
- Authority
- CN
- China
- Prior art keywords
- mapping relations
- extent
- data
- memory pool
- cached
- 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.)
- Pending
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
The invention discloses a mapping relation access method and a mapping relation access device. The method includes the steps: storing an address search list in a magnetic disk, wherein the address search list stores mapping relations among all source volume addresses and corresponding resource volume addresses, and dividing each N continuous mapping relation into extent_data, wherein the N is a positive integer larger than 1; and when an optional mapping relation X needs to be accessed, determining whether the mapping relation X is cached to a preset memory pool, and caching the extent_data of the mapping relation X to the memory pool if the mapping relation X is not cached to the preset memory pool. By the aid of application of the scheme, memory space can be better saved.
Description
Technical field
The present invention relates to data processing technique, particularly a kind of mapping relations access method and device.
Background technology
In digital Age, the key business data of electronization storage is growing, when situation such as generation corrupted data or user misoperation, must simply recover fast, and snapshot (Snapshot) technology promptly provides solution for this reason.
Storage networking industry association (SNIA; Storage Networking Industry Association) definition to snapshot is: about a complete usable copy of named aggregate, this copy comprises the mirror image of corresponding data at certain time point (i.e. the time point of copy beginning).
Specifically; Can set up snapshot according to writing copy modes such as (Copy on Write), comprise: at every turn when receiving write operation, when promptly the data of source book will be changed; Copy the raw data before changing to other place, be the resource volume that source book is set up a correspondence.
Like this, if receive a large amount of write operations, will produce a lot of resource volumes, follow-up for ease searching needs to set up and preserve the mapping relations between source book address and the resource volume address, and said mapping relations are commonly referred to metadata.
In the prior art, source book, resource volume and mapping relations etc. all can be kept in the disk, when opening of device, can all mapping relations all be cached in the internal memory, so that subsequent access like this, can take a large amount of memory headrooms undoubtedly.
Summary of the invention
In view of this, the invention provides a kind of mapping relations access method and device, can save memory headroom.
For achieving the above object, technical scheme of the present invention is achieved in that
A kind of mapping relations access method comprises:
In disk, preserve an address search table; Preserve all source book addresses in the said address search table and roll up the mapping relations between the address with corresponding resource; And, every N continuous mapping relations are divided into an extent_data, N is the positive integer greater than 1;
When needs are visited arbitrary mapping relations X, confirm whether said mapping relations X has been cached in the memory pool that is provided with in advance, if not, then the extent_data with said mapping relations X place is cached in the said memory pool.
A kind of mapping relations access means comprises: disk, internal memory and control module have marked off a memory pool in advance in the said internal memory;
Said control module; Be used for preserving an address search table at said disk; Preserve all source book addresses in the said address search table and roll up the mapping relations between the address with corresponding resource; And, every N continuous mapping relations are divided into an extent_data, N is the positive integer greater than 1; When needs are visited arbitrary mapping relations X, confirm whether said mapping relations X has been cached in the said memory pool, if not, then the extent_data with said mapping relations X place is cached in the said memory pool.
It is thus clear that; Adopt technical scheme of the present invention, need not all mapping relations all be cached in the internal memory, but when a certain mapping relations of needs visit; Just can the extent_data at this mapping relations place be cached in the internal memory, thereby save memory headroom preferably.
Description of drawings
Fig. 1 is the process flow diagram of the inventive method embodiment.
The content synoptic diagram of Fig. 2 for preserving in disk of the present invention and the memory pool.
Fig. 3 is the composition structural representation of apparatus of the present invention embodiment.
Embodiment
To the problem that exists in the prior art, the mapping relations access scheme among the present invention after a kind of improvement of proposition can be saved memory headroom.
For make technical scheme of the present invention clearer, understand, below with reference to the accompanying drawing embodiment that develops simultaneously, scheme according to the invention is done to specify further.
Fig. 1 is the process flow diagram of the inventive method embodiment.As shown in Figure 1, may further comprise the steps:
Step 11: in disk, preserve an address search table; Preserve all source book addresses in this address search table and roll up the mapping relations between the address with corresponding resource; And, every N continuous mapping relations are divided into an extent_data, N is the positive integer greater than 1.
In this step; Utilize the address search table to preserve all source book addresses and roll up the corresponding relation between the address with corresponding resource; If a source book does not have corresponding resource volume; Promptly do not carry out operations such as Copy on Write, then corresponding resource volume address, this source book address will be illegal value in the address search table.
And, every N in the address search table continuous mapping relations are divided into an extent_data, the concrete value of N can be decided according to the actual requirements, and each extent_data is as a base unit that reads into memory; Distinguishingly, for last extent_data in the address search table, comprising the mapping relations number can be less than N.
Illustrate:
Suppose to comprise altogether in the look-up table of address 11 mapping relations; So, can the 1st~3 mapping relations be divided into an extent_data, the 4th~6 mapping relations are divided into an extent_data; The 7th~9 mapping relations are divided into an extent_data; Like this, will only be left 2 mapping relations, and these 2 mapping relations will be divided into an extent_data get final product.
Step 12: when needs are visited arbitrary mapping relations X (for ease of statement; Represent arbitrary mapping relations with mapping relations X) time; Confirm whether mapping relations X has been cached in the memory pool that is provided with in advance, if not, then the extent_data with mapping relations X place is cached in the memory pool.
As a rule, each extent_data's is big or small identical, can in internal memory, mark off a memory pool in advance; The big I of memory pool is decided according to the actual requirements, and the size of memory block wherein is big or small identical with extent_data's, promptly distributes the memory block of extent_data size at every turn; Starting stage; Save as sky in the memory pool, follow-up, can be constantly the buffer memory extent_data that comes in.
Specifically, when the user need visit arbitrary mapping relations X, can confirm at first whether mapping relations X has been cached in the memory pool; If; Then carry out subsequent treatment according to existing mode, if not, then the extent_data with mapping relations X place is cached in the memory pool; The extent_data that is mapping relations X place distributes a untapped memory block, and the extent_data with mapping relations X place is cached in the memory block that is distributed then.
Because the space in the memory pool is limited, in a certain moment, its space may run out; Therefore, in this step, before the extent_data with mapping relations X place is cached in the memory pool; Can at first confirm the remaining space extent_data whether enough buffer memory mapping relations X belong in the memory pool; If then the extent_data with mapping relations X place is cached in the memory pool, if not; Then from memory pool, delete an extent_data of buffer memory, the extent_data with mapping relations X place is cached in the memory pool then.
In practical application; Can adopt least recently used (LRU; Least Recently Used) algorithm is selected an extent_data of buffer memory from memory pool, and deletion, as the last access time is deleted from memory pool apart from current time extent_data farthest.
The content synoptic diagram of Fig. 2 for preserving in disk of the present invention and the memory pool.As shown in Figure 2, be the management that unit carries out mapping relations with extent_data in the memory pool.
So far, promptly accomplished introduction about the inventive method embodiment.
Based on above-mentioned introduction, Fig. 3 is the composition structural representation of apparatus of the present invention embodiment.As shown in Figure 3, comprising: disk, internal memory and control module wherein, have marked off a memory pool in advance in the internal memory;
Control module; Be used for preserving an address search table, preserve all source book addresses in this address search table and roll up the mapping relations between the address with corresponding resource at disk, and; Every N continuous mapping relations are divided into an extent_data, and N is the positive integer greater than 1; When needs are visited arbitrary mapping relations X, confirm whether mapping relations X has been cached in the memory pool, if not, then the extent_data with mapping relations X place is cached in the memory pool.
If a source book does not have corresponding resource volume, then corresponding resource volume address, this source book address is an illegal value in the address search table.
Above-mentioned control module also can be further used for; Before the extent_data with mapping relations X place is cached in the memory pool, confirm the remaining space extent_data whether enough buffer memory mapping relations X belong in the memory pool, if; Then the extent_data with mapping relations X place is cached in the memory pool; If not, then from memory pool, delete an extent_data of buffer memory, the extent_data with mapping relations X place is cached in the memory pool then; Wherein, can adopt lru algorithm from memory pool, to select an extent_data of buffer memory, and deletion.
Device shown in Figure 3 is generally equipment such as computer, in actual applications, except that shown in Figure 3, also can further comprise some other parts, owing to do not have direct relation with scheme according to the invention, so do not introduce.
The concrete workflow of device embodiment shown in Figure 3 repeats no more please with reference to the respective description among the method embodiment shown in Figure 1 here.
In a word, adopt technical scheme of the present invention, can save memory headroom preferably; And, owing to adopted lru algorithm to manage, therefore can improve the hit rate of the mapping relations of institute's buffer memory to coming the extent_data in the memory pool.
The above is merely preferred embodiment of the present invention, and is in order to restriction the present invention, not all within spirit of the present invention and principle, any modification of being made, is equal to replacement, improvement etc., all should be included within the scope that the present invention protects.
Claims (8)
1. a mapping relations access method is characterized in that, comprising:
In disk, preserve an address search table; Preserve all source book addresses in the said address search table and roll up the mapping relations between the address with corresponding resource; And, every N continuous mapping relations are divided into an extent_data, N is the positive integer greater than 1;
When needs are visited arbitrary mapping relations X, confirm whether said mapping relations X has been cached in the memory pool that is provided with in advance, if not, then the extent_data with said mapping relations X place is cached in the said memory pool.
2. method according to claim 1 is characterized in that, if a source book does not have corresponding resource volume, then corresponding resource volume address, this source book address is an illegal value in said address search table.
3. method according to claim 1 and 2 is characterized in that, said extent_data with said mapping relations X place is cached in the said memory pool and comprises:
Confirm the remaining space the extent_data whether said mapping relations X of enough buffer memorys belongs in the said memory pool;
If then the extent_data with said mapping relations X place is cached in the said memory pool;
If not, then from said memory pool, delete an extent_data of buffer memory, the extent_data with said mapping relations X place is cached in the said memory pool then.
4. method according to claim 3 is characterized in that, said from said memory pool the deletion one the extent_data of buffer memory comprise:
Adopt least recently used lru algorithm from said memory pool, to select an extent_data of buffer memory, and deletion.
5. a mapping relations access means is characterized in that, comprising: disk, internal memory and control module have marked off a memory pool in advance in the said internal memory;
Said control module; Be used for preserving an address search table at said disk; Preserve all source book addresses in the said address search table and roll up the mapping relations between the address with corresponding resource; And, every N continuous mapping relations are divided into an extent_data, N is the positive integer greater than 1; When needs are visited arbitrary mapping relations X, confirm whether said mapping relations X has been cached in the said memory pool, if not, then the extent_data with said mapping relations X place is cached in the said memory pool.
6. based on the described device of claim 5, it is characterized in that if a source book does not have corresponding resource volume, then corresponding resource volume address, this source book address is an illegal value in said address search table.
7. according to claim 5 or 6 described devices; It is characterized in that said control module is further used for, before the extent_data with said mapping relations X place is cached in the said memory pool; Confirm the remaining space the extent_data whether said mapping relations X of enough buffer memorys belongs in the said memory pool; If then the extent_data with said mapping relations X place is cached in the said memory pool, if not; Then from said memory pool, delete an extent_data of buffer memory, the extent_data with said mapping relations X place is cached in the said memory pool then.
8. device according to claim 7 is characterized in that, said control module adopts least recently used lru algorithm from said memory pool, to select an extent_data of buffer memory, and deletion.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011104127614A CN102521156A (en) | 2011-12-12 | 2011-12-12 | Mapping relation access method and mapping relation access device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011104127614A CN102521156A (en) | 2011-12-12 | 2011-12-12 | Mapping relation access method and mapping relation access device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102521156A true CN102521156A (en) | 2012-06-27 |
Family
ID=46292085
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2011104127614A Pending CN102521156A (en) | 2011-12-12 | 2011-12-12 | Mapping relation access method and mapping relation access device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102521156A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102981963A (en) * | 2012-10-30 | 2013-03-20 | 华中科技大学 | Implementation method for flash translation layer of solid-state disc |
CN104063328A (en) * | 2014-04-04 | 2014-09-24 | 浪潮电子信息产业股份有限公司 | Memory management method for alleviating fragment generation |
CN104598293A (en) * | 2015-01-06 | 2015-05-06 | 杭州华三通信技术有限公司 | Online snapshot method and equipment |
CN103970674B (en) * | 2013-01-30 | 2017-04-05 | 安凯(广州)微电子技术有限公司 | A kind of physical block wiring method and system |
CN108282550A (en) * | 2018-02-02 | 2018-07-13 | 北京控制工程研究所 | A kind of 1553B buses far set null terminator Null address search table auto-allocation method and system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060236047A1 (en) * | 2005-04-18 | 2006-10-19 | Hidehisa Shitomi | Method for replicating snapshot volumes between storage systems |
CN101093459A (en) * | 2007-07-18 | 2007-12-26 | 华为技术有限公司 | Method and device for protecting snapshot |
CN101788934A (en) * | 2009-01-23 | 2010-07-28 | 英业达集团(天津)电子技术有限公司 | Data manipulation method of logical volume manager |
CN101833519A (en) * | 2009-03-12 | 2010-09-15 | 安凯(广州)软件技术有限公司 | Method for reducing address mapping table resident memory in storage technical equipment |
CN102043721A (en) * | 2010-05-12 | 2011-05-04 | 中颖电子股份有限公司 | Memory management method for flash memory |
-
2011
- 2011-12-12 CN CN2011104127614A patent/CN102521156A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060236047A1 (en) * | 2005-04-18 | 2006-10-19 | Hidehisa Shitomi | Method for replicating snapshot volumes between storage systems |
CN101093459A (en) * | 2007-07-18 | 2007-12-26 | 华为技术有限公司 | Method and device for protecting snapshot |
CN101788934A (en) * | 2009-01-23 | 2010-07-28 | 英业达集团(天津)电子技术有限公司 | Data manipulation method of logical volume manager |
CN101833519A (en) * | 2009-03-12 | 2010-09-15 | 安凯(广州)软件技术有限公司 | Method for reducing address mapping table resident memory in storage technical equipment |
CN102043721A (en) * | 2010-05-12 | 2011-05-04 | 中颖电子股份有限公司 | Memory management method for flash memory |
Non-Patent Citations (1)
Title |
---|
ZHIWEI QIN,ET.AT ALL: "《IEEE Real-Time and Embedded Technology and Applications Symposium》", 14 April 2011, article "A two-level caching mechanism for demand-based page-level address mapping in NAND flash memory storage systems", pages: 157-166 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102981963A (en) * | 2012-10-30 | 2013-03-20 | 华中科技大学 | Implementation method for flash translation layer of solid-state disc |
CN102981963B (en) * | 2012-10-30 | 2015-12-02 | 华中科技大学 | A kind of implementation method of flash translation layer (FTL) of solid-state disk |
CN103970674B (en) * | 2013-01-30 | 2017-04-05 | 安凯(广州)微电子技术有限公司 | A kind of physical block wiring method and system |
CN104063328A (en) * | 2014-04-04 | 2014-09-24 | 浪潮电子信息产业股份有限公司 | Memory management method for alleviating fragment generation |
CN104598293A (en) * | 2015-01-06 | 2015-05-06 | 杭州华三通信技术有限公司 | Online snapshot method and equipment |
CN104598293B (en) * | 2015-01-06 | 2018-04-06 | 新华三技术有限公司 | A kind of method and apparatus of online snapshot |
CN108282550A (en) * | 2018-02-02 | 2018-07-13 | 北京控制工程研究所 | A kind of 1553B buses far set null terminator Null address search table auto-allocation method and system |
CN108282550B (en) * | 2018-02-02 | 2021-03-26 | 北京控制工程研究所 | Automatic allocation method and system for 1553B bus remote terminal sub-address lookup table |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9996466B2 (en) | Apparatus, system and method for caching compressed data | |
CN105205009B (en) | A kind of address mapping method and device based on large capacity solid-state storage | |
CN102541927B (en) | Method and device for realizing data cache | |
US9921955B1 (en) | Flash write amplification reduction | |
CN101526923B (en) | Data processing method, device thereof and flash-memory storage system | |
US8799601B1 (en) | Techniques for managing deduplication based on recently written extents | |
US8972690B2 (en) | Methods and apparatuses for usage based allocation block size tuning | |
US10628303B2 (en) | Storage device that maintains a plurality of layers of address mapping | |
US20170177497A1 (en) | Compressed caching of a logical-to-physical address table for nand-type flash memory | |
US20120096225A1 (en) | Dynamic cache configuration using separate read and write caches | |
CN102799534A (en) | Storage system and method based on solid state medium and cold-hot data identification method | |
CN103838853B (en) | Mixed file system based on different storage media | |
KR102437775B1 (en) | Page cache device and method for efficient mapping | |
US11314689B2 (en) | Method, apparatus, and computer program product for indexing a file | |
KR20160105624A (en) | Data processing system and operating method thereof | |
JP2021501389A (en) | Data hierarchy storage and hierarchy search method and device | |
TW200725298A (en) | System and method for storage management | |
EP3276494B1 (en) | Memory space management | |
CN102521156A (en) | Mapping relation access method and mapping relation access device | |
CN107438837A (en) | Data high-speed caches | |
US10515055B2 (en) | Mapping logical identifiers using multiple identifier spaces | |
CN106649146A (en) | Memory release method and apparatus | |
CN108664577B (en) | File management method and system based on FLASH idle area | |
KR20170099351A (en) | System and methods for providing fast cacheable access to a key-value device through a filesystem interface | |
CN102355495A (en) | Data processing method, device and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20120627 |