A computer program product comprising a non-transitory processor-readable storage medium having stored therein program code of one or more software programs, wherein the program code when executed by at least one processing device causes said at least one processing device to:
- receive a request to copy user data pages associated with a first range of logical addresses to a second range of logical addresses;
- determine a content-based signature corresponding to at least a portion of the first range of logical addresses based at least in part on a mapping of a logical storage layer of a content addressable storage system, the content addressable storage system comprising a plurality of storage devices and an associated storage controller, the storage controller being configured:
- to implement the logical storage layer of the content addressable storage system by mapping logical addresses associated with user data pages to content-based signatures respectively derived from a content of those user data pages;
- to implement a physical storage layer of the content addressable storage system by mapping the content-based signatures to respective physical blocks in the storage devices where the corresponding user data pages are stored;
- to implement a pending increment data structure associated with the storage controller, the pending increment data structure comprising a first plurality of entries, each entry in the pending increment data structure being configured to store a content-based signature that is mapped in the physical storage layer to a physical block for which an increment of a corresponding reference count is pending, each corresponding reference count comprising an indication of a number of logical addresses that are mapped to the corresponding content-based signature in the logical storage layer;
- and
- to implement a pending decrement data structure associated with the storage controller, the pending decrement data structure comprising a second plurality of entries, each entry in the pending decrement data structure being configured to store a content-based signature that is mapped in the physical storage layer to a physical block for which a decrement of a corresponding reference count is pending;
- map at least a portion of the second range of logical addresses to the determined content-based signature in the logical storage layer;
- add the determined content-based signature to a first entry of the pending increment data structure;
- determine that the pending decrement data structure comprises a second entry comprising the determined content-based signature;
- execute a pending decrement of the reference count corresponding to the determined content-based signature based at least in part on the determination that the pending decrement data structure comprises a second entry comprising the determined content-based signature, the execution of the pending decrement comprising:
- determining that a given set of entries of the first plurality of entries of the pending increment data structure each comprise the determined content-based signature;
- determining that a first timestamp of the pending increment data structure that corresponds to each entry in the given set of entries is earlier than a second timestamp of the pending decrement data structure that corresponds to an entry of the pending decrement data structure that comprises the determined content-based signature;
- executing at least one pending increment of the reference count corresponding to at least one entry in the given set of entries based at least in part on the determination that the first timestamp is earlier than the second timestamp;
- and
- executing the decrement of the reference count corresponding to the second entry in the pending decrement data structure that comprises the determined content-based signature after the execution of the at least one pending increment.