From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) From: arisawa In-Reply-To: Date: Mon, 25 Mar 2013 16:32:06 +0900 Content-Transfer-Encoding: 7bit Message-Id: References: To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Subject: Re: [9fans] Disk backup? Topicbox-Message-UUID: 34289000-ead8-11e9-9d60-3106f5b1d025 oh! nice! that resolves all. thanks a lot i will try On 2013/03/25, at 16:19, cinap_lenrek@gmx.de wrote: > the block bitmap on a fakeworm is at the end of the sub > device/partition. see fworm.c: > > int > fwormread(Device *d, Off b, void *c) > { > Iobuf *p; > Device *fdev; > Devsize l; > > if(chatty > 1) > fprint(2, "fworm read %lld\n", (Wideoff)b); > fdev = FDEV(d); > l = devsize(fdev); > l -= l/(BUFSIZE*8) + 1; > if(b >= l) > panic("fworm: rbounds %lld", (Wideoff)b); > l += b/(BUFSIZE*8); > > p = getbuf(fdev, l, Brd|Bres); > if(!p || checktag(p, Tvirgo, l)) > panic("fworm: checktag %lld", (Wideoff)l); > l = b % (BUFSIZE*8); > if(!(p->iobuf[l/8] & (1<<(l%8)))) { > putbuf(p); > fprint(2, "fworm: read %lld\n", (Wideoff)b); > return 1; > } > putbuf(p); > return devread(fdev, b, c); > } > > the block tags do not really matter for the backup. you use the > fakeworm only as a backend for the cw device so you can just > copy all the blocks that got ther bit set in the bitmap compared > to the backup. > > -- > cinap >