Patent ID: 8135678
Filing Date: 2012-03-13
Classification: G06F,Y10S

Abstract:
1. A method for restoring data from a snapshot, comprising: maintaining an active file system by a storage system; writing a snapshot of the active file system at a first state to persistent storage; modifying a data object of the active file system at a second state; receiving a command at a third state to restore the data object to the first state; creating a twin inode by copying an inode of the active file system which points to the data object at the third state; comparing a pointer in the snapshot with a pointer in the twin inode; and in response to the pointer in the twin matching the pointer in the snapshot, writing the pointer in the twin into the restored active file system, wherein the pointer in the restored active file system points to a block in use at the first state and in response to the pointer in the twin not matching the pointer in the snapshot, writing the pointer from the snapshot into the restored active file system to restore the restored active file system to the first state, and writing the block pointed to by the pointer in the snapshot into the restored active file system to restore the restored active file system to the first state; and in response to the pointer in the twin not matching the pointer in the snapshot, determining if the block pointed to by the twin pointer is allocated in the active file system; and copying, if the block is allocated in the active file system, a data of the block to a new block in the active file system; and copying, if the block is not allocated in the active file system, the pointer of the snapshot to the new pointer .