9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: forsyth@vitanuova.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] file server trouble
Date: Wed,  3 Apr 2002 21:28:32 +0100	[thread overview]
Message-ID: <20020403202706.314CB19A26@mail.cse.psu.edu> (raw)

normally, if you recover to a dump, it should be fine, BUT
the system now needs to account for the fact that you've
used more blocks with a partially-attempted dump.
it needs to set the basis for future allocations to
the base of the unwritten material.  that's what the commented line does.
(see cwgrow.)

actually, what it ought to do instead of guessing that 100 will be enough
is to trundle down the blocks from where it thinks it can start
until it finds an unwritten block.  it can tell that.
i've got something like it somewhere; i needed
to copy an fworm to a worm.
	from = f1->dev;
	if(from->type == Devcw)
 		from = from->cw.w;
	devinit(from);
 	/* find last valid block in case fworm */
 	lim = devsize(from);
 	for(;;){
 		if(lim == 0)
			panic("no blocks to copy on %D", from);
 		p = getbuf(from, lim-1, Bread);
		if(p){
			putbuf(p);
 			break;
		}
		lim--;
	}
	print("limit %ld\n", lim);

h->fsize should be set to lim+1


             reply	other threads:[~2002-04-03 20:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-03 20:28 forsyth [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-04-03 20:08 anothy
2002-04-03 16:56 forsyth
2002-04-03 16:39 anothy
2002-04-02 23:18 Geoff Collyer
2002-04-02 23:06 Geoff Collyer
2002-04-02 22:10 anothy
2002-04-02 20:57 forsyth
2002-04-02 20:36 anothy

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=20020403202706.314CB19A26@mail.cse.psu.edu \
    --to=forsyth@vitanuova.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).