When data is copied between virtual disks (VDisks), it
is copied in units of address space known as grains.
The grain size is 64 KB or 256 KB. The FlashCopy® bitmap contains
one bit for each grain. The bit records whether the associated grain
has been split by copying the grain from the source to the target.
Write to target VDisk
A write to the newest
target VDisk must consider the state of the grain for its own mapping
and the grain of the next oldest mapping.
- If the grain of the intermediate mapping or the next oldest mapping
has not been copied, it must be copied before the write is allowed
to proceed. This is done to preserve the contents of the next oldest
mapping. The data written to the next oldest mapping can come from
a target or source.
- If the grain of the target that is being written has not been
copied, the grain is copied from the oldest already copied grain in
the mappings that are newer than the target (or the source if no targets
are already copied). After the copy is complete, the write can be
applied to the target.
Read to target VDisk
If the grain that is
being read has been split, the read returns data from the target that
is being read. If the read is to an uncopied grain on an intermediate
target VDisk, each of the newer mappings are examined to determine
if the grain has been split. The read is surfaced from the first split
grain found or from the source VDisk if none of the newer mappings
have a split grain.