9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] venti/copy -m
@ 2009-08-21 13:15 Venkatesh Srinivas
  2009-08-21 13:23 ` erik quanstrom
  0 siblings, 1 reply; 5+ messages in thread
From: Venkatesh Srinivas @ 2009-08-21 13:15 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hi,

Plan 9's venti/copy has an undocumented -m option. What does it do?

Thanks,
-- vs



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] venti/copy -m
  2009-08-21 13:15 [9fans] venti/copy -m Venkatesh Srinivas
@ 2009-08-21 13:23 ` erik quanstrom
  2009-08-21 14:11   ` Russ Cox
  0 siblings, 1 reply; 5+ messages in thread
From: erik quanstrom @ 2009-08-21 13:23 UTC (permalink / raw)
  To: 9fans

> Plan 9's venti/copy has an undocumented -m option. What does it do?

the whole program is 262 lines long.
i'm betting what -m does can be discovered
by inspection.

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

- erik



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] venti/copy -m
  2009-08-21 13:23 ` erik quanstrom
@ 2009-08-21 14:11   ` Russ Cox
  2009-08-21 14:36     ` Venkatesh Srinivas
  0 siblings, 1 reply; 5+ messages in thread
From: Russ Cox @ 2009-08-21 14:11 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] venti/copy -m
  2009-08-21 14:11   ` Russ Cox
@ 2009-08-21 14:36     ` Venkatesh Srinivas
  2009-08-21 14:59       ` Russ Cox
  0 siblings, 1 reply; 5+ messages in thread
From: Venkatesh Srinivas @ 2009-08-21 14:36 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Thanks for the answer,

In p9's venti/copy, in scoretreecmp, there are two casts, from Avl* to
ScoreTree*; this depends on scoretree's avl being the first member of
the structure; I thought kencc was allowed to reorder structure
members, is that the case?

Thanks,
-- vs



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] venti/copy -m
  2009-08-21 14:36     ` Venkatesh Srinivas
@ 2009-08-21 14:59       ` Russ Cox
  0 siblings, 0 replies; 5+ messages in thread
From: Russ Cox @ 2009-08-21 14:59 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> I thought kencc was allowed to reorder structure members, is that the case?

No.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-08-21 14:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-21 13:15 [9fans] venti/copy -m Venkatesh Srinivas
2009-08-21 13:23 ` erik quanstrom
2009-08-21 14:11   ` Russ Cox
2009-08-21 14:36     ` Venkatesh Srinivas
2009-08-21 14:59       ` Russ Cox

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).