Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CA-292144 Avoid having an invalid leaf while taking a snapshot
After the original leaf has been renamed, td-util is asked to create a snapshot with the filename it originally had. This means that after td-util creates the file there is a brief window before it finishes populating it when an attempt to query it will fail because the file contents are invalid. If we instead create the new leaf with a temporary filename (foo.vhd.new) and rename it afterwards, this window is converted into one during which the file does not exist, a condition in which a query attempt will be retried for up to 20 seconds. If necessary, the window can be shrunk further by using links so that the old and new names of the original leaf exist simultaneously until it is time to rename the new leaf into place (this is necessary because td-util's snapshot function requires the parent to exist and be valid, otherwise we could just create the snapshot first). Signed-off-by: Tim Smith <tim.smith@citrix.com>
- Loading branch information