Home > Storage > PowerScale (Isilon) > Product Documentation > Data Protection > Data Protection with Dell PowerScale SnapshotIQ > Painting algorithm
When a file is written to, the system needs to do a small amount of work to determine if the file is part of a snapshot. If so, a copy of the old data needs to be kept. This is done using a process known as the “painting algorithm.”
The system keeps the most recent snapshot ID in a cluster-wide global variable. When a file is modified, OneFS looks first at the file’s last_snap_id. If the last_snap_id is not the most recent snap_id, there is a likelihood that the governing_snaps information in the file is out of date. In this case, OneFS recursively searches the parent directories until it finds up-to-date information, and then uses the correct directory’s governing-snaps information. For example:
In the instance above, /ifs has a governing_snaps ID of “98”. This implies that snapshots 98 and 99 were taken on another directory; possibly /ifs/home.
Snapshot “painting” is an expensive operation that has to be performed for every file in the system whenever a new snapshot is taken – even on files which are not part of the snapshot.