From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Mon, 25 Mar 2013 08:19:45 +0100 From: cinap_lenrek@gmx.de To: 9fans@9fans.net In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] Disk backup? Topicbox-Message-UUID: 3417ba00-ead8-11e9-9d60-3106f5b1d025 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