Described is a system and method that facilitates fast and reliable
synchronization of computer/file system directories. A synchronization
(FastSync) subsystem operates in a discovery/enumeration phase to provide
a calling client with a set of the differences between directories, and
then operates in an action phase to perform operations as directed by the
client to synchronize the different directories. The
discovery/enumeration and action phases use parallel operation and I/O
(input/output) pipelining. Multiple threads are used during enumeration
to enumerate each directory's children, and enqueues each sub-directory
to be handled by a new thread. During the action phase, when an operation
is requested, the FastSync subsystem packages up the operation, item
pointer, and context information into an internal context block and
queues that packet as a work item for a process thread pool to handle.