From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <6e3f550c630805193fedfeae0d1e425c@quanstro.net> References: <6e3f550c630805193fedfeae0d1e425c@quanstro.net> Date: Fri, 21 Aug 2009 07:11:05 -0700 Message-ID: Subject: Re: [9fans] venti/copy -m From: Russ Cox To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 500b6322-ead5-11e9-9d60-3106f5b1d025 On Fri, Aug 21, 2009 at 6:15 AM, Venkatesh Srinivas 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 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.