From mboxrd@z Thu Jan 1 00:00:00 1970 From: forsyth@vitanuova.com To: 9fans@cse.psu.edu Subject: Re: [9fans] file server trouble MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20020403202706.314CB19A26@mail.cse.psu.edu> Date: Wed, 3 Apr 2002 21:28:32 +0100 Topicbox-Message-UUID: 72a71a58-eaca-11e9-9e20-41e7f4b1d025 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