content_image/1001202.jpg
## Indirection layer 

The FlashCopy indirection layer governs the I/O to the source and target volumes when a FlashCopy mapping is started. This process is done by using a FlashCopy bitmap. The purpose of the FlashCopy indirection layer is to enable both the source and target volumes for read and write I/O immediately after FlashCopy starts. 

The following description illustrates how the FlashCopy indirection layer works when a FlashCopy mapping is prepared and then started. 

When a FlashCopy mapping is prepared and started, the following sequence is applied: 

1. Flush the write cache to the source volume or volumes that are part of a Consistency Group. 

2. Put the cache into write-through mode on the source volumes. 

3. Discard the cache for the target volumes. 

4. Establish a sync point on all of the source volumes in the Consistency Group (creating the FlashCopy bitmap). 

5. Ensure that the indirection layer governs all of the I/O to the source volumes and target. 

6. Enable the cache on source volumes and target volumes. 

FlashCopy provides the semantics of a point-in-time copy that uses the indirection layer, which intercepts I/O that is directed at either the source or target volumes. The act of starting a FlashCopy mapping causes this indirection layer to become active in the I/O path, which occurs automatically across all FlashCopy mappings in the Consistency Group. The indirection layer then determines how each of the I/O is to be routed based on the following factors: 

GLYPH<SM590000> The volume and the logical block address (LBA) to which the I/O is addressed 

GLYPH<SM590000> Its direction (read or write) 

GLYPH<SM590000> The state of an internal data structure, the FlashCopy bitmap 

The indirection layer allows the I/O to go through the underlying volume. It redirects the I/O from the target volume to the source volume, or queues the I/O while it arranges for data to be copied from the source volume to the target volume. The process of queueing the write operations on the source volume while the indirection layer completes the grain copy on the target volume is called copy-on-write . 

Table 6-2 summarizes the indirection layer algorithm. 

<img src='content_image/1001202.jpg'>

