9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Russ Cox <rsc@swtch.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] venti/copy -m
Date: Fri, 21 Aug 2009 07:11:05 -0700	[thread overview]
Message-ID: <dd6fe68a0908210711q72d4f269pb5fff75b67279c4d@mail.gmail.com> (raw)
In-Reply-To: <6e3f550c630805193fedfeae0d1e425c@quanstro.net>

On Fri, Aug 21, 2009 at 6:15 AM, Venkatesh Srinivas<me@acm.jhu.edu> 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<quanstro@quanstro.net> 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	other threads:[~2009-08-21 14:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-21 13:15 Venkatesh Srinivas
2009-08-21 13:23 ` erik quanstrom
2009-08-21 14:11   ` Russ Cox [this message]
2009-08-21 14:36     ` Venkatesh Srinivas
2009-08-21 14:59       ` Russ Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dd6fe68a0908210711q72d4f269pb5fff75b67279c4d@mail.gmail.com \
    --to=rsc@swtch.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).