主权项 |
1. A data storage apparatus, comprising:
a host interface constructed and arranged to communicate with a set of host devices; memory having a file system area and a snapshot storage area; and a controller coupled to the host interface and the memory, the controller being constructed and arranged to:
impose, in response to a snapshot operation which copies a contiguous range of file system data blocks of a file system in the file system area of the memory to a set of snapshot data blocks of the snapshot storage area of the memory to save original host data of the file system obtained through the host interface, a lock on the B-tree structure, the B-tree structure being constructed and arranged to maintain mappings of data blocks of the file system to data blocks of the snapshot storage area,insert multiple objects into the B-tree structure while the lock is imposed, each object including a key value which (i) identifies a respective file system data block of the contiguous range of file system data blocks copied to the snapshot storage area and (ii) operates as a search key to facilitate searching of nodes of the B-tree structure, andrelease the lock imposed on the B-tree structure after the multiple objects have been inserted into the B-tree structure. |