主权项 |
1. A method comprising:
accessing a plurality of extent mapping entries, wherein each of the plurality of extent mapping entries maps an extent identifier to one or more data blocks; while accessing the plurality of extent mapping entries, determining that a first data block comprises the same data as a second data block, wherein the first data block is associated with a first extent that is associated with a first of the plurality of extent mapping entries, wherein the second data block is associated with a second extent that is associated with a second of the plurality of extent mapping entries; and in response to said determining that the first data block comprises the same data as the second data block,
creating a third extent mapping entry that identifies the first extent and that comprises a reference to the second extent mapping entry, an offset identifying the location of the second data block within the second extent, an external reference count associated with the first extent, and an internal reference count associated with the first extent; anddisassociating the first data block from the first extent. |