<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7638.1">
<TITLE>[1/2] ole32: Rewrite transacted storage to be more lazy.</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Sorry about the large patch, but I can't think of a way to break this up any further.<BR>
<BR>
This patch series greatly cuts down on unnecessary copying in transacted storage. When creating a new transacted storage object (or reverting an existing one), rather than copy the original storage, we simply create a &quot;stub directory entry&quot; for the root. As stub entries are accessed, we fill in their data from the parent and create new stubs for any linked entries. The streams have copy on write semantics - reads are from the original entry until a change is made, then we make a copy in the scratch file.<BR>
<BR>
When committing transacted storages, we have to create a new tree with the new data so that the storage entry can be modified in one step, but unmodified sections of the tree can now be shared between the new tree and the old. An entry can be shared if it and all entries reachable from it are unmodified. In the trivial case where nothing has been modified, we don't have to make a new tree at all.<BR>
<BR>
We still have to copy unmodified streams in the case where modified entries are reachable from the stream's entry. The second patch in the series takes care of this by letting us make a new entry that points to the same stream as an existing entry. This is OK during a commit operation because only one entry will be reachable at a time, and the other will shortly be deleted.</FONT></P>

</BODY>
</HTML>