Source: https://patents.google.com/patent/US20120150804
Timestamp: 2018-02-23 12:53:00
Document Index: 698437138

Matched Legal Cases: ['art 500', 'art 600', 'art 600', 'art 500', 'arts 500', 'arts 500', 'arts 500', 'arts 500', 'art 500', 'art 600', 'art 500', 'art 500', 'art 500', 'art 500', 'art 500', 'art 500', 'art 500', 'art 500', 'art 500', 'art 500', 'art 600', 'art 500', 'art 600', 'art 600', 'art 600', 'art 600', 'art 600', 'art 600', 'art 600']

US20120150804A1 - Multiple contexts in a redirect on write file system - Google Patents
Multiple contexts in a redirect on write file system
US20120150804A1
US20120150804A1 US12963146 US96314610A US2012150804A1 US 20120150804 A1 US20120150804 A1 US 20120150804A1 US 12963146 US12963146 US 12963146 US 96314610 A US96314610 A US 96314610A US 2012150804 A1 US2012150804 A1 US 2012150804A1
US12963146
US8626713B2 (en )
Manoj N. Kumar
A method includes initiating committing to persistent storage of a current consistency snapshot of a plurality of data objects in a redirect-on-write file system. Each of the plurality of data objects has a first copy of at least two copies of the data having a first context of at least two contexts. The method includes receiving, during committing to storage of the current consistency snapshot, an update to a data object of the plurality of data objects. The method also includes responsive to receipt of the update to the data object, creating a second copy of data of the data object from the first copy. The second copy of the data has a second context of the at least two contexts. The method includes responsive to receipt of the update to the data object, updating, based on the update, the second copy of the data of the data object.
Embodiments of the inventive subject matter generally relate to the field of computers, and, more particularly, to data backups in a redirect on write file system.
File systems employ different methods to ensure the consistency therein in the event of a system crash. One approach is for the file system to write modified data to new locations on disk in a bottom-up order every few seconds. These views of the data stored therein are called consistency snapshots. After a system crash, the file system starts with the top of the last consistency snapshot of the file system which is guaranteed to be consistent.
While the consistency snapshot is being written, new changes to the file system could be attempted by a user. It would be easy to block these changes until the consistency snapshot is committed to storage on a non-volatile machine-readable medium (e.g., hard disk). However, this approach is not acceptable because such an approach would lead to consistency snapshots not being transparent to the user. In particular, this approach can cause the entire file system to freeze every few seconds, while the consistency snapshot is being committed to storage.
Embodiments include a method comprising initiating committing to storage, into a nonvolatile machine-readable medium, of a current consistency snapshot of a plurality of data objects in a redirect-on-write file system, wherein each of the plurality of data objects have a first copy of data of the plurality of data objects having a commit-in-progress context. The method also includes assigning a generation value to the current consistency snapshot that is unique relative to generation values of other consistency snapshots. The method includes receiving, during the committing to storage of the current consistency snapshot, an update to a data object of the plurality of data objects. The method also includes, responsive to receiving the update to the data object, incrementing a generation value for the data object. The method includes, responsive to receiving the update to the data object, associating a generation value to the update that is derived from the generation value of the data object. Also responsive to receiving the update to the data object, the method includes creating a second copy of data of the data object that is copied from the first copy of the data of the data object. The second copy of the data of the data object has an update-in-progress context. Also responsive to receiving the update to the data object, the method includes updating, based on the update, the second copy of the data of the data object, independent of updating the first copy of the data of the data object.
Embodiments include a method comprising initiating committing to persistent storage of a current consistency snapshot of a plurality of data objects in a redirect-on-write file system, each of the plurality of data objects configurable to have multiple copies of data of the plurality of data objects having different contexts. Each of the plurality of data objects has a first copy of at least two copies of the data having a first context of at least two contexts. The method includes receiving during committing to storage of the current consistency snapshot, an update to a data object of the plurality of data objects. Responsive to receipt of the update to the data object, the method includes creating a second copy of data of the data object from the first copy. The second copy of the data having a second context of at least two contexts. Responsive to receipt of the update to the data object, the method also includes updating, based on the update, the second copy of the data of the data object.
FIG. 1 depicts a conceptual diagram of a clustered file system configuration to provide multiple contexts for data objects in a redirect-on-write file system, according to some example embodiments.
FIG. 2 depicts a more detailed conceptual diagram of clustered file system configuration to provide multiple contexts for data objects in a redirect-on-write file system, according to some example embodiments.
FIG. 3 depicts an example buffer header for a data object stored in a clustered file system, according to some embodiments.
FIG. 4 depicts an example timeline of committing a consistency snapshot relative to multiple generations of a data object, according to some embodiments.
FIGS. 5-6 depict flowcharts of operations that provide multiple contexts for data objects in a redirect-on-write file system, according to some example embodiments.
The description that follows includes example systems, methods, techniques, instruction sequences and computer program products that embody techniques of the present inventive subject matter. However, it is understood that the described embodiments may be practiced without these specific details. For instance, although examples refer to a dual context for data that is part of a file system, some other example embodiments can configure any number of contexts for the data (e.g., three, four, five, etc.). Also while described such that a consistency snapshot is created for a file system, in some other example embodiments consistency snapshots at other levels can be created. For example, a user can configure a subset of files, a particular file, etc. to be backed up into a consistency snapshot more frequently than the periodic snapshots for the file system. Accordingly, some example embodiments are applicable to these other levels of consistency snapshots. In other instances, well-known instruction instances, protocols, structures and techniques have not been shown in detail in order not to obfuscate the description.
When a cluster is established, an administrator configures one of the nodes of the cluster to operate as a cluster leader. Embodiments can also program a cluster to automatically choose the leader. The cluster leader maintains cluster role data that indicates whether a node is a client, server, or both client and server. A server manages a fileset in the clustered file system. The cluster leader also maintains an indication of which node operates as a clustered file system manager. The clustered file system manager manages metadata for the clustered file system. In some embodiments, the clustered file system manager is the only server for the cluster—not accounting for a failover server. In some embodiments, the clustered file system manager delegates management of filesets within the clustered file system to other nodes that are servers. The term “fileset” is used herein to refer to a set of files and/or directories. Along with the indication of which nodes are servers within the cluster, the cluster leader can maintain an indication of the filesets managed by the servers or “fileset managers.” A node within a cluster can be configured to operate as the cluster leader and the clustered file system manager. Whether a node operates as a cluster leader, server, client, etc., can be transparent to users of the cluster. A user will perceive a same behavior whether a node operates as both the client and server, or the client is on a remote node.
In some embodiments, the clustered file system manager maintains the clustered file system metadata (“metadata”) in a hierarchical data structure of inodes. The clustered file system manager maintains a root for the metadata a known location (i.e., predefined location) in the cluster storage resources (“cluster storage”). In a cluster that supports consistency snapshots, multiple locations in the cluster storage are reserved or defined for storing roots of consistency snapshots along with root metadata of the corresponding consistency snapshots. The root metadata helps to identify the consistency snapshots and to ensure integrity of the consistency snapshots. Embodiments can use time-based identifiers of consistency snapshots (e.g., generation value) that track progression of consistency snapshots and root checksums for verifying data integrity. Embodiments can write a first root checksum (“header checksum”) when a node begins to write the root and a second root checksum (“trailer checksum”) after the root has successfully been written to persistent cluster storage. Embodiments can use the header checksum and trailer checksum to ensure that writing of the root of a consistency snapshot was not interrupted. To recover from a failure, each of the locations is examined and the location with the most recent generation value is selected to allow recovery to begin with that consistency snapshot referenced by the selected location. Embodiments can configure a cluster to preserve any number of consistency snapshots.
Some example embodiments provide consistency snapshots of data in a given file system, wherein such snapshots do not block or delay incoming file system transactions while the consistency snapshot is being committed to storage. Accordingly, updates to data stored in the file system can occur concurrently with the storage of consistency snapshots of the same file system. As further described below, at least two contexts for a same data object are maintained so that this concurrency is enabled.
Consistency snapshots of the file system are associated with unique generation values. For example, the generation values can be integer values. Accordingly, when the committing to storage of a consistency snapshot (i.e., syncing of the consistency snapshot) is started, the generation for the file system can be incremented.
In some example embodiments, any modification to an object (e.g., data, file, etc.) in the file system is associated with a transaction. The transaction is associated with a generation of the file system and thus associated with a consistency snapshot. In some example embodiments in a dual context configuration, objects in the file system are cached with at most two copies of the object at any one time. One copy is for the update in progress context. In particular, the update in progress context for an object is created after the object is being updated (e.g., a user updates the object) and while a consistency snapshot of the file system having the object is being committed to storage. A second copy of the object is for the commit in progress context. This copy of the object is a copy of the object that is being/will be committed to storage as part of the consistency snapshot. In some example embodiments, the two objects can be cached together as an array of size two. Also, the object has an array of two elements that stores the generation associated with each object in the array.
In some example embodiments, to determine which context of the object to use, the generation value or generation number associated with the transaction is compared with the generation number of the cached object. The correct object array element is selected to modify the correct context of the object (e.g., update in progress context or the commit in progress context).
As further described below, the consistency snapshots are periodically (e.g., every five seconds) created. These consistency snapshots are created to attempt to recover previous versions of objects. For example, these consistency snapshots can be used to recover objects stored in the file system after a system crash. In some example embodiments, if a consistency snapshot interval is reached before the previous consistency snapshot has finished its sync (commit to storage), the new consistency snapshot is skipped. In particular, no consistency snapshot would be taken at that time because a third copy of the cached object would be required.
FIG. 1 depicts a conceptual diagram of a clustered file system configuration to provide multiple contexts for data objects in a redirect-on-write file system, according to some example embodiments. The depicted cluster comprises nodes 103, 105, 107, 109. The cluster also comprises pool 101 of directly accessible storage devices; network accessible storage devices 113, 115; and network infrastructure 111. Nodes 103, 105, 107, 109 communicate via network infrastructure 111. Nodes 103, 105, 107, 109 access storage device pool 101 via cables and access network accessible storage device 113, 115 via network 111. In the depicted cluster, any of the nodes 103, 105, 107, 109 can be configured as the clustered file system manager for the cluster. The clustered file system manager can manage various aspects of the storage of files of the clustered file system therein. For example, the clustered file system manager can maintain metadata as a hierarchy of inodes for files of the clustered file system. In some example embodiments, some or all of the operations of the clustered file system manager can be distributed to the different nodes 103, 105, 107, 109. Some of these operations include operations related to providing multiple contexts for data objects in the clustered file system (as further described below). While described below such that these operations for providing multiple contexts for data objects is distributed across the different nodes 103, 105, 107, 109, in some other example embodiments, such operations can be performed by the clustered file system manager.
FIG. 2 depicts a more detailed conceptual diagram of clustered file system configuration to provide multiple contexts for data objects in a redirect-on-write file system, according to some example embodiments. FIG. 2 depicts system 200 that includes node A 202, node B 204, and node N 206 that can be representative of the nodes 103, 105, 107, 109 of FIG. 1. FIG. 2 depicts a number of components within node A 202. Although not shown, node B 204 and node N 206 can include similar components therein.
In some example embodiments, system 200 is configured to store data objects of a file system that uses redirect-on-write (ROW) when data is modified. In particular with a redirect-on-write, a new block is allocated for modified data. The file system can include one or more file sets. In some example embodiments, each file in the file system can include an inode. The inode can be a separate file or a data structure that stores information or metadata about the data stored in the file. For example for each part of the file (e.g., a block), the inode can store the address, the fileset identification, and the generation of the fileset where this data is stored. In particular, blocks where the data of a file are stored can be distributed across different filesets and generations of filesets. The different filesets and generations of filesets can be distributed across multiple storage devices. With reference to FIG. 2, these filesets can be stored in machine-readable media in any of node A 202, node B 204, and node N 206.
System 200 includes a number of client devices (shown as client device 208 and client device 210). System 200 includes network 212, wherein node A 202, node B 204, node N 206, client device 208, and client device 210 are communicatively coupled together through network 212.
Node A 202 includes fileset manager 214, nonvolatile machine-readable medium 216, and memory (e.g., a volatile machine-readable medium) 218 that are communicatively coupled together. Fileset manager 214 can be software, firmware, hardware or a combination thereof. For example, fileset manager 214 can be part of an operating system executing on a processor (not shown) in node A 202. Nonvolatile machine-readable medium 216 stores a number of consistency snapshots that have already been created (shown as consistency snapshot A 224 and consistency snapshot N 226). Nonvolatile machine-readable medium 216 is also storing current consistency snapshot 228 that is in the process of being committed to storage therein. In some example embodiments, the consistency snapshots are periodically (e.g., every five seconds) created. The consistency snapshots include a snapshot of the data objects in the file system at a given point in time. In some example embodiments, a consistency snapshot stores any modifications (e.g., changes, additions, deletions, etc.) to the data objects that are in memory 218 that have not yet been committed to storage in nonvolatile machine-readable medium 216, since the last consistency snapshot was committed to storage. These consistency snapshots are created to attempt to recover previous versions of objects stored in the file system. For example, these consistency snapshots can be used to recover objects stored in the file system after a system crash.
Memory 218 stores a number of buffer headers (buffer header A 220, buffer header N 222, etc.). As further described below (see description of FIG. 3), the buffer headers store various metadata regarding a data object stored in the file system. Fileset manager 214 creates a buffer header for a data object in the memory 218 (if not yet created therein) if the data object is being accessed, modified, etc. For example, fileset manager 214 can create a buffer header when the data object is being accessed to create current consistency snapshot 228, when the data object is being modified based on some client device request, etc. Based on the size of memory 218 and the number of data objects being accessed, fileset manager 214 may be required to flush some of the buffer headers whose associated data objects are not being accessed. Accordingly, fileset manager 214 may be required to recreate a buffer header for a data object in memory 218 when an access of the data object occurs. As further described below, the metadata in the buffer header stores a data pointer for the different copies of the data created for the given data object. In this example, buffer header A 220 has a first data pointer pointing to first copy of the data 250 and a second data pointer pointing to second copy of the data 252. Similar data pointers can be created for the different buffer headers stored in memory 218.
In some example embodiments, multiple copies of data for a same data object in the file system are created. Each of the multiple copies of the data can be associated with a different context. In some example embodiments, a data object can have two copies of its data for a dual context configuration. As an example, the memory 218 stores two copies of data for a same data object (first copy of data 250 and second copy of data 252). Any or all data objects stored in the file system can include this multi-copy, multi-context configuration. As shown, first copy of the data 250 has commit-in-progress context 254, and second copy of the data 252 has update-in-progress context 256. The two contexts for a same data object provide consistency snapshots of data in a file system, wherein such snapshots do not block or delay incoming file system transactions while the consistency snapshot is being committed to storage. Accordingly, updates to data stored in the file system can occur concurrently with the storage of consistency snapshots of the same file system. Specifically, commit-in-progress context 254 is associated with the copy of the data that is used to create this particular data object in current consistency snapshot 228. Update-in-progress context 256 is associated with the copy of the data that is used to accept updates to the data object (e.g., a user making modifications to the data), while current consistency snapshot 228 is being committed to storage (created in nonvolatile machine-readable medium 216).
FIG. 2 also depicts a number of operations (operation 230, operation 232, and operation 234). In this example, fileset manager 214 performs operation 230, wherein the fileset manager 214 initiates committing to storage a current consistency snapshot. In particular, fileset manager 214 initiates creation of current consistency snapshot 228. As part of the operation, fileset manager 214 can determine what data objects have been modified since the previous consistency snapshot was committed to storage. Fileset manager 214 can then write the modified data objects to new locations in nonvolatile machine-readable medium 216 in a bottom-up order. In some example embodiments, for each data object that is being stored in current consistency snapshot 228, fileset manager 214 can create and/or update an associated buffer header in memory 218 (shown as operation 234). If there is no associated buffer header in memory 218 for a data object, fileset manager 214 creates the buffer header when such data is being accessed for storing in current consistency snapshot 228. As further described below in reference to FIGS. 4-6, the buffer header for each data object includes various metadata (e.g., generation, context, location, data pointers). Fileset manager 214 updates this metadata as part of creating the buffer header in memory 218. Alternatively, if the buffer header is already instantiated within memory 218 for a given data object, fileset manager 214 can update the metadata therein. For example, fileset manager 214 can update various fields defining the generations and contexts for the multiple data being referenced by the data pointers (as further described below).
Also, prior to completion of the committing to storage of current consistency snapshot 228, a data object that is to be included in current consistency snapshot 228 is modified. In this example, client device 210 transmits an update request for a data object that is part of current consistency snapshot 228 over network 212 that is received by fileset manager 214 (shown as operation 232). In this situation, fileset manager 214 creates a second copy of the data in the data object that is copied from the first copy of the data (for example see first copy of data 250 and second copy of data 252). Also, the second copy of the data has a separate and different context from the context defined for the first copy of the data. In some example embodiments, a second copy of data is not created until the second copy is needed to provide dual context. For example, fileset manager 214 does not create the second copy until an update to a data object is requested while a consistency snapshot to store the same data object is in the process of being created. Also, fileset manager 214 creates and/or updates the buffer header for this data object in memory 218. For example, fileset manager 214 can update the second data pointer in the buffer header to point to the second copy of the data. Also, fileset manager 214 updates the contexts so that the two different copies of the data have two different contexts. A more detailed description of the operations of fileset manager 214 to provide multiple contexts for a data object are set forth below in reference to the flowcharts of FIGS. 5-6.
FIG. 3 depicts an example buffer header for a data object stored in a clustered file system, according to some embodiments. Buffer header 300 includes a number of fields related to a data object stored in a clustered file system. As described above, a buffer header for a data object is created in memory if not already in memory and in response to accessing the data object. For example, fileset manager 214 can access the data object for storing the data object in a consistency snapshot. In another example, fileset manager 214 can access the data object in response to some application updating the data object (e.g., a client devices 208, 210). In addition to creating the buffer header, fileset manager 214 can also populate the fields therein (302-316). Fields 302-304 define two different generation values for this data object. Last Committed Generation (LCG) field 302 defines the generation value for this data object during the last time when this data object was committed to storage in a consistency snapshot. Last Updated Generation (LUG) field 304 defines the generation value for this data object during the last time when this data object was being updated. The generation value of a data object is incremented each time the data object is initially updated but prior to the data object being committed to persistent storage as part of a consistency snapshot. For example, assume the current generation value of the data object is 15. If some application attempts to update the data object after the data object has been committed to persistent storage as part of a consistency snapshot, the generation value is incremented to 16. This generation value of this data object remains at 16 until the data object is committed to persistent storage as part of a consistency snapshot.
Fields 306-308 define two different context values for this data object. These contexts values are set to either zero or one. In particular, the context for a data object flips between two values (as being part of a dual context). Last Committed Context (LCX) field 306 defines the context for this data object during the last time when this data object was committed to storage in a consistency snapshot. Last Updated Context (LUX) field 308 defines the context for this data object during the last time when this data object was being updated. For example, after the data object is committed to persistent storage as part of a consistency snapshot but prior to an update to the data object, both LCX field 306 and LUX 308 are set to a same value (e.g., one). Subsequently if some application attempts to update the data object, LUX field 308 is flipped to a value of zero. Subsequently when this data object is again committed to persistent storage as part of a consistency snapshot, LCX field 306 is flipped to a value of zero. The use of fields 302-308 are further described below in reference to the flowcharts of FIGS. 5-6.
Physical location field 310 defines the physical location of the data object in the file system (e.g., the block number). Logical location field 312 defines the logical location where the data object is stored based on the location of the associated inode for this data object. For example, the logical location can include the physical location of the inode plus some offset where this data object is stored.
Data pointer 0 field 314 stores a first data pointer (data pointer 0) that is pointing to a first copy of the data of the data object in memory 218. Data pointer 1 field 316 stores a second data pointer (data pointer 1) that is pointing to a second copy of the data of the data object in memory 218. As described above, a second copy of the data of the data object is not created until a second context for the data object is required. For example, only one copy of data of the data object can be provided after the data object has been committed to persistent storage as part of a consistency snapshot but prior to any subsequent updates to the data object. In this situation, data pointer 0 field 314 (pointing to the first copy of the data) points to the first copy of the data, and data pointer 1 field 316 (pointing to the second copy of the data) does not point to a location (e.g., NULL). A second copy of the data is created from a copy of the first copy of the data after a second context is needed for the data object. For example, assume that the data object is being stored in a consistency snapshot and concurrently a client device is requesting an update to the data object. In this situation, the second copy of the data object is created. Also, data pointer 0 field 314 (pointing to the first copy of the data) still points to the first copy of the data, and data pointer 1 field 316 (pointing to the second copy of the data) is now modified to point to the second copy of the data of the data object. The use of fields 314-316 are further described below in reference to the flowcharts of FIGS. 5-6.
FIG. 4 depicts an example timeline of committing a consistency snapshot relative to multiple generations of a data object, according to some embodiments. Time line 400 increases over time from left to right. Time point 402 is a time when generation N for a data object has ended. Time point 404 is a later time when a later generation (generation N+1) for the same data object has ended. Time point 406 is a later time when a later generation (generation N+2) for the same data object has ended. Time period 408 is a period of time when a consistency snapshot is being committed to persistent storage (that includes the data object). Time period 408 is initiated at time point 402 after generation N has ended. As described above as part of the commit, fileset manager 214 traverses the hierarchy of data objects in bottom up order to capture block numbers and checksums of the child data objects. As shown, within time period 408 there are two sub periods—time period 410 and time period 412. Time period 410 includes a period of time wherein one copy or version of the data object exists in memory. For example, this time period can include a time when the data object is being committed to persistent storage, wherein the data object has not yet been modified (e.g., by an application executing on a client device). Time period 412 includes a period of time wherein two copies or versions of the data object exists in memory. Time period 412 is initiated in response to the data object being modified while the commit of the consistency snapshot for generation N is still occurring. For example, this time period can include a time when the data object is being committed to persistent storage and when the data object is being modified (e.g., by an application executing on a client device). In other words, a first version of a data object exists as part of a generation N consistency snapshot being published. A second version of the data object exists in case of and/or due to a write to the data object occurring in a current generation N+1 prior to completion of publication of the generation N consistency snapshot.
FIGS. 5-6 depict flowcharts of operations that provide multiple contexts for data objects in a redirect-on-write file system, according to some example embodiments. FIG. 5 depicts flowchart 500, and FIG. 6 depicts flowchart 600. Flowchart 600 is a continuation of flowchart 500, transitioning at point A. The flowcharts 500-600 are described as occurring in a decentralized configuration, wherein fileset manager 214 performs the operations therein. In some other example embodiments, the operations of the flowcharts 500-600 occur in a centralized configuration, wherein a file system manager can perform such operations. The flowcharts 500-600 depict an example situation where dual context for a data object is needed. In particular in this example situation, a consistency snapshot that includes a particular data object (termed “data object A) is being committed to storage in a nonvolatile machine-readable medium because data object A has been modified since a prior consistency snapshot has been committed to storage. Concurrently with this consistency snapshot being committed to storage, there is an operation to further modify data object A. For example, an application executing on a client device can be modifying data object A. Operations of flowcharts 500-600 are described in reference to FIGS. 1-3. Flowchart 500 is first described, followed by the description of flowchart 600
Fileset manager 214 initiates committing to storage, into a nonvolatile machine-readable medium, of a current consistency snapshot that includes a number of data objects in the file system (502). In some example embodiments, fileset manager 214 periodically commits to storage of a current consistency snapshot (e.g., three seconds, five seconds, 10 seconds, etc.). Accordingly, this operation can be one of the periodic operations for creating a consistency snapshot. With reference to FIG. 2, fileset manager 214 initiates committing to storage of current consistency snapshot 228. In some example embodiments, current consistency snapshot 228 will include data objects that have been modified since the prior consistency snapshot. Those changes to the data objects can reside in memory 218, such that the changes have not yet been committed to storage in nonvolatile machine-readable medium 216. Operations of flowchart 500 continue at 504.
Fileset manager 214 determines whether there are buffer headers in memory for the data objects that are to be stored in the current consistency snapshot (504). With reference to FIG. 2, fileset manager 214 determines whether there are buffer headers in memory 218 for the data objects that are to be stored in current consistency snapshot 228. In particular in some example embodiments, each time a data object is accessed (read from, written to, etc.), an associated buffer header is created in memory 218. If there are already buffer headers in memory for each of the data objects that are to be stored in current consistency snapshot 228, operations of flowchart 500 continue at 508. Otherwise, operations of flowchart 500 continue at 506.
Fileset manager 214 creates and updates buffer headers in memory (for data objects that do not already have buffer headers in memory) (506). With reference to FIG. 2, fileset manager 214 creates a buffer header in memory 218 for these data objects that do not have a buffer header in memory. Fileset manager 214 can also update the fields of the buffer header. With reference to FIG. 3, fileset manager 214 sets the values of these fields for the buffer headers for each of these data objects. Fileset manager 214 sets both LCG field 302 and LUG field 304 to the current generation value for the data object. For example, if the last committed consistency snapshot had a value of 5, fileset manager 214 would set LCG field 302 and LUG field 304 to 5. Context fields (306, 308) are set to either zero or one to differentiate between the two contexts (commit-in-progress context and update-in-progress context). Therefore if a second context is required, these two context fields 306,308 would have opposite values. If only one context is required, these two context fields 306, 308 would have the same value. In this situation, only one context for the data object is needed. Therefore, fileset manager 214 sets LCX field 306 and LUX field 308 to a same value (e.g., one). Fileset manager 214 sets physical location field 310 based on the data object's location in the file system (e.g., the block number). Fileset manager 214 sets logical location field 312 based on the location of the associated inode for this data object. For example, the logical location can include the physical location of the inode plus some offset where this data object is stored. Fileset manager 214 updates data pointer 0 field 314 in buffer header 300 to point to the location in memory 218 where the first copy of the data is located. Because this situation is not requiring multiple contexts, a second data object is not needed. Accordingly, fileset manager 214 updates data pointer 1 field 316 to point to NULL. Operations of flowchart 500 continue at 508.
Fileset manager 214 receives a transaction to update data object A (that is part of the data objects that are to be part of the current consistency snapshot) in the file system (while the committing to storage of the current consistency snapshot is still occurring) (508). With reference to FIG. 2, fileset manager 214 receives a transaction to update data object A from one of client devices 208, 210. For example, an application executing on one of client devices 208, 210 can update data object A. Operations of flowchart 500 continue at 510.
Fileset manager 214 determines whether there is a buffer header in memory for data object A (510). With reference to FIG. 2, fileset manager 214 determines whether there is a buffer header in memory 218 for data object A. In particular in some example embodiments, each time a data object is accessed (read from, written to, etc.), an associated buffer header is created in memory 218. If there is already a buffer header in memory 218 for data object A, operations of flowchart 500 continue at continuation point A (518). Otherwise, operations of flowchart 500 continue at 512.
Fileset manager 214 creates a buffer header in memory for data object A (512). With reference to FIG. 2, fileset manager 214 creates a buffer header in memory 218 for data object A, because there is not an associated buffer header for data object A in memory 218. Fileset manager 214 can also populate the fields of the buffer header (as further described by the operations below). Operations of flowchart 500 continue at 514.
Fileset manager 214 updates data pointer 0 field in the buffer header for data object A (514). With reference to FIGS. 2-3, fileset manager 214 updates data pointer 0 field 314 in buffer header 300 to point to the location in memory 218 where the first copy of the data is located. Operations of flowchart 500 continue at 516.
Fileset manager 214 also updates the physical location, the logical location, the LCG field, and the LCX field in the buffer header for data object A. With reference to FIGS. 2-3, fileset manager 214 updates physical location field 310, logical location field 312, LCG field 302, LCX field 306 for buffer header 300. Fileset manager 214 sets physical location field 310 based on the data object's location in the file system (e.g., the block number). Fileset manager 214 sets logical location field 312 based on the location of the associated inode for this data object. For example, the logical location can include the physical location of the inode plus some offset where this data object is stored. Fileset manager 214 sets LCG field 302 to the current generation value for data object A. For example, if the last committed consistency snapshot had a value of 5, fileset manager 214 would set LCG field 302 to 5. Context fields (306, 308) are set to either 0 or 1 to differentiate between the two contexts (commit-in-progress context and update-in-progress context). Therefore if a second context is required, these two context fields 306,308 would have opposite values. If only one context is required, these two context fields 306, 308 would have the same value. Assume that fileset manager 214 sets LCX field 306 to 1. The setting of LUX field 308 is described below. Operations of flowchart 500 continue at continuation point A (518).
Continuation point A (518) continues at continuation point A (602) of flowchart 600. From continuation point A (602), operations continue at 603.
Fileset manager 214 determines whether the value of the LCG field or the LUG field in the buffer header for data object A matches the generation value of the transaction (603). With reference to FIGS. 2-3, fileset manager 214 determines whether the value of LCG field 302 or the value of LUG field 304 in buffer header 300 matches the generation value of the transaction. The generation value of the transaction is set to the consistency generation based on when the transaction was created. Therefore, fileset manager 214 determines whether this generation associated with the transaction equals the last committed generation or the last updated generation. If there is not a match, operations continue at 604. Otherwise, operations continue at 616 (further described below).
Fileset manager 214 creates a second copy of data object A from the first copy of data object A (604). With reference to FIG. 2 and assume that first copy of data 250 is a first copy of data object A, fileset manager 214 copies first copy of data 250 to a different location in memory 218—second copy of data 252. Operations of flowchart 500 continue at 606.
Fileset manager 214 updates a second data pointer in the buffer header to point to the second copy of data object A (606). With reference to FIGS. 2-3, fileset manager 214 updates data pointer 1 field 316 to point to the second copy of data object A in memory 218. Operations of flowchart 600 continue at 608.
Fileset manager 214 updates the LUX field in the buffer header to have an opposite value to the value of the LCX field (608). With reference to FIGS. 2-3, fileset manager 214 updates LUX field 308 to have a value that is opposite a value of LCX field 306 in the buffer header 300. As described above, the values of LCX field 306 and LUX field 308 can be one of two values. If a dual context situation arises (as in this case), the values of LCX field 306 and LUX field 308 are opposite of each other. Operations of flowchart 600 continue at 610.
Fileset manager 214 sets the generation value for the LUG field in the buffer header based on the generation value for the transaction) (610). With reference to FIGS. 2-3, fileset manager 214 updates the generation value for LUG field 304 (based on the generation value for transaction (see description of generation value for the transaction above in description of 603. Operations of flowchart 600 continue at 614.
Fileset manager 214 updates the second copy of the data object A based on this transaction (614). With reference to FIGS. 2-3 and assuming second copy of data 252 is a second copy of the data object A, fileset manager 214 updates second copy of data 252 based on the pointer value in data pointer 1 field 316. Operations of flowchart 600 are complete along this path of flowchart 600.
Returning to 603 and assuming that there is a match (yes decision), fileset manager 214 updates a copy of the data object A using the first data pointer associated with the LUX field in the buffer header for the data object A (616). In this situation, there was a match at 603 because the generation for the transaction would match the LUG field 304. With reference to FIGS. 2-3 and assuming the first data pointer is pointing to first copy of data 250, fileset manager 214 updates first copy of data 250 based on the pointer value in data pointer 0 field 314. Operations of flowchart 600 are complete along this path of flowchart 600.
Additional updates to the same or different data objects in the file system can continue to occur. Also, after completion of the committing of the consistency snapshot, fileset manager 214 can commit an additional consistency snapshot (based on the periodic interval for committing consistency snapshots to persistent storage).
FIG. 7 depicts an example computer system. A computer system includes processor unit 701 (possibly including multiple processors, multiple cores, multiple nodes, and/or implementing multi-threading, etc.). The computer system includes memory 707. Memory 707 may be system memory (e.g., one or more of cache, SRAM, DRAM, zero capacitor RAM, Twin Transistor RAM, eDRAM, EDO RAM, DDR RAM, EEPROM, NRAM, RRAM, SONOS, PRAM, etc.) or any one or more of the above already described possible realizations of machine-readable media. The computer system also includes bus 703 (e.g., PCI, ISA, PCI-Express, HyperTransport®, InfiniBand®, NuBus, etc.), network interface 705 (e.g., an ATM interface, an Ethernet interface, a Frame Relay interface, SONET interface, wireless interface, etc.), and storage device(s) 709 (e.g., optical storage, magnetic storage, etc.). The computer system also comprises fileset manager 725 that provides for multiple contexts for data objects in a redirect-on-write file system. Any one of these functionalities may be partially (or entirely) implemented in hardware and/or on processing unit 701. For example, the functionality may be implemented with an application specific integrated circuit, in logic implemented in processing unit 701, in a co-processor on a peripheral device or card, etc. Further, realizations may include fewer or additional components not illustrated in FIG. 7 (e.g., video cards, audio cards, additional network interfaces, peripheral devices, etc.). The processor unit 701, storage device(s) 709, and network interface 705 are coupled to bus 703. Although illustrated as being coupled to bus 703, memory 707 may be coupled to processor unit 701.
initiating committing to storage, into a nonvolatile machine-readable medium, of a current consistency snapshot of a plurality of data objects in a redirect-on-write file system, wherein each of the plurality of data objects have a first copy of data of the plurality of data objects having a commit-in-progress context;
assigning a generation value to the current consistency snapshot that is unique relative to generation values of other consistency snapshots;
receiving, during the committing to storage of the current consistency snapshot, an update to a data object of the plurality of data objects;
responsive to receiving the update to the data object,
incrementing a generation value for the data object;
associating a generation value to the update that is derived from the generation value of the data object;
creating a second copy of data of the data object that is copied from the first copy of the data of the data object, the second copy of the data of the data object having an update-in-progress context; and
updating, based on the update, the second copy of the data of the data object, independent of updating the first copy of the data of the data object.
2. The method of claim 1, further comprising, responsive to receiving the update to the data object, creating a buffer header in volatile machine-readable medium that is associated with the data object, the buffer header comprising a first data pointer pointing to the first copy of the data of the data object and a second data pointer pointing to the second copy of the data of the data object.
3. The method of claim 1, wherein the current consistency snapshot comprises updates to the plurality of data objects since a prior consistency snapshot.
4. The method of claim 1, wherein the initiating of committing to storage of the current consistency snapshot is in response to a periodic operation to create a consistency snapshot.
5. The method of claim 1, wherein associating the generation value to the update that is derived from the current generation value of the data object comprises associating the generation value to the update that is equal to the current generation value of the data object.
initiating committing to persistent storage of a current consistency snapshot of a plurality of data objects in a redirect-on-write file system, each of the plurality of data objects configurable to have multiple copies of data of the plurality of data objects having different contexts; wherein each of the plurality of data objects has a first copy of at least two copies of the data having a first context of at least two contexts;
receiving during committing to storage of the current consistency snapshot, an update to a data object of the plurality of data objects; and
responsive to receipt of the update to the data object,
creating a second copy of data of the data object from the first copy, the second copy of the data having a second context of the at least two contexts; and
updating, based on the update, the second copy of the data of the data object.
7. The method of claim 6, further comprising assigning a generation value to the current consistency snapshot that is unique relative to generation values of other consistency snapshots.
8. The method of claim 7, further comprising, responsive to receiving of the update to the data object,
incrementing a generation value for the data object; and
associating a generation value to the update that is derived from the generation value of the data object.
9. The method of claim 6, wherein the current consistency snapshot comprises updates to the plurality of data objects since a prior consistency snapshot.
10. The method of claim 6, wherein the initiating of committing to persistent storage of the current consistency snapshot is in response to a periodic operation to create a consistency snapshot.
a nonvolatile machine-readable medium;
a volatile machine-readable medium;
a fileset manager operable to execute on the processor, the fileset manager configured to,
initiate committing to storage, into the nonvolatile machine-readable medium, of a current consistency snapshot of a plurality of data objects in a redirect-on-write file system, each of the plurality of data objects configurable to have multiple copies of data of the plurality of data objects having different contexts; wherein each of the plurality of data objects has a first copy of the multiple copies of the data having a first context of the different contexts, the first copy of the multiple copies configured to be stored in the volatile machine-readable medium;
receive, during committing to storage of the current consistency snapshot, an update to a data object of the plurality of data objects; and
create a second copy of data of the data object in the volatile machine-readable medium from the first copy, the second copy of the data having a second context of the different contexts; and
update, based on the update, the second copy of the data of the data object.
12. The apparatus of claim 11, wherein the fileset manager is configured to assign a generation value to the current consistency snapshot that is unique relative to generation values of other consistency snapshots.
13. The apparatus of claim 12, wherein the fileset manager is configured to, responsive to receipt of the update to the data object,
increment a generation value for the data object; and
associate a generation value to the update that is derived from the generation value of the data object.
14. The apparatus of claim 11, wherein the current consistency snapshot comprises updates to the plurality of data objects since a prior consistency snapshot.
15. The apparatus of claim 11, wherein the initiation of the committing to storage of the current consistency snapshot is in response to a periodic operation to create a consistency snapshot.
16. A computer program product for providing multiple contexts for a data object of a plurality of data objects, the computer program product comprising:
initiate committing to storage, into a nonvolatile machine-readable medium, of a current consistency snapshot of the plurality of data objects in a redirect-on-write file system, wherein each of the plurality of data objects have a first copy of data of the plurality of data objects having a commit-in-progress context;
assign a generation value to the current consistency snapshot that is unique relative to generation values of other consistency snapshots;
receive, during the committing to storage of the current consistency snapshot, an update to the data object of the plurality of data objects;
increment a generation value for the data object;
associate a generation value to the update that is derived from the generation value of the data object;
create a second copy of data of the data object that is copied from the first copy of the data of the data object, the second copy of the data of the data object having an update-in-progress context; and
update, based on the update, the second copy of the data of the data object, independent of updating the first copy of the data of the data object.
17. A computer program product of claim 16, wherein the computer usable program code is configured to, responsive to receipt of the update to the data object, create a buffer header in volatile machine-readable medium that is associated with the data object, the buffer header comprising a first data pointer pointing to the first copy of the data of the data object and a second data pointer pointing to the second copy of the data of the data object.
18. The computer program product of claim 16, wherein the current consistency snapshot comprises updates to the plurality of data objects since a prior consistency snapshot.
19. The computer program product of claim 16, wherein the initiation of committing to storage of the current consistency snapshot is in response to a periodic operation to create a consistency snapshot.
20. The computer program product of claim 16, wherein the computer usable program code is configured to create the first copy of the data of the data object and the second copy of the data object in a volatile machine-readable medium.
US12963146 2010-12-08 2010-12-08 Multiple contexts in a redirect on write file system Expired - Fee Related US8626713B2 (en)
US12963146 US8626713B2 (en) 2010-12-08 2010-12-08 Multiple contexts in a redirect on write file system
JP2011247465A JP5658124B2 (en) 2010-12-08 2011-11-11 Method of providing a plurality of contexts in a redirected-on-write file system, device and computer program
US20120150804A1 true true US20120150804A1 (en) 2012-06-14
US8626713B2 US8626713B2 (en) 2014-01-07
ID=46200379
US12963146 Expired - Fee Related US8626713B2 (en) 2010-12-08 2010-12-08 Multiple contexts in a redirect on write file system
US (1) US8626713B2 (en)
JP (1) JP5658124B2 (en)
US6560601B1 (en) * 1998-01-22 2003-05-06 Telefonaktiebolaget Lm Ericsson (Publ) Database transaction with locking in two phases and multiple versions of objects
US9031A (en) * 1852-06-15 Improvement in harvesters
JP2009169449A (en) * 2007-12-10 2009-07-30 Takeshi Mishima High-reliability database system, synchronizing method thereof, intermediating method, intermediating device, and intermediating program
US8700574B2 (en) 2008-03-21 2014-04-15 Omnitracs, Llc Pourover journaling
US8041991B2 (en) 2008-11-18 2011-10-18 Lsi Corporation System and method for recovering solid state drive data
US8626713B2 (en) 2014-01-07 grant
JP5658124B2 (en) 2015-01-21 grant
JP2012123793A (en) 2012-06-28 application
US20090271581A1 (en) 2009-10-29 Systems and methods for reliably managing files in a computer system
US20110022883A1 (en) 2011-01-27 Method for Voting with Secret Shares in a Distributed System
US7440984B2 (en) 2008-10-21 Reconciliation of local and remote backup data
Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:ADKINS, JANET E.;CHANG, JOON;CRAFT, DAVID J.;AND OTHERS;REEL/FRAME:025484/0032
Free format text: CORRECTIVE ASSIGNMENT TO CORRECT THE ANDREW SOLOMON WAS INADVERTENTLY OMITTED. PREVIOUSLY RECORDED ON REEL 025484 FRAME 0032. ASSIGNOR(S) HEREBY CONFIRMS THE ANDREW SOLOMON WAS INADVERTENTLY OMITTED.;ASSIGNORS:ADKINS, JANE E.;CHANG, JOON;CRAFT, DAVID J.;AND OTHERS;REEL/FRAME:027082/0927
Free format text: CORRECTIVE ASSIGNMENT TO CORRECT THE JANE SHOULD BE JANET PREVIOUSLY RECORDED ON REEL 027082, FRAME 0927;ASSIGNORS:ADKINS, JANET E.;CHANG, JOON;CRAFT, DAVID J.;AND OTHERS;REEL/FRAME:027378/0727