On Fri, Aug 21, 2009 at 6:15 AM, Venkatesh Srinivas<[email protected]> wrote:
> Plan 9's venti/copy has an undocumented -m option. What does it do?

On Fri, Aug 21, 2009 at 6:23 AM, erik quanstrom<[email protected]> wrote:
> the whole program is 262 lines long.
> i'm betting what -m does can be discovered
> by inspection.

what, maybe, but not always why.  it's a valid question.

> it might be a good idea to submit a patch
> to the man page, too.

replace

The
.B -f
option causes
.I copy
to run in `fast' mode,
assuming that if a block already exists on the
destination Venti server, all its children also
exist and need not be checked.

with

Venti's blocks are arranged in a directed acyclic graph (see venti(6));
there may be multiple paths from a root score to an
interior block (for example, if the same file contents are stored
under multiple names in an archive).
.I Copy
runs more efficiently if it does not copy blocks
(and all their children) multiple times.
The
.B -f
option causes
.I copy
to assume that if a block already exists on the destination
Venti server, all its children also exist and need not be considered.
The
.B -m
option causes
.I copy
to maintain an in-memory list of blocks it has copied
and avoid considering the same block multiple times.
The
.B -f
option is only useful if the destination Venti server is
known not to have lost any blocks due to disk corruption
or other failures.
The
.B -m
option is only useful enough memory is available to
hold the block list, which typically requires about 1%
of the total number of bytes being copied.

Reply via email to