CN102713826B - Methods and apparatuses to allocate file storage via tree representations of a bitmap - Google Patents
Methods and apparatuses to allocate file storage via tree representations of a bitmap Download PDFInfo
- Publication number
- CN102713826B CN102713826B CN201080058365.XA CN201080058365A CN102713826B CN 102713826 B CN102713826 B CN 102713826B CN 201080058365 A CN201080058365 A CN 201080058365A CN 102713826 B CN102713826 B CN 102713826B
- Authority
- CN
- China
- Prior art keywords
- bitmap
- tree
- tree representation
- node
- block
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/0643—Management of files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0608—Saving storage space on storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0626—Reducing size or complexity of storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0629—Configuration or reconfiguration of storage systems
- G06F3/0631—Configuration or reconfiguration of storage systems by allocating resources to storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0683—Plurality of storage devices
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)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Methods and apparatuses that search tree representations of a bitmap for available blocks to allocate in storage devices are described. An allocation request for a file may be received to initiate the search. In one embodiment, the bitmap may include an array of bits corresponding to blocks in the storage devices. Each bit may indicate whether one of the blocks is available. The tree representations may include at least one red-black tree having nodes corresponding to one or more consecutive bits in the bitmap indicating an extent of available blocks. One of the tree representations may be selected according to a file associated with an allocation request to identify an extent of available block matching the allocation request. The tree representations may be synchronized as the bitmap is updated with changes of block allocations in the storage devices.
Description
Technical field
The present invention relates generally to file system.More specifically, the present invention relates to based on bitmap is block in file allocation memory storage.
Background technology
A major requirement of file system is the tracking of the available free space kept in units of block memory storage.Traditionally, file system can use bitmap to represent free space.Bitmap is the array of position simply, wherein, the N number of N number of block of instruction be distributed or the free time.Therefore, the expense (overhead) of bitmap can be relatively low, such as, for the situation of the block 1 of every 4K size, is about 0.003%.For the file system of 1GB, the size of corresponding bitmap is about 32KB, and this easily can adapt to storer, to carry out rapid scanning to identify free space.
But, when the size of file system continues to increase quickly than the growth of memory size, to be carried in file system for the bitmap that scans in size or may become important in the time.Such as, the storer on most of data handling system or processor may be not suitable with for the 32GB size bitmap of 1PB file system.As a result, sweep bitmap may need from dish, to read bitmap (such as, the page of dish enters to go out with page) at every turn, significantly can reduce the speed of file system like this.
In addition, large scale bitmap to be loaded in storer can directly and other kernel tasks compete limited resources available in data handling system.Such as, if bitmap can not by total caching, then may need to manage paging activity with multiple buffer zone.Because each buffer zone needs one in the buffer zone head of the limited quantity in distribution system, can further deteriorating process performance so load large scale bitmap.
Therefore, use bitmap in the storage device the traditional file systems of allocation of free space and the growth of modern file system inharmonious.
Summary of the invention
Embodiments of the invention can comprise the method and apparatus that the tree representation (such as, RBTree) searching for bitmap finds available block to be allocated in memory storage.The distribution request for file can be received, to start search.In one embodiment, bitmap can comprise the array of the position corresponding with the block in memory storage.Whether each position can indicate one of block can use.Tree representation can comprise at least one RBTree (red-black tree) with node, and described node corresponds in bitmap the one or more continuous position indicating available area block scope (such as, comprising skew and length).Based on the essence of the distribution request for given file (such as, allocated size request, whether there is this file etc.), a tree representation can be selected.When bitmap is updated along with the change of the block distribution in memory storage, tree representation can by synchronously.
In alternative embodiments, in maintenance position tree and range tree in storer (such as, RAM), to represent the bitmap in memory storage (such as, hard disk), thus the distribution state of block in memory storage can be indicated.Location tree can be position according to available block scope and arrange the RBTree of key assignments.Range tree can be size according to available block scope and arrange the RBTree of key assignments.One or more nodes of recognizing site tree and/or range tree can be carried out: search for the tree of specifying and find the unallocated space scope with the matches criteria based on the distribution request for file based on following search.If location tree and/or range tree do not comprise the matched node meeting search criterion, then bitmap can be traveled through.Can by traversal bitmap and the node inserting the unassigned zone in indicating panel space builds location tree and range tree.
Embodiment with reference to the accompanying drawings and below, further feature of the present invention will be apparent.
Accompanying drawing explanation
In the figure of accompanying drawing, by way of example and unrestriced mode illustrates the present invention, in the accompanying drawings, similar Reference numeral indicates similar element, and wherein:
Fig. 1 illustrates that tree representation for searching for bitmap is to distribute the block diagram of an embodiment of the system of block;
Fig. 2 is the sample drawing of the exemplary RBTree illustrated for representing bitmap;
Fig. 3 is the process flow diagram that the embodiment identifying the process for the available block distributed when not searching for bitmap is shown;
Fig. 4 illustrates that the tree representation of search bitmap is to carry out the process flow diagram of an embodiment of the process of block distribution;
Fig. 5 illustrates an example of the data handling system of the such as computer system and so on that can be combined with embodiment described herein.
Embodiment
This document describes the method and apparatus for distributing block based on the tree representation of bitmap.In the following description, set forth numerous detail, to provide the thorough explanation to the embodiment of the present invention.But, it will be apparent to one skilled in the art that and can put into practice embodiments of the invention when there is no these details.Under other circumstances, in order to not fuzzy understanding of this description, be not shown specifically assembly, structure and the technology known.
Mention that special characteristic, structure or characteristic that " embodiment " or " embodiment " mean to describe in conjunction with this embodiment can comprise at least one embodiment of the present invention in the description.The phrase " in one embodiment " that instructions occurs everywhere differs to establish a capital and refers to same embodiment.
Those process shown in the following drawings be by comprising hardware (such as, circuit, special logic etc.), the processing logic of software (software such as, general-purpose computing system or custom-built machine run) or the combination of both performs.Although these process following be according to some order operation describe, should be appreciated that, some in the operation described can perform by different order.In addition, certain operations can walk abreast and non-sequentially execution.
In one embodiment, storer (such as, the primary memory of such as DRAM and so on) at least two RBTrees be used to indicate bitmap in dish (or other mass storage device of such as flash memory, hard disk driver etc.), bitmap maps block distribution state in file system.High-level structure in bitmap between each can be described clearly in the tree representation (or tree construction) of bitmap.Such as, the fragment not using block from 200 of the BOB(beginning of block) of the 10th bitmap easily can be identified in the tree node comprising migration parameter 10 and size parameter 200.Therefore, the perfect matching for distributing 200 blocks (such as, for huge movie file) can be found based on effective RBTree search in the time frame of bounded.
In one embodiment, represent that point other RBTree of bitmap enablely can search for optimal allocation with different search criterions.Such as, in order to locate for adding (append) to fragment of the continuous block of file, the location-based tree representation can searching for bitmap finds the unallocated block near assigned address.Alternately, in order to locate the large block space for new file, the tree representation based on size can searching for bitmap finds the continuous block scope for this large block space.
If search can not recognize perfect matching, in one embodiment, can perform to identical tree or different trees the second search using different search criterion.Such as, if can not be mated for the location-based tree of bulk space search, then can perform subsequent searches to identify one or more block fragment based on required size (the smallest region number of blocks of the required size of accommodation of such as, having the ability).
In one embodiment, another search can be performed according to the search criterion based on the neighbouring position of existing distribution block locations within configured threshold (such as, 4 blocks) relative to file.Search criterion can comprise and to be positioned near file and for the minimum number of blocks of available block scope enough large required size for identifying.The result of repeatedly searching for can be incorporated into the best block of coming together to obtain making dish fragment minimum and distribute.
In certain embodiments, the one or more RBTrees of bitmap for keeping in indicating panel of safeguarding in storer can being built according to inertia mechanism (lazymechanism) as required, storing to save and/or assignment response is faster provided.Therefore, when file system performs the operation of distribution/release storage space, each tree can incrementally increase thereupon.When tree is completely filled, this tree can bitmap intactly in indicating panel.
In one embodiment, can build RBTree, and can not cause extra cost, make upon power-up of the system between the system starting period, bitmap represents and can be loaded in storer.Usually, the tree representation of bitmap can be kept in memory, and is not stored in dish.Bitmap in dish can perform the renewal of the tree representation to bitmap before or after changing in file system.
Fig. 1 illustrates that tree representation for searching for bitmap is to distribute the block diagram of an embodiment of the system of block.In one embodiment, system 100 can comprise the computer operation environment 105 of the file system 107 had in an operating system.Memory device 101 can be one or more memory storages that Local or Remote is coupled to system 101, such as hard disk, flash memory or other large-capacity storage media.In one embodiment, the file in system 100 can be stored in memory device 101 in the one or more blocks distributed.Memory device 101 can comprise bitmap 103, this bitmap use position represent each distributed block availability (such as, use 0/1 as state value indicate block be idle/ distribute).
In one embodiment, file system 107 can comprise interface module 119, and this interface module is used for such as via API(application programming interface) receive file access (read/write) request from program 121 during operation.Document management module 117 for the file access request received, can determine file access operation, such as file reading, file write, document creation, file erase etc.Such as, document management module 117 can send storage allocation request to panel block distribution module 115, to create the data of new file and/or storage/updating file.
In one embodiment, the storage that file system 107 can comprise for bitmap 103 represents that the one or more bitmaps represented that store in (as location tree 111 or range tree (extent tree) 113) represent 109.Store eachly to may correspond in bitmap 103 at least partially in representing.Such as, each node in location tree 111 and/or range tree 113 can comprise the position corresponding with being shown as available one or more continuous block (or scope) in Figure 103 in place and/or size information.
In one embodiment, bitmap represents that administration module 123 synchronously can build with the bitmap 103 in memory device 101 and/or bitmap in maintenance memory represents 109.Such as, when direct Figure 103 in place performing search, bitmap represents that administration module 123 can access a part for loading bitmap 103 in memory.Alternately, when bitmap 103 is updated, bitmap represents that administration module 123 can receive update notification.
File system 107 can comprise panel block distribution module 115, in not accessing storage device 101 bitmap 103, represent that 109 carry out block in memory allocated equipment 101 for storage file content according to bitmap.Which block is panel block distribution module 115 can be available in determining storage equipment 103, and such as in response to the distribution request for file, selects the large one or more available block that must be enough to hold data volume to be stored.In one embodiment, panel block distribution module 115 bitmap can accessed in storer represents the one or more tree in 109 and/or the bitmap 103 in memory device 101, to identify available block to be allocated.
Such as, in response to distribution request, according to one or more characteristics of such as described request, such as whether exist and the file of asking to be associated, panel block distribution module 115 can dynamically determine search bit figure represent in 109 each tree with identifies for distribution available block order (such as, existing file is write, from location tree 111) for by data.Panel block distribution module 115 can where necessary (such as, if represent that 109 do not find expectation block via bitmap), direct search bitmap 103.
In one embodiment, bitmap represents that administration module 123 can build bitmap and represent 109 while panel block distribution module 115 accesses bitmap 103.Such as, a part for bitmap 103 can be loaded in storer by panel block distribution module 115, carries out block distribution or search for available block to be allocated with updated space Figure 103.Bitmap represents that administration module 123 can be structured in bitmap and represent in 109, and wherein, the block distribution state from a part for bitmap 103 has loaded in memory.In one embodiment, panel block distribution module 115 can represent when administration module 123 is accessed bitmap 103 and represented 109 to upgrade and/or to build bitmap by decision bits figure.
Fig. 2 is the sample drawing of the exemplary RBTree illustrated for representing bitmap.Example 200 can based on the file system as in the system 100 of figure 1, and the one or more tree of this file system maintenance represents the bitmap of the block for allocate file storage space.In one embodiment, bitmap 201 can comprise the bit array of the distribution state being used to indicate block in memory storage, the bitmap 103 as in the memory device 101 of Fig. 1.Whether each position can indicate corresponding block can use.Such as, for occupied block, position 207 can have value 0.
In one embodiment, location tree 203 and range tree 205 can store in memory, and the bitmap as Fig. 1 represents in 109, for representing the part of bitmap 201.Tree 203,205 can based on the self-equilibrating binary search tree as bottom data structure, to allow to carry out effective renewal rewards theory to tree, e.g., and search, deletion, insertion etc.Such as, setting 203,205 can be use RBTree renewal rewards theory to guarantee to set the RBTree reaching appropriate balance.
Location tree 203 can based on RBTree structure (or tree representation) by representing that the node of available block indicated in bitmap 201 is formed, and wherein RBTree structure (or tree representation) comprises the key assignments (key) of node.In one embodiment, according to the reference position of continuous available block or available block scope, the key assignments of setting position tree 203 can be carried out.Such as, node 209 can comprise position key assignments 3, and position key assignments 3 corresponds to the position of the starting block (such as being represented by position 207) of 5 available continuous blocks (such as by the bit representation of 5 between position 207 and position 213).Node 209 can comprise the size key assignments of instruction continuum block size.
In one embodiment, range tree 205 can be formed based on the node of RBTree structure by the available block representing instruction in bitmap 201, wherein uses the size of continuous available block as key assignments.Such as, node 211 can comprise size key assignments 5, and it corresponds to 5 continuous available blocks (such as, with the bit representation of 5 between position 207 and position 213).Node 211 can comprise position key assignments (such as, 3), for representing position 207(the 3rd position with bitmap 201) corresponding starting block.
Fig. 3 is the process flow diagram that the embodiment identifying the process for the available block distributed when not searching for bitmap is shown.Exemplary process 300 can by hardware (circuit, special logic etc.) can be comprised, the processing logic of software (software such as run on special machine) or the combination of both performs.Such as, process 300 can be performed by some assemblies of the system 100 of Fig. 1.In square frame 301, the processing logic of process 300 can build one or more tree representation, in memory as the tree 111,113 of Fig. 1, to represent the bitmap of the block distribution state safeguarded in storage system, as the bitmap 103 of Fig. 1.Such as, the processing logic of process 300 can start to build when system (e.g., the system 100 of Fig. 1) starts the tree representation of bitmap.Within the service time of operational system, the tree representation built in system can keep in memory.
In one embodiment, the processing logic of process 300 can load a part for large bitmap (such as, when compared with available memory resources), incrementally to build the tree representation of bitmap.In certain embodiments, a part of generation tree loading the bitmap of (such as, reading from the dish of storage bitmap) when the processing logic of process 300 can start for system represents.Tree representation can corresponding to a part for (or covering) bitmap.The processing logic of process 300 can keep the tracking to which part covering bitmap in tree representation.
The processing logic of process 300 can identify the scope of available block from bitmap.Each scope can correspond to two and distribute between block (such as, be the position of 1 based on value), that (such as, be the position of 0 based on value) indicates in bitmap maximum continuous available block (such as, it is defined by disabled two blocks).Scope can comprise the reference position indicated in bitmap, as the index of the position of the initial block of this scope.Alternately, scope can comprise the size of the number of blocks that expression such as this scope comprises.Node in the tree representation of bitmap can correspond to available block scope.
In one embodiment, when installation file system (such as, comprise set up file should where in directory tree occur) time, process 300 processing logic can from memory storage (as, the memory device 101 of Fig. 1) directly fetch the tree representation of the bitmap of file system, and (or scanning) bitmap need not be loaded to rebuild tree representation.If the file system of correspondence is mounted, then the tree representation of bitmap can be maintained in memory.In one embodiment, such as, file system after bitmap being scanned completely to the tree representation upgrading bitmap, when correspondence is unloaded (such as, be removed from operating system) time, tree representation can store or be written out in memory storage by the processing logic of process 300.If the bitmap represented by the available tree representation stored in memory storage is not also modified, then the processing logic processing 300 can be determined to skip the scanning completely to bitmap.Such as, the processing logic of process 300 can compare the timestamp of tree representation and the bitmap stored in memory storage, represents whether still represent this bitmap with decision tree.
In square frame 303, in one embodiment, the processing logic of process 300 can receive distribution request for file, the file write request of program 121 during operation such as from Fig. 1.Responsively, the processing logic of process 300 can select the tree representation of bitmap, with identify be best suited for the receptions available block of asking.Such as, process 300 processing logic can chosen position sets the location tree 113 in such as figure for the request for file allocation storage space already present in file system.Alternately, the processing logic of process 300 can be set by searching position, as the location tree 113 of Fig. 1, thinks new file allocation storage space.
In square frame 305, in one embodiment, the processing logic of process 300 can search for the selected tree representation of bitmap based on one or more search criterion, to identify for distributing request one or more available block to be allocated.In one embodiment, search criterion can comprise the consideration reducing fragment effect when memory allocated space (such as, block).
Such as, the processing logic of process 300 can perform RBTree search by control site tree, and to identify that coupling distributes the node of request, described distribution request specifies allocated size and/or the reference position of available block scope.In one embodiment, must be enough to hold the allocated size of asking and (such as, position-based key assignments) is positioned at reference position if the available block scope of correspondence (such as, based on size key assignments) is large, then the node in location tree can be the coupling of tree search.
Similarly, the processing logic of process 300 can contrast range tree and perform RBTree search, and to identify that coupling distributes the node of request, described distribution request specifies allocated size.Such as, search criterion can comprise the minimum number of blocks of the request dispatching size for holding.If the node in range tree corresponds to the available block scope of minimum number, then node can be the coupling of tree search.In certain embodiments, matched node can correspond to the large available block scope that must be enough to hold institute's request dispatching size of (such as, based on size key assignments) capacity.
In another embodiment, the processing logic of process 300 in response to the request distributing additional storage space for existing file, can start searching position tree.Process 300 processing logic can use search criterion to be positioned at last block distributed for this file to connect after available block scope.Alternately, the processing logic of process 300 can start hunting zone tree, supplies to create new file used with memory allocated space.The processing logic of process 300 can indicate search criterion, to identify the available block scope (such as, by the size of more available block scope and the size of the storage space of asking) of mating best with the request for new file.
If at tree searching period unidentified node to coupling from tree representation, then in one embodiment, the processing logic of process 300 can use approximate or different search criterion to continue to search for another tree representation.Alternately, if having matched multiple node at tree searching period, then the processing logic processing 300 can select a best node, such as to make the fragment in storage space minimum among the node of these couplings.In certain embodiments, such as, if fail to recognize the node of coupling at tree searching period, then the processing logic processing 300 can directly search also not with the bitmap part that tree representation in storer represents.Alternatively, the processing logic of process 300 can, based on the available block scope corresponding with the multiple nodes in the tree representation of bitmap, decide to distribute multiple block for distribution request, and these multiple blocks may not be positioned together all continuously.
In a block 307, process 300 processing logic can based on the result of the tree representation of bitmap in searching storage upgrade bitmap in memory allocated system (such as, for the memory storage of file system) identify block.The operation that the processing logic processing 300 can such as such as be searched for via what perform according to RBTree structure, insert and/or delete and so on, in square frame 309, tree representation in storer is synchronous with the bitmap after renewal.In other embodiments, the processing logic of process 300 can before upgrading the bitmap in storage system, more the tree representation of bitmap in new memory, with indicate the distribution of identification block.
Fig. 4 illustrates that the tree representation of search bitmap is to carry out the process flow diagram of an embodiment of the process of block distribution.Exemplary process 400 can by hardware (circuit, special logic etc.) can be comprised, the processing logic of software (software such as run on special machine) or the combination of both performs.Such as, process 400 can be performed by some assemblies of the system 100 of Fig. 1.In one embodiment, in square frame 401, the processing logic of process 400 can represent for the maintenance tree at least partially of the bitmap of the block distribution state in instruction storage system (memory device 101 in such as Fig. 1).Such as, whether each position in bitmap can indicate in the block represented by this bitmap corresponding block can use.
Tree representation can comprise such as location tree and range tree, the location tree 111 of such as Fig. 1 and range tree 113.Each tree representation can be the RBTree with the node corresponding with the available block scope in storage system.When a part for bitmap is loaded in memory, such as, upon power-up of the system, the processing logic processing 400 can travel through bitmap to build tree representation.Alternatively, the processing logic processing 400 such as can follow the trail of based on the index of bitmap meta which part having integrated with bitmap in safeguarded each tree representation.
In square frame 403, the processing logic of process 400 can receive for the distribution request for the amount of space in file or other system component memory allocated system.Responsively, in square frame 405, whether the processing logic of process 400 can be such as the block of file allocation based on existing within the storage system, judges whether distribute request will create new file.For existing file, in square frame 407, the processing logic of process 400 can perform RBTree search in location tree, identifies matched node with the position of the size based on asked allocation space and/or the existing block for file allocation.
If the capacity of the available block scope of correspondence is greater than asked and the size of allocation space after the block for file allocation connects, then matched node is perfect.In certain embodiments, the search criterion of matched node can locate the available block scope with the existing block close (such as within the block of a certain quantity) for file allocation.If have found matched node in square frame 409, then in square frame 425, the processing logic of process 400 can continue to come memory allocated space based on the useful block scope corresponding with matched node.Otherwise in one embodiment, in square frame 411, the processing logic of process 400 can continue hunting zone tree and find matched node.
In one embodiment, in response to the distribution request for new file, in square frame 411, the processing logic of process 400 can perform RBTree search, to identify one or more matched node based on the size of asked allocation space in range tree.If recognize more than one matched node at searching period, the processing logic then processing 400 can select best matched node (such as, having many closely couplings to correspond to space available in the scope of matched node according to the size of asked allocation space).In certain embodiments, the processing logic processing 400 can select first matched node at tree searching period.
If find matched node in square frame 413, then in square frame 425, the processing logic of process 400 can continue to distribute the block identified.Otherwise in square frame 415, whether the processing logic of process 400 can be merged into all block distribution state in bitmap by tree representation in determining storage device.Such as, the processing logic processing 400 can follow the trail of which part (such as, via the index of the position of position in bitmap) merged (or structure) of bitmap in tree representation.
If bitmap is not also fully constructed in tree representation, then in square frame 417, the processing logic of process 400 can directly travel through or search for bitmap, to identify that coupling distributes the available block scope of request.In one embodiment, the processing logic of process 400 can load also not capped in tree representation bitmap part, to search for the available block scope of coupling.This part of bitmap can be loaded according to the restriction of the size of free memory.In one embodiment, the processing logic of process 400 can search for the remainder of bitmap, such as, until recognize the available block scope of coupling.
While directly performing search (such as, carrying out linear search bit by bit) in bitmap, such as, in square frame 419, the processing logic of process 400 can continue the tree representation building bitmap with the loading section of bitmap, e.g., and location tree and range tree.If directly find the available block scope of one or more coupling from bitmap, then in 425, the processing logic of process 400 can continue to distribute block.
If do not find from the tree representation of bitmap and/or directly do not find matched node or available block scope from bitmap, then in square frame 423, the processing logic of process 400 can based on such as traveling through the tree representation of bitmap (such as, based on RBTree search) result and/or directly from bitmap, identify the one or more available block scope meeting and distribute request.The processing logic of process 400 can when consider such as make that fragment effect is minimum, space utilisation is the highest and/or finely tune other file system performance parameter, decide the best of breed for distributing request available block to be allocated.Subsequently, in square frame 425, the processing logic of process 400 can continue to distribute the available block identified.In one embodiment, in square frame 427, the processing logic of process 400 according to the distribution of identified block, can upgrade tree representation (e.g., location tree and/or range tree) and the bitmap itself of bitmap.
Fig. 5 illustrates an example of another data handling system (such as computer system) that can use together with one embodiment of the present of invention.Such as, system 500 may be implemented as a part for system shown in Figure 1.Note, although Fig. 5 illustrates the various assemblies of computer system, be not intended to represent any specific framework or assembly interconnect mode, because such details and the present invention there is no substantial connection.It is also understood that the present invention can also be used for having less assembly or may the more network computer of multicompartment and other data handling system.
As shown in Figure 5, the computer system 500 as data handling system form comprises bus 503, and this bus is couple to (one or more) microprocessor 505 and ROM(ROM (read-only memory)) 507 and volatibility RAM 509 and nonvolatile memory 511.Microprocessor 505 can be fetched instruction from storer 507,509,511 and perform these instructions, to perform aforesaid operations.Bus 503 by these various assembly interconnects together, and these assemblies 505,507,509 and 511 and display controller and display device 513 are interconnected and interconnect with the peripheral unit of such as I/O (I/O) device and so on, described I/O device can be mouse, keyboard, modulator-demodular unit, network interface, printer and other device well known in the art.Usually, input/output device 515 is couple to system by i/o controller 517.Volatibility RAM(random access memory) 509 be usually implemented as dynamic ram (DRAM), it, in order to refresh or keep the data in storer, needs continued power.
Even if mass-memory unit 511 normally magnetic hard-disk or Magneto Optical MO or CD-ROM drive or DVDRAM or flash memory or also keep the storage system of other type of data (such as, mass data) after system power failure.Usually, mass-memory unit 511 will be also random access memory, although this is not requirement.Although Fig. 5 illustrates that mass-memory unit 511 is local devices that the remaining components directly and in data handling system couples, but be to be understood that, it is long-range nonvolatile memory that the present invention can utilize relative to this system, as, the network storage device of data handling system is couple to by the network interface of such as modulator-demodular unit or Ethernet interface or radio network interface and so on.Bus 503 can comprise one or more bus be connected to each other by various bridge well known in the art, controller and/or adapter.
The some parts of content described above can realize with the logical circuit of such as dedicated logic circuit and so on, or realizes with the process kernel of other form of microcontroller or executive routine code command.Therefore, the process that above content of the discussions is instructed can perform with the program code of such as machine-executable instruction, and these instructions make the machine of these instructions of execution perform some function.In this context, " machine " can be that intermediate form (or " summary ") instruction transformation is become the machine of processor specific instruction (such as, summary execution environment, as, " virtual machine " (such as, Java Virtual Machine), translation machine, the common language runtime, higher level lanquage virtual machine etc.) and/or being designed to perform instruction and circuit (such as, with " logical circuit " that transistor realizes) be on a semiconductor die set of such as general processor and/or application specific processor and so on.The circuit that the process of instructing of above content of the discussions can also be designed to perform described process (or its part) by (as the alternative of machine or be combined with machine) performs, and without executive routine code.
Manufacture can be used for program code stored.Program code stored manufacture may be implemented as but is not limited to one or more storer (such as, one or more flash memory, random access memory (static, dynamically or other)), CD, CD-ROM, DVDROM, EPROM, EEPROM, magnetic or optical card or is suitable for the machine readable media of other type of store electrons instruction.Program code can also be downloaded to the computing machine (such as, client computer) of the request of sending by the data-signal comprised in propagation medium (such as, via communication link (such as, network connects)) from remote computer (such as, server).
Detailed description be before the algorithm of the operation that data bit in computer memory is carried out and symbol represent in present.The technician that these arthmetic statements and expression are data processing field is used for transmitting to others skilled in the art most effectively the instrument of its work flesh and blood.Algorithm be here usually considered to be the operation causing expected result from concensus sequence.Described operation is those operations needing to carry out physical quantity physical treatment.Usually, although and nonessential, these physical quantitys take the electric signal that can be stored, transmit, combine, compare and otherwise process or magnetic signal form.Main for general reason, confirm sometimes these signals to be called that position, value, element, symbol, character, term, numeral etc. are easily.
But should keep firmly in mind, these and similar terms are all relevant to suitable physical quantity and be just applied to the convenient label of this tittle.Unless pointed out especially in addition, otherwise, as apparent from above discussion, should understand, in whole instructions, the term of such as " process " or " estimation " or " calculating " or " decision " or " display " etc. is utilized to refer to action and the process of computer system or similar computing electronics, the data processing that the physics be expressed as in computer system RS (electronics) is measured by described similar computing electronics being transformed into is expressed as computer system memory or register or other this category information similarly and stores, send or other data of physical quantity in display device.
The invention still further relates to the equipment for performing operation as herein described.This equipment especially can be configured to required object, or it can comprise by the computer program selective activation stored in computing machine or the multi-purpose computer reconfigured.This computer program can be stored in computer-readable recording medium, such as, but not limited to, comprise the dish of any type of floppy disk, CD, CD-ROM and magneto-optic disk and so on, ROM (read-only memory) (ROM), RAM, EPROM, EEPROM, magnetic or optical card or be suitable for store electrons instruction and be all connected to the medium of any type of computer system bus.
The process of stating herein and display are not relate to any specific computing machine or miscellaneous equipment inherently.Various general-purpose system can with use together with the program of instructing herein, or can confirm that constructing more special equipment to perform described operation is easily.In the following description, the desired structure of these systems various will be apparent.In addition, the present invention does not describe with reference to any concrete programming language.Should understand, various programming language can be used to realize instruction of the present invention as described herein.
Above content of the discussions only describes exemplary embodiments more of the present invention.Those skilled in the art will easily recognize, can carry out various amendment without departing from the spirit and scope of the present invention to this kind of discussion, accompanying drawing and claim.
Claims (16)
1., for realizing a computer implemented method for file system, described method comprises:
In response to the request being file allocation space at least one memory storage, from multiple tree representations of bitmap, select a tree representation, the availability of the block in each instruction at least one memory storage described in wherein said bitmap;
One or more nodes of the tree representation selected by search are to find first node, and corresponding one or more continuous positions of described first node have the size matched with the quantity of the block of being specified by described request;
Judge that described first node is not included in described one or more node of selected tree representation;
In response to described judgement, described one or more node of the tree representation selected by search is to find Section Point, corresponding one or more continuous positions of described Section Point have the size of the quantity being different from the block of being specified by described request, wherein within this predetermined threshold value that do not coexist;
Upgrade described bitmap, to distribute the block corresponding with described Section Point; And
Each tree representation in described multiple tree representation is synchronous with the bitmap after renewal.
2. method according to claim 1, wherein, when described file system is mounted, safeguards described multiple tree representation in memory.
3. method according to claim 1, wherein, at least one memory storage described is the mass storage device for described file system storage file.
4. method according to claim 1, wherein, described Section Point comprises the position of the corresponding one or more continuous positions in described bitmap and the size of the quantity of the position in the corresponding one or more continuous position of instruction.
5. method according to claim 4, wherein, select a tree representation in described multiple tree representation to comprise based on described request:
Judge whether described file is new in described file system.
6. method according to claim 5, wherein, when described file is not new in described file system, selected tree representation is location tree, and each node in the one or more nodes comprised in described location tree is set up key assignments according to the primary starting position in corresponding one or more continuous position.
7. method according to claim 1, wherein, at least one tree representation in described multiple tree representation is RBTree.
8. method according to claim 5, wherein, when described file is new in described file system, selected tree representation is range tree, and each node in the one or more nodes comprised in described location tree is set up key assignments according to the size of corresponding one or more continuous position.
9. the computing machine for file system realizes an equipment, and described equipment comprises:
For being based upon the quantity of file designated blocks with the request distributed at least one memory storage, the device of a tree representation is selected from multiple tree representations of bitmap, the availability of the different block in each instruction at least one memory storage described in wherein said bitmap, and each tree representation comprises one or more node, each node corresponds to the different one or more continuous position in described bitmap;
For searching for one or more nodes of selected tree representation to find the device of first node, corresponding one or more continuous positions of described first node have the size matched with the quantity of the block of being specified by described request;
For judging that described first node is not included in the device in described one or more node of selected tree representation;
For in response to described judgement, described one or more node of the tree representation selected by search is to find the device of Section Point, corresponding one or more continuous positions of described Section Point have the size of the quantity being different from the block of being specified by described request, and this does not coexist within predetermined threshold value;
For judging that described Section Point is included in the device in described one or more node of selected tree representation;
For upgrading described bitmap, to distribute the device of the block corresponding with described Section Point; And
For by each tree representation in described multiple tree representation with upgrade after the synchronous device of bitmap.
10. equipment according to claim 9, wherein, when described file system is mounted, safeguards described multiple tree representation in memory.
11. equipment according to claim 9, wherein, at least one memory storage described is the mass storage device for described file system storage file.
12. equipment according to claim 9, wherein, described Section Point comprises the position of the corresponding one or more continuous positions in described bitmap and the size of the quantity of the position in the corresponding one or more continuous position of instruction.
13. equipment according to claim 12, wherein, for selecting the device of a tree representation in described multiple tree representation to comprise based on described request:
For judging that whether described file is new device in described file system.
14. equipment according to claim 13, wherein, when described file is not new in described file system, selected tree representation is location tree, and each node in the one or more nodes comprised in described location tree is set up key assignments according to the primary starting position in corresponding one or more continuous position.
15. equipment according to claim 9, wherein, at least one tree representation in described multiple tree representation is RBTree.
16. equipment according to claim 13, wherein, when described file is new in described file system, selected tree representation is range tree, and each node in the one or more nodes comprised in location tree is set up key assignments according to the size of corresponding one or more continuous position.
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US12/645,364 | 2009-12-22 | ||
US12/645,364 US8504792B2 (en) | 2009-12-22 | 2009-12-22 | Methods and apparatuses to allocate file storage via tree representations of a bitmap |
PCT/US2010/059298 WO2011078966A1 (en) | 2009-12-22 | 2010-12-07 | Methods and apparatuses to allocate file storage via tree representations of a bitmap |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102713826A CN102713826A (en) | 2012-10-03 |
CN102713826B true CN102713826B (en) | 2015-03-25 |
Family
ID=43480999
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201080058365.XA Active CN102713826B (en) | 2009-12-22 | 2010-12-07 | Methods and apparatuses to allocate file storage via tree representations of a bitmap |
Country Status (4)
Country | Link |
---|---|
US (1) | US8504792B2 (en) |
EP (1) | EP2517097A1 (en) |
CN (1) | CN102713826B (en) |
WO (1) | WO2011078966A1 (en) |
Families Citing this family (29)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9229748B2 (en) | 2010-01-29 | 2016-01-05 | Code Systems Corporation | Method and system for improving startup performance and interoperability of a virtual application |
US8880843B2 (en) * | 2010-02-10 | 2014-11-04 | International Business Machines Corporation | Providing redundancy in a virtualized storage system for a computer system |
US8190593B1 (en) * | 2010-04-14 | 2012-05-29 | A9.Com, Inc. | Dynamic request throttling |
US9218359B2 (en) * | 2010-07-02 | 2015-12-22 | Code Systems Corporation | Method and system for profiling virtual application resource utilization patterns by executing virtualized application |
CN103207882B (en) * | 2012-01-13 | 2016-12-07 | 阿里巴巴集团控股有限公司 | Shop accesses data processing method and system |
WO2013111124A1 (en) * | 2012-01-24 | 2013-08-01 | Varonis Systems, Inc. | A method and apparatus for authentication of file read events |
US9542401B1 (en) * | 2012-03-30 | 2017-01-10 | EMC IP Holding Company LLC | Using extents of indirect blocks for file mapping of large files |
CN103064794B (en) * | 2013-02-04 | 2016-05-25 | 烽火通信科技股份有限公司 | Realize the method for the efficient management of MPLS label |
CA2899615C (en) | 2013-03-01 | 2023-08-08 | Empi, Inc. | Systems and methods for wireless control of noninvasive electrotherapy |
AU2014237893B2 (en) | 2013-03-15 | 2018-11-08 | Empi, Inc. | Personalized image-based guidance for energy-based therapeutic devices |
CN104133970A (en) * | 2014-08-06 | 2014-11-05 | 浪潮(北京)电子信息产业有限公司 | Data space management method and device |
US11010101B1 (en) * | 2014-09-19 | 2021-05-18 | EMC IP Holding Company LLC | Object storage subsystems |
CN104486387B (en) * | 2014-12-02 | 2018-03-27 | 浪潮(北京)电子信息产业有限公司 | A kind of data synchronizing processing method and system |
CN105607960B (en) * | 2015-10-26 | 2018-12-07 | 成都华为技术有限公司 | File system directory tree restorative procedure and device |
US9841912B1 (en) * | 2015-12-18 | 2017-12-12 | EMC IP Holding Company LLC | Memory efficient block allocation map to support online growth of different storage attributes |
CN107656697B (en) * | 2016-07-26 | 2021-03-02 | 阿里巴巴集团控股有限公司 | Method and device for operating data on storage medium |
US10747741B2 (en) | 2016-07-26 | 2020-08-18 | Ebay Inc. | Mechanism for efficient storage of graph data |
US10776342B2 (en) * | 2016-11-18 | 2020-09-15 | Tuxena, Inc. | Systems and methods for recovering lost clusters from a mounted volume |
CN106814971B (en) * | 2016-12-20 | 2020-09-29 | 中国银联股份有限公司 | Heterogeneous storage method and heterogeneous storage platform |
CN108628753B (en) * | 2017-03-24 | 2021-02-23 | 华为技术有限公司 | Memory space management method and device |
CN108647338B (en) * | 2018-05-14 | 2022-07-29 | 五八有限公司 | bitmap calculation method, device, equipment and storage medium |
KR102702680B1 (en) * | 2018-08-06 | 2024-09-05 | 에스케이하이닉스 주식회사 | Memory system and operation method for the same |
CN109522308B (en) * | 2018-11-06 | 2023-06-20 | 北京太一星晨信息技术有限公司 | Connection handle management method and device |
CN114761913A (en) * | 2020-01-15 | 2022-07-15 | 阿里巴巴集团控股有限公司 | Fast partition splitting solution in distributed data storage system |
CN112380004B (en) * | 2020-11-04 | 2023-06-13 | 成都佰维存储科技有限公司 | Memory management method, memory management device, computer readable storage medium and electronic equipment |
CN112988911B (en) * | 2021-05-07 | 2021-09-24 | 支付宝(杭州)信息技术有限公司 | Block chain data storage method and device and electronic equipment |
US11733894B2 (en) | 2021-06-03 | 2023-08-22 | Nutanix, Inc. | Dynamically formatted storage allocation record |
CN113360095B (en) * | 2021-06-04 | 2023-02-17 | 重庆紫光华山智安科技有限公司 | Hard disk data management method, device, equipment and medium |
CN116860825B (en) * | 2023-06-14 | 2024-01-26 | 北京科技大学 | Verifiable retrieval method and system based on blockchain |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5375233A (en) * | 1988-12-22 | 1994-12-20 | International Computers Limited | File system |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6182121B1 (en) * | 1995-02-03 | 2001-01-30 | Enfish, Inc. | Method and apparatus for a physical storage architecture having an improved information storage and retrieval system for a shared file environment |
US6857059B2 (en) * | 2001-01-11 | 2005-02-15 | Yottayotta, Inc. | Storage virtualization system and methods |
US20050050108A1 (en) * | 2003-08-21 | 2005-03-03 | Texas Instruments Incorporated | File system for digital processing systems with limited resources |
TWI417722B (en) * | 2007-01-26 | 2013-12-01 | Hicamp Systems Inc | Hierarchical immutable content-addressable memory processor |
US8285757B2 (en) * | 2007-01-31 | 2012-10-09 | Agency For Science, Technology And Research | File system for a storage device, methods of allocating storage, searching data and optimising performance of a storage device file system |
US7882304B2 (en) * | 2007-04-27 | 2011-02-01 | Netapp, Inc. | System and method for efficient updates of sequential block storage |
-
2009
- 2009-12-22 US US12/645,364 patent/US8504792B2/en active Active
-
2010
- 2010-12-07 WO PCT/US2010/059298 patent/WO2011078966A1/en active Application Filing
- 2010-12-07 CN CN201080058365.XA patent/CN102713826B/en active Active
- 2010-12-07 EP EP10796218A patent/EP2517097A1/en not_active Ceased
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5375233A (en) * | 1988-12-22 | 1994-12-20 | International Computers Limited | File system |
Also Published As
Publication number | Publication date |
---|---|
EP2517097A1 (en) | 2012-10-31 |
WO2011078966A1 (en) | 2011-06-30 |
US20110153976A1 (en) | 2011-06-23 |
US8504792B2 (en) | 2013-08-06 |
CN102713826A (en) | 2012-10-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102713826B (en) | Methods and apparatuses to allocate file storage via tree representations of a bitmap | |
US8972696B2 (en) | Pagefile reservations | |
US10871920B2 (en) | Storage device and computer system | |
KR102192503B1 (en) | Method and system for providing virtual desktop service using cache server | |
US6782454B1 (en) | System and method for pre-fetching for pointer linked data structures | |
KR102538222B1 (en) | Storage device, storage system including storage device, and method of accessing storage device | |
US6954839B2 (en) | Computer system | |
US7284085B2 (en) | Managing configuration data in a flash configuration space in flash memory within a host interface port | |
CN103384877A (en) | Storage system comprising flash memory, and storage control method | |
US10394819B2 (en) | Controlling mirroring of tables based on access prediction | |
KR102412978B1 (en) | Storage system performing double write and double writing method thereof | |
US10198180B2 (en) | Method and apparatus for managing storage device | |
EP1605360B1 (en) | Cache coherency maintenance for DMA, task termination and synchronisation operations | |
US20110066800A1 (en) | Data storage system including respective buffers for non-volatile memory and disc recording medium, and data access method thereof | |
CN105468538A (en) | Memory migration method and device | |
US10872015B2 (en) | Data storage system with strategic contention avoidance | |
US20080320212A1 (en) | Control device and control method of nonvolatile memory and storage device | |
CN116340198B (en) | Data writing method and device of solid state disk and solid state disk | |
CN112445412B (en) | Data storage method and device | |
CN111857556B (en) | Method, apparatus and computer program product for managing metadata of storage objects | |
US20070005921A1 (en) | Segmentation management using a rolling window technique | |
US6487632B1 (en) | Emulation technique for variable-length disk system to access data in a fixed-length disk system | |
CN110659312B (en) | Data processing method, device, equipment and computer storage medium | |
KR20090053164A (en) | Flash memory control apparatus and method managing status information | |
US7496740B2 (en) | Accessing information associated with an advanced configuration and power interface environment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |