发明名称 Methods and apparatuses to optimize updates in a file system based on birth time
摘要 Methods and apparatuses that maintain birth time for a file system to optimize file update operations are described. The file system can include a plurality of snapshots or clones of data stored in one or more extents of blocks allocated in a storage device. Each extent may be associated with a time stamp according to the birth time. A request may be received from an executable using the file system to update data in a particular extent associated with a particular time stamp. In response, the current birth time in the file system and the particular time stamp may be compared to determine if the particular extent is not shared by more than one of the snapshots. If the particular time stamp is equal to the current birth time, the particular extent may be updated directly without performing an expensive operation to check whether a reference count of the particular extent is equal to one.
申请公布号 US8849876(B2) 申请公布日期 2014.09.30
申请号 US200912648273 申请日期 2009.12.28
申请人 发明人 Wang Wenguang;Horn Deric;Majnemer David Alexander;Strain Owen
分类号 G06F12/00;G06F17/30;G06F15/16 主分类号 G06F12/00
代理机构 Womble Carlyle Sandridge & Rice, LLP 代理人 Womble Carlyle Sandridge & Rice, LLP
主权项 1. A method for implementing a file system, the method comprising: within the file system, maintaining a plurality of snapshots of data stored in one or more extents of consecutive blocks allocated in a storage, and maintaining a birth time that is updated according to a creation of each snapshot of the plurality of snapshots, wherein each snapshot references one or more tree nodes, and each of the one or more tree nodes references at least one or a portion of the one or more extents of consecutive blocks, and is associated with: a time stamp indicating a time at which the tree node was created, anda reference count indicating a number of snapshots that reference the tree node; in response to receiving a request to update data represented by a particular one of the plurality of snapshots, identifying, within the one or more tree nodes referenced by the particular one of the plurality of snapshots, a particular tree node that references the data specified in the request; determining whether the particular tree node is a leaf node, wherein the leaf node represents a node without child nodes; in response to a determination that the particular tree node is a leaf node: determining, by comparing a current birth time to the time stamp of the particular tree node, whether the particular tree node is referenced by more than one of the plurality of snapshots; in response to a determination that the particular tree node is not referenced by more than one of the plurality of snapshots, updating the data associated with the particular tree node in-place without first needing to access a data structure to retrieve the reference count associated with the particular tree node, wherein the data structure stores reference counts for each of the one or more tree nodes; and in response to a determination that the particular tree node is not a leaf node or that the particular tree node is referenced by more than one of the plurality of snapshots, accessing the data structure to retrieve the reference count associated with the particular tree node, and performing copy-on-write operations to update the data associated with the particular tree node based on the retrieved reference count.
地址