A point in time copy of a data set is provided using a two-phase snapshot
copy operation. When a write request is received, as part of the first
phase, a chunk including the target location of the write request is
determined. Using a "copy on first write" technique, the data at the
target location is copied to a snap data area in an allocated data area
that is the size of the chunk. A first map for the data set is updated to
include up to three entries representing a mapping of the segment
including the target location. A second map for the snap data area is
updated to include a single entry for the copy of the data from the
target location. As part of the second phase, the multiple entries in the
first map are coalesced into a single entry after the remaining portions
of the chunk are copied to the data area in the snap data area.