CN1266609C - Fine granule quick camera carry-out method - Google Patents
Fine granule quick camera carry-out method Download PDFInfo
- Publication number
- CN1266609C CN1266609C CN 03138124 CN03138124A CN1266609C CN 1266609 C CN1266609 C CN 1266609C CN 03138124 CN03138124 CN 03138124 CN 03138124 A CN03138124 A CN 03138124A CN 1266609 C CN1266609 C CN 1266609C
- Authority
- CN
- China
- Prior art keywords
- node
- snapshot
- file system
- file
- 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.)
- Expired - Lifetime
Links
Images
Abstract
The present invention discloses a method for realizing a fine grain snapshot. By the operation, such as packaging the operation set in a file system by a middle layer positioned between a bottom layer and a VFS layer of the file system, adding judgment for judging whether to make a snapshot for changed data and carry out COW operation, redirecting, combining the data, etc., users can make the snapshot for an appointed directory or a file; the operation of modifying the target data after the snapshot can restore to the data state at the time of the snapshot, and simultaneously, the writing performance of the file system data outside the target data is not influenced. By adding extension attributes in node attributes of the file system, the file system can obtain and save a plurality of snapshot editions of the file and the directory, which is convenient for the backup operation in a multi-user environment.
Description
Technical field
The present invention relates to a kind of snapshot implementation method, particularly a kind of fine-grained snapshot implementation method, this method can reach the purpose of the as far as possible little whole file system performance of influence, belong to field of computer technology.
Background technology
In current computer operation, it is concurrent generation that many behaviors are arranged; For example, a computing machine can move a plurality of programs at synchronization, and each program is used different data; Particularly under multi-user's environment, a plurality of users can be in the computed resource of synchronization.
Under above-mentioned multi-user environment, the behavior that computer system can not the precognition user, and a user also is difficult to know current which computer resource that using of other users, and which data is operated; Want certain shared data is carried out backup operation such as a user, but this user is difficult to learn whether other user makes amendment to the target data of backup; Therefore computer system must provide management function, guarantees that a user's operation can not influence other users.
So just produced a problem, when a file or catalogue are in the process that is modified, other processes or user may require target data is backed up, how does system control this backup behavior? a user's operation can not influence other users' management function if system does not give security, then backup file might comprise the content that other processes are revised target data, thereby causes the data mode that backup file can not the correct response backup time.
For addressing the above problem, computer system has been introduced snapping technique (snapshot document system), before backup operation begins, file system is done a snapshot, the data mode of " freezing " current file system; As shown in Figure 1, the operation of any revised file system data all can trigger before target data is changed and write fashionable copy (COPY-ON-WRITE, be called for short COW) operation, create the data content and the metadata of an indirect node and while copy targeting file, if backup operation finds that target data has indirect node, just be redirected backup target to indirect node, thereby guarantee the validity and the consistance of Backup Data, make the data mode of the reaction backup time that backup file can be correct.
Obviously, the snapshot document system has reduced the write performance of file system when guaranteeing backup file validity.If user only wants to back up certain catalogue or the big file of current file system, then whole file system being done snapshot has bigger reduction for the write performance of system; And other processes can trigger the COW operation equally to the target directory or the write operation of the data outside the file of backup, and not only copies data but also copy metadata had reduced the write performance of system more.Therefore need a kind of Snapshot Method to guarantee that the file system data of other processes outside the modifying target data can not trigger COW, thereby influence the performance of file system as small as possible.
The United States Patent (USP) (patent No. 6,484,186) that name is called " Method for backing up consistent versions of open files " discloses a kind ofly makes the method for snapshot for opening file; Whether this patent is preserved the logical block reflection of respective file with bitmap, identify this logical block and be modified and snapshot arranged.After a file has been made snapshot, certain piece of file is made amendment, all can cause a series of operation, at first set up a new piece, duplicate former content, put sign for the correspondence position of bitmap, represent that this piece has snapshot, and preserve the piece number of new piece; But this patent does not have to propose how to organize a plurality of newly-built copy block, simultaneously each piece that is modified is made the write performance that COW also can influence system, and above-mentioned patent does not propose a plurality of snapshots that a kind of reliable method can realize preserving file.
Summary of the invention
Fundamental purpose of the present invention provides a kind of implementation method of fine granularity snapshot; The user can do snapshot to assigned catalogue or file, and any operation of doing snapshot modifying target data afterwards can return to snapshot data mode constantly, does not influence the write performance of the file system data outside the target data simultaneously.
Another object of the present invention is in a file system, to obtain and to preserve a plurality of snapshot versions of file and catalogue.
The objective of the invention is to be achieved through the following technical solutions:
A kind of fine granularity snapshot implementation method, use the Request Processing that the file system of this method carries out and comprise following steps at least:
Step 1, the file system that records the node SNAPSHOT INFO receive to be handled request;
Step 2, file system are according to handling request type and handling the node object type that relates in the request and carry out pre-service;
Step 3, file system are handled operation according to amended processing request.
In the above-mentioned fine granularity snapshot implementation method, described file system meets dummy node/Virtual File System standard, for example can be Journaling File System (JFS); Be provided with at least one middle layer between file system bottom and Virtual File System layer, described processing operates in the file system bottom and carries out.
The step 2 that described request is handled may further comprise the steps at least:
Step 21, middle layer receive the processing request that the Virtual File System layer is sent;
Step 22, middle layer are judged the type of handling request; If revise request, then execution in step 24, if read request, then execution in step 23;
Step 23, judge whether to carry out being redirected and/or operation that array is closed of node, if then advanced line data is redirected and/or data combination, execution in step 25 then; Otherwise direct execution in step 25;
Step 24, judge whether the data that change are done the COW operation; If the partial data that then carries out the COW operation earlier and duplicate indirect node is to host node, execution in step 25 again; Otherwise direct execution in step 25;
Step 25, middle layer send to the file system bottom with the file processing request, by the concrete request of bottom document system handles.
The described judgement of step 22 is specially:
Step 221: the node type that request relates to file processing is judged, if this node type is a catalogue, and include the operation to any sub-directory establishment/deletion down/modification node of current directory or current directory in the described file processing request, then execution in step 24; Otherwise execution in step 222;
Step 222: if this node type is a file, and comprises in the described file processing request file is carried out write operation or break-in operation, then execution in step 24; Otherwise execution in step 23.
The described judgement of step 23 is specially:
Step 231, read all logical block contents of corresponding node.
Step 232, read request are handled function and are judged that whether current node has logical block is empty, if no, then read all pieces of node and form continuous in logic context, execution in step 25, if it is empty that logical block is arranged, show that then the host node of this node has the indirect node of snapshot;
Step 233, search apart from nearest snapshot node before this node creation-time, read the logical block of this node correspondence according to the doubly linked list in this node extended attribute;
Step 234, judge that whether the logical block of this node correspondence is empty, if be empty, the continuous in logic context of piece composition that this logical block and step 231 are read then, execution in step 25; If be empty, then execution in step 233.
The described SNAPSHOT INFO of above-mentioned fine granularity snapshot implementation method is added in the Archive sit community set of file system, and this SNAPSHOT INFO comprises the doubly linked list of snapshot sign and a plurality of snapshots of record at least.
The data that change are done before the snapshot, file system decision node type, if node is a file, then in the extended attribute of node, call the adding SNAPSHOT INFO by input/output control system, if node is a catalogue, then travel through all nodes of target directory, and call the adding SNAPSHOT INFO by input/output control system in the extended attribute of each node in this catalogue.
In the above-mentioned fine granularity snapshot implementation method, described COW operation may further comprise the steps at least:
(1), file system judges whether the node make COW is a host node that the indirect node of snapshot is arranged, and is the COW that deletion action causes, if above-mentioned condition all satisfies, then forwards step 2 to, otherwise, forward step 5 to;
(2), judge deleted node type, if the catalogue host node of snapshot is arranged, then change step 4; If not then changeing step 3;
(3), create an interim node for this node, and all data blocks of host node are transferred under the interim node, discharging the data block space that host node occupies by interim node, host node is only preserved the information of snapshot node, be metadata, continue step 4;
(4), for host node is provided with delete flag, it is deleted to identify this node, but does not delete real data content, changes step 9
(5), judge whether object has indirect node, if object does not have indirect node, the step 6 below then continuing if object has indirect node, is then pointed out error message, changes step 9;
(6), create indirect node, the metadata of the indirect node of initialization, and this indirect node inserted file system nodes Hash (hash) table;
(7), judge whether host node is catalogue, if catalogue, the data content of duplicate catalog on node indirectly then, otherwise, shift the data structure of organizing disk block, the data content of host node is transferred on the indirect node;
(8), the extended attribute of host node is set, the node number of indirect node is joined in all indirect node chained lists (doubly linked list) that host node safeguards goes;
(9), normally withdraw from.
By technique scheme as can be known, the present invention has following advantage:
1, by the middle layer that is located between file system bottom and the VFS layer operational set in the file system is encapsulated, whether add needs the data that change are done snapshot and carried out judgement and the operations such as redirected and data combination that COW operates, make the user to do snapshot to assigned catalogue or file, any operation of doing snapshot modifying target data afterwards can return to snapshot data mode constantly, does not influence the write performance of the file system data outside the target data simultaneously.
2,, make file system can obtain and preserve a plurality of snapshot versions of file and catalogue, the carrying out of backup operation under the environment of convenient multi-purpose family by in the file system nodes attribute, adding extended attribute.
Description of drawings
Fig. 1 is the COW of an existing file system principle schematic;
Fig. 2 is a snapshot document system architecture schematic diagram of the present invention;
Fig. 3 is an embodiment of the invention snapshot document system architecture schematic diagram;
Fig. 4 is an embodiment of the invention jfs extended attribute block structure schematic diagram;
Fig. 5 utilizes the jfs extended attribute for the embodiment of the invention and realizes the synoptic diagram of a plurality of snapshot nodes;
Fig. 6 is embodiment of the invention data redirection and data combination process flow diagram;
Fig. 7 is an embodiment of the invention snapshot document system distribution snapshot sign process flow diagram;
Fig. 8 is the embodiment of the invention snapshot document COW of a system operational flowchart;
Fig. 9 is the issued transaction flow process figure of embodiment of the invention revised file system for content.
Embodiment
Below, in conjunction with specific embodiments and with reference to accompanying drawing, the present invention is described in further detail.
Backup method of the present invention is to realize a middle layer in the file system that meets UNIX dummy node/Virtual File System (vnode/VFS) standard, and this layer is between file system bottom and VFS layer; When system call captures the file system operation request, the function that before the concrete file system operation of the standard calls interface interchange of VFS layer, realizes by the concrete file system of the next heavy duty of the snapshot operation of encapsulation.
The standard interface of the file system that the VFS layer is provided mainly is made up of nodal operation set, file operation set and address space operational set.All file system calls all are by realizing these three incompatible realizations of operation set by concrete file system.
When an application program was initiated a file system requests, the flow process of snapshot document system handles request comprised following steps as shown in Figure 2:
Step 1, application program pass to system space to the request of file system by system call interfaces;
Step 2, system call interfaces are submitted to request the issued transaction function of VFS layer;
Step 3, VFS layer are determined the processing function of lower floor's file system layer, continue that one deck is submitted to down in request and handle, and promptly give the snapshot interlayer and handle;
Step 4, snapshot interlayer call the interface of file system (JFS, ext2, XFS etc.) bottom according to handling request type and handling the node object type that relates in the request and carry out pre-service;
Step 5, bottom document system finish real issued transaction, ask as I/O etc.
As shown in Figure 3, snapshot interlayer of the present invention has been intercepted and captured the processing request of submitting under the VFS course as a middle layer of file system; If write request then judges whether to do the COW operation; If read request, then judging whether needs to be redirected, and carries out will asking to submit to the bottom document system again after the corresponding pre-service.
Present embodiment is for being applied to the Journaling File System fine granularity snapshot document system of (Journal File System is called for short JFS), and it needs three parts to support:
The first, revise the I/O control operation of system, realize that the distribution SNAPSHOT INFO is to destination node;
The second, revise the JFS file system, realize operational set about snapshot offering the middle layer application interface, be used for judging for example whether be redirected or carry out operation such as COW, mainly comprise the function that following table is listed at the JFS of bottom document system:
Function name | The JFS function name | Function performance is explained |
Is_redirector | Jfs_is_redirector | Judge whether this node is redirected |
Create_indirect | Jfs_create_indirect | Create the indirect node of node |
Get_indirect | Jfs_get_indirect | Obtain indirect node |
Get_indirect_ino | Jfs_get_indirect_ino | Obtain the number of indirect node |
Destroy_indirect | Jfs_destroy_indirect | Destroy indirect node |
Restore_indirect | Jfs_restore_indirect | Recover host node according to indirect node |
Migrate_data | Jfs_migrate_data | The transfering node data are to indirect node |
Copy_block | Jfs_copy_block | The content of copies data piece |
Set_indirect | Jfs_set_indirect | Its SNAPSHOT INFO is set for node |
Three, in the middle layer, realize nodal operation set, file operation set and the address space operational set of catalogue, file and link, add in the function that will in these three operational set, change and judge data, judge whether and to do snapshot and to carry out the COW operation the data that change, add operations such as redirected and data combination in the function of read data, these operations comprise:
Catalogue:
The operation name | The operational set type | Operation is explained |
Create | The nodal operation set | Create node |
Mkdir | The nodal operation set | Set up catalogue |
Link | The nodal operation set | Set up hard the connection |
Symlink | The nodal operation set | Setting up symbol connects |
Mknod | The nodal operation set | Create device node |
Rmdir | The nodal operation set | Deltree |
Unlink | The nodal operation set | Cancellation connects |
Rename | The nodal operation set | The rename node |
Lookup | The nodal operation set | Query node |
File:
The operation name | Action type | Operation is explained |
Truncate | The nodal operation set | Block file content |
Write | The file operation set | Written document |
Readpage | The address space operational set | Read the content of file page |
Realize that it is the extended attribute that file system has realized file that input/output control system calls the basis of gathering with snapshot operation.Because the disk structure of original preservation node does not have enough spaces to preserve the property value of expansion, for example the information of a plurality of indirect nodes of a node and the sign that whether needs to be COW all need to be kept in the attribute of disk node structure, and can't satisfy the demand in the space of the disk node structure of original definition, therefore these attributes need be arranged in the extended attribute of node.The file system operation (as shown in the table) that will realize the setting of extended attribute at least and get extended attribute simultaneously, and will be in the process of file system initialization initialization extended attribute piece corresponding cache pond.Extended attribute is articulated on original nodal community with the form of a disk block, and the disk structure of extended attribute piece as shown in Figure 4.If a node has a plurality of extended attributes, then these extended attributes can be shared an extended attribute piece.The top of extended attribute piece is the description entry of extended attribute, the side-play amount of this description entry indication extended attribute value in the extended attribute piece.The extended attribute description entry is expanded downwards from extended attribute piece top, and the real value of extended attribute extends upward from the bottom of piece, has the blank border region of 4 bytes between description entry and the extended attribute at least.In snapshot document of the present invention system, need two extended attribute: snap_flag (snapshot sign) and snap_ea (writing down the doubly linked list of a plurality of snapshots).
Function name | The JFS function name | Function performance is explained |
Xattr_set (node, name index, the extended attribute name, extended attribute value buffer zone, extended attribute value buffer size) | Jfs_xattr_set | The extended attribute value of node is set |
Xattr_get (node, name index, the extended attribute name, extended attribute value buffer zone, extended attribute value buffer size) | Jfs_xattr_get | Get the extended attribute value of node |
As shown in Figure 5, be the example of host node that two snapshots are arranged.Node was done after the snapshot 1 for the first time, and the user revises 3,4 of the logic data blocks of node.In new node, the 1st, 2,5 is empty, shows that modification did not take place after making snapshot these pieces.When the operation of reading current host node took place, the 1st, 2,5 of indirect node 1 and the 3rd, the 4 continuous context of composition of host node were read out; After file destination was done for the second time snapshot, user's modification the 5th; When reading the request comes of current host node, the 3rd, 4 of node 2 adds that the 1st, 2 of indirect node 1 and the 5th file content that composition is continuous in logic of host node are read out indirectly; When the operation of reading the snapshot contents first time took place, the operation of reading host node was redirected to indirect node 1, the content of reading file.When the content of the snapshot second time was read in request, read operation took place to be redirected, the while data splitting, and 1,2,5 of indirect node 1 and the 3rd, the 4 continuous file content of composition of indirect node 2 are read.
As shown in Figure 6, redirected and data combination mainly may further comprise the steps:
One, the judgement read request is read snapshot node or host node, the node of correspondence is submitted to read request as parameter handle function;
Two, read request processing function judges that whether current node has logical block is empty, if no, then read all pieces of node and form continuous in logic context, return to read operation, if it is empty that logical block is arranged, show that then the host node of this node has the indirect node of snapshot;
Three, search apart from nearest snapshot node before this node creation-time according to the doubly linked list in this node extended attribute, read the logical block of this node correspondence;
Four, whether the logical block of judging this node correspondence is empty, if be empty, then with this logical block and the continuous in logic context of reading before of piece composition, returns read operation; If be empty, then execution in step three.
For the data of different types of file system, as catalogue and file etc., the implication of modification is different.For catalogue, under current directory or under the sub-directory and indirect establishment/deletion of node and the modification of the node under the catalogue meaned that all modification has taken place catalogue under the sub-directory; And for file, have only when file generation write operation or when being blocked, mean that just modification has taken place file; Therefore to be handled respectively file and catalogue, and clearly, the many of complexity be wanted in the processing of catalogue.
If the user does snapshot to assigned catalogue, need notify all objects under this catalogue to comprise indirect object: their any change all can cause the COW operation.Concrete implementation method is the moment of doing snapshot, utilizes input/output control system to call, all nodes of traversal target directory, and add the information of snapshot in the extended attribute of each node, for example snapshot time or snapshot indexing number.
As shown in Figure 7, the flow process for the snapshot sign is distributed in input and output control (ioctl) system call of snapshot document system may further comprise the steps:
One, in the extended attribute of destination node, adds piece sighting target will;
Two, judge whether catalogue of destination node, if catalogue is changeed step 3; Then change step 7 if not catalogue;
Three, read item in the catalogue, put extended attribute snapshot sign;
Four, judge whether this directory entry is catalogue, if catalogue is changeed step 5; Then change step 6 if not catalogue;
Five, the snapshot sign of this this directory entry of flow setting of recursive call;
Six, whether the directory entry of catalogue at the corresponding levels runs through, if then change step 7, otherwise changes step third reading the next item down;
Seven, function returns.
For destination node is catalogue, and catalog system is realized distribution snapshot sign by calling readdir/getdents call function VFS_readdir.VFS_readdir transmits a function pointer filldir_t as parameter, in the function of this filldir_t, realize being provided with the operation of extended attribute snapshot sign, when reading directory operation and read a directory entry, substitute the operation that in the operation of reading catalogue originally directory entry is copied to user's space with the operation that the snapshot sign is set.
All can cause that file system data revises operate in execution before, all can whether needs be COW according to the snapshot determined property in the node extended attribute; If the catalogue of doing snapshot is carried out structural modification, as deletion/interpolation node, then system copy adds/data and the metadata of the direct parent directory of deletion of node; If to the modification of node, the implementation method of COW with the following described snapshot of making file after institute to carry out the COW operation the same; If not the object under the target directory is made an amendment, the COW operation just can not take place.
As shown in Figure 8, be the specific implementation of file system COW, it is as follows that the jfs file system is created the program circuit of indirect node:
(1), file system judges whether the node make COW is a host node that the indirect node of snapshot is arranged, and is the COW that deletion action causes, if above-mentioned condition all satisfies, then forwards step 2 to, otherwise, forward step 5 to;
(2), judge deleted node type, if the catalogue host node of snapshot is arranged, then change step 4; If not then changeing step 3;
(3), create an interim node for this node, and all data blocks of host node are transferred under the interim node, discharging the data block space that host node occupies by interim node, host node is only preserved the information of snapshot node, be metadata, continue step 4;
(4), for host node is provided with delete flag, it is deleted to identify this node, but does not delete real data content, changes step 9
(5), judge whether object has indirect node, if object does not have indirect node, the step 6 below then continuing if object has indirect node, is then pointed out error message, changes step 9;
(6), create indirect node, the metadata of the indirect node of initialization, and this indirect node inserted file system nodes Hash (hash) table;
(7), judge whether host node is catalogue,
If not catalogue, then shift the data structure of organizing disk block, the data content of host node is transferred on the indirect node, for file system with tree-like formula constituent act disk block, only need to shift the root of tree construction, especially for JFS, then only need the root of the staged files B+ tree, for organizing the file system of disk block with the chained list indirect block, then shifting all logical block number (LBN) corresponding physical disk blocks number;
If host node is a catalogue, then the data content of duplicate catalog on indirect node for JFS, is exactly the B+ tree of duplicate catalog;
(8), the extended attribute of host node is set, the node number of indirect node is joined in all indirect node chained lists (doubly linked list) that host node safeguards goes;
(9), program normally withdraws from.
The user can do a plurality of snapshots to a catalogue or file, and snapshot list of file system maintenance comprises snapshot time and snapshot object.Do an in store doubly linked list in the extended attribute of node of COW operation at each, be used to safeguard a plurality of snapshots of this object, preserved the node number of each indirect node of host node in the chained list.
The issued transaction flow process of revised file system for content has been described as shown in Figure 9.
One, judging for host node whether need to carry out the COW operation, specifically is whether the extended attribute of checking destination node has the time of snapshot sign and snapshot whether after file is modified for the last time; Illustrate that if condition is set up the direct or indirect parent directory of this node or this node just done snapshot, retouching operation will cause the COW operation, change step 2; Otherwise commentaries on classics step 5;
Two, do the COW operation for host node;
Three, judge whether catalogue of the target host node be modified,, otherwise change step 4 if catalogue is changeed step 5;
Four, carry out corresponding replicate run, continue step 5;
Five, revise the host node file system object;
Six, processing finishes.
Need to prove that for step 4 can know that according to described COW operating process before for file, carry out after the COW, the data content of host node has been blocked, the data block contents of promptly revising is transferred in the indirect node; When this document is modified once more, for example before write operation, also will carry out corresponding replicate run to guarantee that amended each data block all is complete, promptly the data content of the data block correspondence that earlier host node will be revised duplicates from indirect node, makes amendment again; Particularly,, and just revise partial content,, must carry out above-mentioned replicate run then in order to ensure the content intact of the data block that is modified if not the modification full content for some data block.Because the content of revising in the time of each written document not necessarily is boundary alignment with the piece, promptly revise is not just in time to begin or exactly finish to the final position of piece from the reference position of piece, so before really revising data, duplicate the content of 2 disk blocks (starting block of modification and last piece) at most, at every turn with initial data piece of guaranteeing to be modified and the content intact that stops data block.
It should be noted last that, above embodiment is only unrestricted in order to technical scheme of the present invention to be described, although the present invention is had been described in detail with reference to preferred embodiment, those of ordinary skill in the art is to be understood that, can make amendment or be equal to replacement technical scheme of the present invention, and not breaking away from the spirit and scope of technical solution of the present invention, it all should be encompassed in the middle of the claim scope of the present invention.
Claims (8)
1, a kind of fine granularity snapshot implementation method is characterized in that: use the Request Processing that the file system of this method carries out and comprise following steps at least:
Step 1, the file system that records the node SNAPSHOT INFO receive to be handled request;
Step 2, file system are according to handling request type and handling the node object type that relates in the request and carry out pre-service;
Step 3, file system are handled operation according to handling request;
Wherein, described step 2 comprises at least:
Step 21, middle layer receive the processing request that the Virtual File System layer is sent;
Step 22, middle layer are judged the type of handling request; If revise request, then execution in step 24, if read request, then execution in step 23;
Step 23, judge whether to carry out being redirected and/or the operation of data combination of node, if then advanced line data is redirected and/or data combination, execution in step 25 then; Otherwise direct execution in step 25;
Step 24, judge whether the data that change are done and write fashionable copy function; If copy function and the partial data that duplicates indirect node are to host node when then writing earlier, execution in step 25 again; Otherwise direct execution in step 25;
Step 25, middle layer send to the file system bottom with the file processing request, by the concrete request of bottom document system handles.
2, fine granularity snapshot implementation method according to claim 1, it is characterized in that: described file system meets dummy node/Virtual File System standard, be provided with at least one middle layer between file system bottom and Virtual File System layer, described processing operates in the file system bottom and carries out.
3, fine granularity snapshot implementation method according to claim 1, it is characterized in that: the described judgement of step 22 is specially:
Step 221: the node type that request relates to file processing is judged, if this node type is a catalogue, and include the operation to any sub-directory establishment/deletion down/modification node of current directory or current directory in the described file processing request, then execution in step 24; Otherwise execution in step 222;
Step 222: if this node type is a file, and comprises in the described file processing request file is carried out write operation or break-in operation, then execution in step 24; Otherwise execution in step 23.
4, fine granularity snapshot implementation method according to claim 1, it is characterized in that: the described judgement of step 23 is specially:
Step 231, read all logical block contents of corresponding node;
Step 232, read request are handled function and are judged that whether current node has logical block is empty, if do not have, then read all pieces of node, form continuous in logic context, and execution in step 25 is empty if logical block is arranged, and then execution in step 233;
Step 233, search apart from nearest snapshot node before this node creation-time, read the logical block of this node correspondence according to the doubly linked list in this node extended attribute;
Step 234, judge that whether the logical block of this node correspondence is empty, if be empty, the continuous in logic context of piece composition that this logical block and step 231 are read then, execution in step 25; If be empty, then execution in step 233.
5, fine granularity snapshot implementation method according to claim 1 is characterized in that: described SNAPSHOT INFO is added in the Archive sit community set of file system, and this SNAPSHOT INFO comprises the doubly linked list of snapshot sign and a plurality of snapshots of record at least.
6, fine granularity snapshot implementation method according to claim 5, it is characterized in that: the back end that changes is done before the snapshot, file system decision node type, if node is a file, then in the extended attribute of node, call the adding SNAPSHOT INFO by input/output control system, if node is a catalogue, then travels through all nodes of target directory, and call the adding SNAPSHOT INFO by input/output control system in the extended attribute of each node in this catalogue.
7, fine granularity snapshot implementation method according to claim 1, it is characterized in that: copy function may further comprise the steps at least during said write:
(1), file system judges whether the node write fashionable copy is a host node that the indirect node of snapshot is arranged, and be deletion action cause write fashionable copy, if above-mentioned condition all satisfies, then forward step (two) to, otherwise, forward step (five) to;
(2), judge deleted node type, if the catalogue host node of snapshot is arranged, then change step (four); If not then changeing step (three);
(3), create an interim node for this node, and all data blocks of host node are transferred under the interim node, discharging the data block space that host node occupies by interim node, host node is only preserved the information of snapshot node, be metadata, continue step (four);
(4), for host node is provided with delete flag, it is deleted to identify this node, but does not delete real data content, changes step (nine);
(5), judge whether object has indirect node, if object does not have indirect node, the step (six) below then continuing if object has indirect node, is then pointed out error message, changes step (nine);
(6), create indirect node, the metadata of the indirect node of initialization, and this indirect node inserted file system nodes Hash hash table;
(7), judge whether host node is catalogue, if catalogue, the data content of duplicate catalog on node indirectly then, otherwise, shift the data structure of organizing disk block, the data content of host node is transferred on the indirect node;
(8), the extended attribute of host node is set, the node number of indirect node is joined in all indirect node chained lists that host node safeguards goes;
(9), normally withdraw from.
8, according to claim 1 or 2 or 5 or 6 or 7 described fine granularity snapshot implementation methods, it is characterized in that: described file system is Journaling File System JFS.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 03138124 CN1266609C (en) | 2003-06-05 | 2003-06-05 | Fine granule quick camera carry-out method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 03138124 CN1266609C (en) | 2003-06-05 | 2003-06-05 | Fine granule quick camera carry-out method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1553339A CN1553339A (en) | 2004-12-08 |
CN1266609C true CN1266609C (en) | 2006-07-26 |
Family
ID=34323658
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 03138124 Expired - Lifetime CN1266609C (en) | 2003-06-05 | 2003-06-05 | Fine granule quick camera carry-out method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN1266609C (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106951376A (en) * | 2017-02-27 | 2017-07-14 | 清华大学 | Towards the fine granularity nonvolatile cache system and buffer memory management method of flash memory |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100541441C (en) * | 2007-11-09 | 2009-09-16 | 中国科学院计算技术研究所 | A kind of snapshot creation of computer file system, deletion and amending method |
CN101964035A (en) * | 2010-10-11 | 2011-02-02 | 深圳创维-Rgb电子有限公司 | Linux operating system file safety system and electronic device |
CN103116533A (en) * | 2012-05-28 | 2013-05-22 | 北京智网科技股份有限公司 | Snapshot implementation method |
US9031911B2 (en) | 2012-06-05 | 2015-05-12 | International Business Machines Corporation | Preserving past states of file system nodes |
US8972350B2 (en) * | 2012-06-05 | 2015-03-03 | International Business Machines Corporation | Preserving a state using snapshots with selective tuple versioning |
CN106156047B (en) * | 2015-03-27 | 2019-10-29 | 中国移动通信集团福建有限公司 | A kind of SNAPSHOT INFO processing method and processing device |
CN107526840A (en) * | 2017-09-14 | 2017-12-29 | 郑州云海信息技术有限公司 | File system snapshot querying method, device and computer-readable recording medium |
CN110018988B (en) * | 2017-11-08 | 2023-04-04 | 阿里巴巴集团控股有限公司 | Snapshot deleting method, processing method, device and system |
CN107908727B (en) * | 2017-11-14 | 2021-06-29 | 郑州云海信息技术有限公司 | Storage object cloning method, device, equipment and computer readable storage medium |
CN112650723A (en) * | 2020-12-28 | 2021-04-13 | 北京浪潮数据技术有限公司 | File sharing method, device, equipment and computer readable storage medium |
-
2003
- 2003-06-05 CN CN 03138124 patent/CN1266609C/en not_active Expired - Lifetime
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106951376A (en) * | 2017-02-27 | 2017-07-14 | 清华大学 | Towards the fine granularity nonvolatile cache system and buffer memory management method of flash memory |
CN106951376B (en) * | 2017-02-27 | 2019-10-29 | 清华大学 | Fine granularity nonvolatile cache system and buffer memory management method towards flash memory |
Also Published As
Publication number | Publication date |
---|---|
CN1553339A (en) | 2004-12-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20220342892A1 (en) | Methods and systems for managing data | |
US8868624B2 (en) | Blob manipulation in an integrated structured storage system | |
US8239351B2 (en) | Methods and systems for managing permissions data | |
US8190566B2 (en) | Trusted index structure in a network environment | |
US8713462B2 (en) | Browsing or searching user interfaces and other aspects | |
US8397246B2 (en) | Browsing or searching user interfaces and other aspects | |
TWI358027B (en) | Computer-storage media and method for automaticall | |
CN1292370C (en) | Method and apparatus for data processing | |
US20090106674A1 (en) | Previewing user interfaces and other aspects | |
CN1266609C (en) | Fine granule quick camera carry-out method | |
CN1610907A (en) | System and method for filtering and organizing items based on common elements | |
US20100106695A1 (en) | Scalable blob storage integrated with scalable structured storage | |
US20080040388A1 (en) | Methods and systems for tracking document lineage | |
US20050289110A1 (en) | Trusted index structure in a network environment | |
US20140068295A1 (en) | Methods and systems for managing data | |
CN100498781C (en) | Method for storing metadata of logic document system by adhesion property | |
US20070033191A1 (en) | Methods and systems for managing permissions data and/or indexes | |
US20080307363A1 (en) | Browsing or Searching User Interfaces and Other Aspects | |
US20070112743A1 (en) | Methods and systems for managing data | |
CN1783082A (en) | Method and system for maintaining namespace consistency with a file system | |
US20050289108A1 (en) | Methods and systems for managing data | |
CN1764901A (en) | A device for restoring at least one of files, directories and application oriented files in a computer to a previous state | |
CN1759389A (en) | System and method utilizing virtual folders | |
CN1662905A (en) | Multiple concurrent active file systems | |
CA2629833A1 (en) | Systems and methods for classifying and transferring information in a storage network |
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 | ||
CX01 | Expiry of patent term |
Granted publication date: 20060726 |
|
CX01 | Expiry of patent term |