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

## 10.3.4 FlashCopy indirection layer 

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

To show how the FlashCopy indirection layer works, we examine what happens 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 cache into write-through mode on the source volumes. 

3. Discard cache for the target volumes. 

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

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

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

FlashCopy provides the semantics of a point-in-time copy by using the indirection layer, which intercepts I/O that is directed at 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 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 to the underlying volume, 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. To explain in more detail which action is applied for each I/O, we first look at the FlashCopy bitmap. 

