主权项 |
1. A method of moving a source data portion, the method comprising:
receiving, by a storage system, a moving command for moving the source data portion from a source logical address range within a source logical volume to at least one destination logical address range within at least one destination logical volume; wherein the source logical volume is associated with a source mapping data structure for mapping between first logical addresses within the source logical volume and first physical addresses within a physical address space of the storage system; wherein the source mapping data structure comprises at least one first entry for mapping between the source logical address range and a physical address range that stores the source data portion and belongs to the physical address space; wherein the at least one destination logical volume is associated with a destination mapping data structure for mapping between second logical addresses within the at least one destination logical volume and second physical addresses in the physical address space; in response to the move command:
configuring, by the storage system, the destination mapping data structure to comprise at least one second entry for associating said at least one destination logical address range with a reference to said at least one first entry in the source mapping data structure, wherein the configuring of the destination mapping data structure provides at least one moved data portion without physically copying data of the source data; wherein the reference to said at least one first entry is indicative of the source logical address range;configuring said at least one first entry in the source mapping data structure to bear an indication that the source logical address range is unavailable to a client; wherein the method further comprising, upon receiving a request related to said at least one moved data portion:
looking up the destination mapping data structure for the at least one destination logical address range, so as to retrieve the reference to the at least one first entry;looking up the source mapping data structure for the source logical address indicated in the reference; andretrieving the physical address range that stores the source data portion; wherein the method further comprising: responsive to a write request for writing new data to said source data portion, providing an atomic operation, said atomic operation comprising:
assigning a new range of addresses related to the physical address space for the new data to be destaged;updating said at least one first entry in the source mapping structure to map between the source logical address range and said new range of addresses related to the physical address space; and updating said at least one second entry in the destination mapping structure to map between said at least one destination logical address range and the physical address range that was comprised, before the updating of said at least one first entry, in said at least one first entry in the source data structure, and removing the reference to the at least one first entry;
wherein the source mapping structure is a tree and wherein a path followed from a tree root to a leaf is represented as a string of zeros and ones depending on right or left branches comprised in the path; wherein an offset of the source logical address range within a given logical group is calculated in accordance with a path followed from the tree root to a leaf by calculating a sum, over index i that ranges between zero and d−1 of ri multiplied by two by a power of (M−i−1); wherein M is a power of two in a maximal number of admissible addresses in the given logical group, d is a depth of the leaf, values of index i that range between zero and d−1 are successive nodes in the tree leading to the leaf, and ri is a value equal to zero for one-side branching and equal to one for another side branching. |