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@cse.psu.edu>
Subject: Re: [9fans] stealing hard drive's contents
Date: Mon, 21 Nov 2005 08:12:43 -0500	[thread overview]
Message-ID: <ee9e417a0511210512r75ab3445le8ba4519ca16517c@mail.gmail.com> (raw)
In-Reply-To: <e4ab896ac264a5eb1e5076edafbede01@orthanc.cc.titech.ac.jp>

> vtWrite in venti/copy.c always gets called regardless to
> the result of walk()s in the switch clause starting at
> /sys/src/cmd/venti/copy.c:70.  Or am I misreading the source?

This is true, and that's intentional.  If the block is missing
on the one server, venti/copy prints an error and then
keeps going.  That's so that if there is a block missing,
you still copy what you can.

If the network flakes out mid-copy, it won't just affect
one or two blocks and then come back.  The session
is being run over a single tcp connection with no
redialing, so if you lose the network during one block,
you're not going to be able to copy any of the rest of the
blocks either.

Oh!  I see what happened.  If there is a read error due to
network failure (as opposed to do the block just being
corrupt on the remote server) then venti/copy needs to
call sysfatal to avoid vtwriting the block we were in the
middle of.

I'll fix this.  Thanks for the report.

Russ


  reply	other threads:[~2005-11-21 13:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-21  4:07 YAMANASHI Takeshi
2005-11-21 13:12 ` Russ Cox [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-11-21  2:58 YAMANASHI Takeshi
2005-11-21  3:13 ` Russ Cox
2005-11-21  9:41 ` Dave Eckhardt
2005-11-21  2:47 andrey mirtchovski

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=ee9e417a0511210512r75ab3445le8ba4519ca16517c@mail.gmail.com \
    --to=rsc@swtch.com \
    --cc=9fans@cse.psu.edu \
    /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).